@charset "utf-8";

/* ==========================================================================
   대구메이트 신청 폼 (Figma 0400_Customized Tour / node 7288:17220)
   - main.css(100), sub.css(110) 뒤에 로드된다.
   - 다른 문의 폼에서도 쓸 수 있도록 게시판에 묶이지 않는 이름을 쓴다.
   - main.css 와 마찬가지로 body 기본 font-size 가 0.75em 이므로 모두 px 로 작성한다.
   ========================================================================== */

:root {
    --dm-red: #f1294f;          /* Colors/Used Color/Light/Red */
    --dm-base2: #444444;        /* Colors/Grey Color/Light/Base2 */
    --dm-base6: #b2b2b2;        /* Colors/Grey Color/Light/Base6 */
    --dm-form-w: 520px;         /* 시안 폼 폭 */
}

#dm_form_wrap {
    padding: 120px var(--dm-gutter) 0;
}

.dm-form {
    display: flex;
    flex-direction: column;
    gap: 60px;
    width: 100%;
    max-width: var(--dm-form-w);
    margin: 0 auto;
}

/* default_shop.css 가 input/button 에 폰트를 직접 지정하므로 되돌린다. */
.dm-form input,
.dm-form textarea,
.dm-form button {
    font-family: var(--dm-font-kr);
}

/* ------------------------------------------------------------ 섹션 묶음 */
.dm-form-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.dm-form-group-title {
    font-family: var(--dm-font-en);
    font-weight: 700;
    font-size: 20px;
    line-height: normal;
    letter-spacing: -0.4px;
    color: var(--dm-base0);
}
.dm-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---------------------------------------------------------------- 필드 */
.dm-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.dm-field-label {
    font-family: var(--dm-font-kr);
    font-weight: 400;
    font-size: 15px;
    line-height: 22px;
    color: var(--dm-base0);
}
.dm-field-label em {
    margin-left: 4px;
    font-style: normal;
    font-weight: 700;
    color: var(--dm-red);
}

.dm-input {
    width: 100%;
    height: 52px;
    padding: 0 13px;
    border: 1px solid var(--dm-base8);
    border-radius: 4px;
    background: var(--dm-base10);
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: var(--dm-base1);
    box-sizing: border-box;
}
.dm-input::placeholder {
    color: var(--dm-base6);
    opacity: 1;
}
.dm-input:focus {
    border-color: var(--dm-primary);
    outline: none;
}
/* default_shop.css 의 파란 focus 그림자를 시안 톤으로 덮는다. */
.dm-form .dm-input:focus {
    box-shadow: none !important;
    border: 1px solid var(--dm-primary) !important;
}

/* 날짜 : 시안 캘린더 아이콘을 왼쪽에 둔다. 달력은 jQuery UI datepicker (customized/write.skin.php). */
.dm-input-date {
    padding-left: 54px;
    background-image: url("../img/sub/ic_calendar.svg");
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 24px 24px;
    cursor: pointer;
}

/* 입력칸 + 단위 라벨 한 줄 */
.dm-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dm-field-unit {
    flex: none;
    font-weight: 400;
    font-size: 15px;
    line-height: 22px;
    color: var(--dm-base0);
    white-space: nowrap;
}
.dm-field-unit-w {
    width: 86px;
}
/* Adults / Children 2열 */
.dm-field-cols {
    display: flex;
    gap: 20px;
}
.dm-field-cols > * {
    flex: 1 1 0;
    min-width: 0;
}
/* Min / Max Budget 2행 */
.dm-field-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* --------------------------------------------------------- YES / NO 토글 */
.dm-toggle {
    display: flex;
    gap: 10px;
}
.dm-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.dm-toggle label {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    border: 2px solid transparent;
    border-radius: 4px;
    background: var(--dm-base9);
    font-weight: 500;
    font-size: 15px;
    line-height: 22px;
    color: var(--dm-base4);
    cursor: pointer;
    box-sizing: border-box;
}
.dm-toggle input:checked + label {
    border-color: var(--dm-primary);
    background: var(--dm-base10);
    color: var(--dm-primary);
}
.dm-toggle input:focus-visible + label {
    outline: 2px solid var(--dm-primary);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------- 라디오 */
.dm-radio-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}
.dm-radio {
    display: inline-flex;
    align-items: center;
}
.dm-radio input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.dm-radio label {
    position: relative;
    /* 시안의 한 줄 높이는 라디오(24px) 기준이다. 글자만 두면 20px 이 되어 줄간격이 어긋난다. */
    display: flex;
    align-items: center;
    min-height: 24px;
    padding-left: 28px;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: var(--dm-base2);
    cursor: pointer;
}
/* 시안 radio(off) : 24px 자리 한가운데 20px 원, 링 두께는 2px (#e0e0e0) */
.dm-radio label::before,
.dm-radio label::after {
    content: "";
    position: absolute;
    top: 50%;
    border-radius: 50%;
}
.dm-radio label::before {
    left: 2px;
    margin-top: -10px;
    width: 20px;
    height: 20px;
    background: var(--dm-base8);
}
.dm-radio label::after {
    left: 4px;
    margin-top: -8px;
    width: 16px;
    height: 16px;
    background: var(--dm-base10);
}
.dm-radio input:checked + label::before {
    background: var(--dm-primary);
}
.dm-radio input:checked + label::after {
    background: var(--dm-primary);
    box-shadow: inset 0 0 0 4px var(--dm-base10);
}
.dm-radio input:focus-visible + label::before {
    outline: 2px solid var(--dm-primary);
    outline-offset: 2px;
}

/* -------------------------------------------------------------- textarea */
.dm-textarea {
    height: 240px;
    padding: 15px;
    line-height: 20px;
    resize: vertical;
}

/* 후기 작성 (Figma 0607_review) : 시안 높이 120px */
.dm-textarea.dm-review-txt {
    height: 120px;
}

/* ---------------------------------------------------------------- 별점 */
/* 후기 작성 (Figma 0607_review). 마크업은 5 → 1 순서, row-reverse 로 1 → 5 로 보인다. */
.dm-score {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}
.dm-score input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.dm-score label {
    display: block;
    width: 40px;
    height: 40px;
    cursor: pointer;
}
.dm-score svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: #e0e0e0;
}
.dm-score input:checked ~ label svg,
.dm-score label:hover svg,
.dm-score label:hover ~ label svg {
    fill: #ffab00;
}
.dm-score input:focus-visible + label {
    outline: 2px solid var(--dm-primary);
    outline-offset: 2px;
}

/* ------------------------------------------------------- 자동등록방지 */
/* 코어 플러그인(plugin/kcaptcha) 마크업을 폼 톤에 맞춘다.
   default.css 가 #captcha #captcha_img 처럼 ID 두 개로 지정하므로
   .dm-captcha #captcha #... 로 한 단계 높여야 적용된다. */
.dm-captcha #captcha {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}
.dm-captcha #captcha #captcha_img {
    height: 52px;
    border: 1px solid var(--dm-base8);
    border-radius: 4px;
    vertical-align: middle;
}
.dm-captcha #captcha #captcha_key {
    width: 120px;
    height: 52px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid var(--dm-base8);
    border-radius: 4px;
    /* 코어가 .required 에 붙이는 별표 배경을 지운다. */
    background: var(--dm-base10) none !important;
    font-family: var(--dm-font-kr);
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    text-align: left;
    color: var(--dm-base1);
    box-sizing: border-box;
}
.dm-captcha #captcha #captcha_key:focus {
    border: 1px solid var(--dm-primary) !important;
    box-shadow: none;
}
/* 음성듣기·새로고침 : default.css 의 회색 40px 스프라이트(img/captcha2.png) 대신
   옆 입력칸과 같은 흰 바탕·테두리·높이(52px, 모바일 48px)의 정사각 버튼에 시안 선 아이콘을 둔다.
   버튼 글자(숫자음성듣기/새로고침 → 스킨이 영문으로 바꿈)는 default.css 의 text-indent 로 숨겨진다. */
.dm-captcha #captcha #captcha_mp3,
.dm-captcha #captcha #captcha_reload {
    width: 52px;
    height: 52px;
    border: 1px solid var(--dm-base8);
    border-radius: 4px;
    background: var(--dm-base10) url(../img/form/ic_sound.svg) no-repeat center / 24px 24px;
    box-sizing: border-box;
}
.dm-captcha #captcha #captcha_reload {
    background-image: url(../img/form/ic_reload.svg);
}
.dm-captcha #captcha #captcha_mp3:focus,
.dm-captcha #captcha #captcha_reload:focus {
    outline: none;
}
.dm-captcha #captcha #captcha_mp3:focus-visible,
.dm-captcha #captcha #captcha_reload:focus-visible {
    outline: 2px solid var(--dm-primary);
    outline-offset: 2px;
}
.dm-captcha #captcha #captcha_info {
    width: 100%;
    margin: 0;
    font-size: 13px;
    line-height: 18px;
    letter-spacing: 0;
    color: var(--dm-base4);
}

/* ---------------------------------------------------------------- 제출 */
.dm-form-submit {
    width: 100%;
    padding: 20px;
    border: 0;
    border-radius: 4px;
    background: var(--dm-primary);
    font-family: var(--dm-font-kr);
    font-weight: 500;
    font-size: 18px;
    line-height: 26px;
    color: var(--dm-base10);
    cursor: pointer;
}
.dm-form-submit:focus {
    outline: none;
}
.dm-form-submit:focus-visible {
    outline: 2px solid var(--dm-primary);
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .dm-form-submit {
        transition: background-color 0.2s ease;
    }
    .dm-form-submit:hover {
        background: var(--dm-primary-hover);
    }
    .dm-captcha #captcha #captcha_mp3:hover,
    .dm-captcha #captcha #captcha_reload:hover {
        border-color: var(--dm-primary);
    }
    .dm-toggle label {
        transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    }
    .dm-toggle input:not(:checked) + label:hover {
        color: var(--dm-base1);
    }
}

/* ======================================================================
   ~1279px : 태블릿 가로
   ====================================================================== */
@media (max-width: 1279px) {
    #dm_form_wrap {
        padding-top: 80px;
    }
    .dm-form {
        gap: 48px;
    }
}

/* ======================================================================
   ~767px : 모바일
   ====================================================================== */
@media (max-width: 767px) {
    #dm_form_wrap {
        padding-top: 56px;
    }
    .dm-form {
        gap: 36px;
    }
    .dm-form-group,
    .dm-form-fields {
        gap: 16px;
    }
    .dm-form-group-title {
        font-size: 18px;
        letter-spacing: -0.36px;
    }
    .dm-field-label,
    .dm-field-unit {
        font-size: 14px;
        line-height: 20px;
    }
    .dm-input,
    .dm-toggle label,
    .dm-captcha #captcha #captcha_img,
    .dm-captcha #captcha #captcha_key {
        height: 48px;
    }
    .dm-captcha #captcha #captcha_mp3,
    .dm-captcha #captcha #captcha_reload {
        width: 48px;
        height: 48px;
    }
    /* 360px 폭에서도 이미지(160x60 → 약 128px)·입력칸·버튼 2개가 한 줄에 들어가도록
       입력칸이 남는 폭을 채운다. */
    .dm-captcha #captcha #captcha_key {
        flex: 1 1 0;
        width: auto;
        min-width: 64px;
        max-width: 120px;
    }
    .dm-input-date {
        padding-left: 46px;
        background-position: 12px center;
        background-size: 20px 20px;
    }
    .dm-field-cols {
        gap: 12px;
    }
    .dm-textarea {
        height: 180px;
    }
    .dm-form-submit {
        padding: 16px;
        font-size: 16px;
        line-height: 24px;
    }
}

/* ======================================================================
   ~479px : 소형 모바일
   ====================================================================== */
@media (max-width: 479px) {
    /* 라벨 + 입력칸이 한 줄에 들어가지 않으므로 세로로 쌓는다. */
    .dm-field-cols {
        flex-direction: column;
        gap: 10px;
    }
    .dm-field-unit-w {
        width: 74px;
    }
}
