/* Drone Contact Form — scoped under .dct-root (WordPress theme safe) */

.dct-root {
  --dct-color-accent: #e4002b;
  --dct-color-text: #111111;
  --dct-color-muted: #888888;
  --dct-color-border: #dddddd;
  --dct-color-box-border: #dcdcdc;
  --dct-color-input-bg: #ffffff;
  --dct-color-submit-bg: #111111;
  --dct-font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --dct-label-width: 168px;
  --dct-field-gap: 28px;
  --dct-input-height: 48px;
  --dct-input-radius: 6px;
  --dct-row-gap: 22px;

  font-family: var(--dct-font-family);
  color: var(--dct-color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.dct-root *,
.dct-root *::before,
.dct-root *::after {
  box-sizing: border-box;
}

.dct-root .dct-form {
  margin: 0;
  padding: 36px 40px 40px;
  background: transparent;
  border: 1px solid var(--dct-color-box-border);
  border-radius: 8px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
}

.dct-root .dct-form__row {
  display: grid;
  grid-template-columns: var(--dct-label-width) 1fr;
  align-items: center;
  gap: var(--dct-field-gap);
  margin-bottom: var(--dct-row-gap);
}

.dct-root .dct-form__row--textarea,
.dct-root .dct-form__row--privacy {
  align-items: start;
}

.dct-root .dct-form__row--textarea .dct-form__label {
  padding-top: 14px;
}

.dct-root .dct-form__row--privacy .dct-form__label {
  padding-top: 2px;
}

.dct-root .dct-form__label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--dct-color-text);
  white-space: nowrap;
}

.dct-root .dct-form__required {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dct-color-accent);
  flex-shrink: 0;
}

.dct-root .dct-form__field {
  min-width: 0;
}

.dct-root .dct-form__input,
.dct-root .dct-form__select,
.dct-root .dct-form__textarea {
  width: 100%;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--dct-color-border);
  border-radius: var(--dct-input-radius);
  background: var(--dct-color-input-bg);
  font: inherit;
  font-size: 14px;
  color: var(--dct-color-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dct-root .dct-form__input,
.dct-root .dct-form__select {
  height: var(--dct-input-height);
}

.dct-root .dct-form__input::placeholder,
.dct-root .dct-form__textarea::placeholder {
  color: #aaaaaa;
}

.dct-root .dct-form__input:focus,
.dct-root .dct-form__select:focus,
.dct-root .dct-form__textarea:focus {
  border-color: var(--dct-color-accent);
  box-shadow: 0 0 0 1px var(--dct-color-accent);
}


/* Select */
.dct-root .dct-form__select-wrap {
  position: relative;
}

.dct-root .dct-form__select {
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
  color: #aaaaaa;
}

.dct-root .dct-form__select:valid,
.dct-root .dct-form__select option:not([value=""]) {
  color: var(--dct-color-text);
}

.dct-root .dct-form__select-icon {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 10px;
  height: 10px;
  transform: translateY(-70%) rotate(45deg);
  border-right: 2px solid var(--dct-color-accent);
  border-bottom: 2px solid var(--dct-color-accent);
  pointer-events: none;
}

/* Experience segments */
.dct-root .dct-form__segments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.dct-root .dct-form__segment {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.dct-root .dct-form__segment-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dct-root .dct-form__segment-text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--dct-input-height);
  padding: 0 12px;
  border: 1px solid var(--dct-color-border);
  border-radius: var(--dct-input-radius);
  background: var(--dct-color-input-bg);
  font-size: 14px;
  font-weight: 500;
  color: var(--dct-color-text);
  text-align: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.dct-root .dct-form__segment-input:checked + .dct-form__segment-text {
  border-color: var(--dct-color-accent);
  color: var(--dct-color-accent);
  font-weight: 600;
}

.dct-root .dct-form__segment-input:focus-visible + .dct-form__segment-text {
  outline: 2px solid var(--dct-color-accent);
  outline-offset: 2px;
}

/* Date input */
.dct-root .dct-form__date-wrap {
  position: relative;
}

.dct-root .dct-form__date-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
}

.dct-root .dct-form__date-icon img {
  display: block;
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(12%) sepia(98%) saturate(7426%) hue-rotate(346deg) brightness(95%) contrast(108%);
}

.dct-root .dct-form__input--date {
  position: relative;
  z-index: 1;
  padding-left: 46px;
  color: var(--dct-color-text);
}

.dct-root .dct-form__date-wrap:not(.is-filled) .dct-form__input--date {
  color: transparent;
}

.dct-root .dct-form__date-wrap:not(.is-filled) .dct-form__input--date::-webkit-datetime-edit,
.dct-root .dct-form__date-wrap:not(.is-filled) .dct-form__input--date::-webkit-datetime-edit-fields-wrapper,
.dct-root .dct-form__date-wrap:not(.is-filled) .dct-form__input--date::-webkit-datetime-edit-text,
.dct-root .dct-form__date-wrap:not(.is-filled) .dct-form__input--date::-webkit-datetime-edit-month-field,
.dct-root .dct-form__date-wrap:not(.is-filled) .dct-form__input--date::-webkit-datetime-edit-day-field,
.dct-root .dct-form__date-wrap:not(.is-filled) .dct-form__input--date::-webkit-datetime-edit-year-field {
  opacity: 0;
}

.dct-root .dct-form__input--date::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  right: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.dct-root .dct-form__date-placeholder {
  position: absolute;
  top: 50%;
  left: 46px;
  z-index: 2;
  transform: translateY(-50%);
  font-size: 14px;
  color: #aaaaaa;
  pointer-events: none;
  white-space: nowrap;
}

.dct-root .dct-form__date-wrap.is-filled .dct-form__date-placeholder {
  display: none;
}

/* Textarea */
.dct-root .dct-form__textarea-wrap {
  position: relative;
}

.dct-root .dct-form__textarea {
  min-height: 160px;
  padding: 14px 16px 36px;
  resize: vertical;
  line-height: 1.6;
}

.dct-root .dct-form__counter {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 12px;
  color: var(--dct-color-muted);
  pointer-events: none;
}

/* Privacy */
.dct-root .dct-form__privacy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.dct-root .dct-form__checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
}

.dct-root .dct-form__checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dct-root .dct-form__checkbox-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--dct-color-border);
  border-radius: 3px;
  background: var(--dct-color-input-bg);
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dct-root .dct-form__checkbox:checked + .dct-form__checkbox-box {
  border-color: var(--dct-color-accent);
  background: var(--dct-color-accent);
}

.dct-root .dct-form__checkbox:checked + .dct-form__checkbox-box::after {
  content: "";
  width: 5px;
  height: 9px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg) translate(-1px, -1px);
}

.dct-root .dct-form__checkbox-text {
  font-size: 14px;
  color: var(--dct-color-text);
}

.dct-root .dct-form__privacy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--dct-color-border);
  border-radius: 4px;
  background: var(--dct-color-input-bg);
  font: inherit;
  font-size: 13px;
  color: var(--dct-color-text);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.dct-root .dct-form__privacy-btn:hover {
  border-color: #bbbbbb;
}

.dct-root .dct-form__privacy-arrow {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--dct-color-accent);
  border-right: 2px solid var(--dct-color-accent);
  transform: rotate(45deg);
}

/* Submit */
.dct-root .dct-form__actions {
  margin-top: 32px;
}

.dct-root .dct-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 0 24px;
  border: none;
  border-radius: 6px;
  background: var(--dct-color-submit-bg);
  box-shadow: inset 0 -3px 0 var(--dct-color-accent);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.dct-root .dct-form__submit:hover {
  opacity: 0.92;
}

.dct-root .dct-form__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.dct-root .dct-form__submit:disabled:active {
  transform: none;
}

.dct-root .dct-form__submit-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(12%) sepia(98%) saturate(7426%) hue-rotate(346deg) brightness(95%) contrast(108%);
}

/* Modal */
.dct-root .dct-modal[hidden] {
  display: none;
}

.dct-root .dct-modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dct-root .dct-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.dct-root .dct-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(80vh, 640px);
  overflow: hidden;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.dct-root .dct-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 12px;
  border-bottom: 1px solid #eeeeee;
}

.dct-root .dct-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.dct-root .dct-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #666666;
  cursor: pointer;
}

.dct-root .dct-modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: calc(min(80vh, 640px) - 140px);
  font-size: 14px;
  line-height: 1.7;
  color: #333333;
}

.dct-root .dct-modal__body h3 {
  margin: 18px 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--dct-color-text);
}

.dct-root .dct-modal__body h3:first-of-type {
  margin-top: 0;
}

.dct-root .dct-modal__body p {
  margin: 0 0 8px;
}

.dct-root .dct-modal__footer {
  padding: 12px 24px 20px;
  text-align: right;
}

.dct-root .dct-modal__confirm {
  margin: 0;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  background: var(--dct-color-submit-bg);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
}

/* Preview page */
body.dct-preview-page {
  margin: 0;
  padding: 40px 20px;
  background: #ececec;
}

.dct-root.dct-preview {
  max-width: 860px;
  margin: 0 auto;
}

/* Responsive */
@media (max-width: 720px) {
  .dct-root .dct-form {
    padding: 24px 20px 28px;
  }

  .dct-root .dct-form__row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dct-root .dct-form__row--textarea .dct-form__label,
  .dct-root .dct-form__row--privacy .dct-form__label {
    padding-top: 0;
  }

  .dct-root .dct-form__segments {
    grid-template-columns: 1fr;
  }
}
