/* ==========================================================================
   모델하우스 사전 방문예약 폼 전용 프리미엄 스티치 리디자인 스타일시트 (css/reserve.css)
   ========================================================================== */

:root {
    --color-primary: #1e2a4a;        /* 스티치 메인 네이비 */
    --color-primary-dark: #111a30;   /* 딥 네이비 */
    --color-accent-gold: #857211;    /* 올리브 골드 (전화 버튼 전용) */
    --color-text: #111827;           /* 다크 그레이 */
    --color-text-muted: #6b7280;     /* 뮤티드 그레이 */
    --color-border: #d1d5db;         /* 라이트 그레이 보더 */
    --color-bg: #f5f6f8;             /* 스티치 전체 백그라운드 */
    --color-surface: #ffffff;        /* 흰색 컨테이너 */
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.25s ease-in-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

/* 메인 폼 컨테이너 */
.reserve-container {
    width: 100%;
    max-width: 500px;
    background: var(--color-surface);
    min-height: 100vh;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 상단 네비게이션 바 */
.reserve-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    height: 56px;
}

.nav-menu-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-text);
    cursor: pointer;
    padding: 4px;
}

.nav-logo {
    font-size: 15px;
    font-weight: 800;
    color: #1a2332;
    letter-spacing: 0.8px;
}

/* 상단 메인 헤더 */
.reserve-header {
    background: #ffffff;
    color: var(--color-text);
    padding: 30px 24px 20px;
    text-align: center;
}

.reserve-header h1 {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.45;
    margin-bottom: 12px;
    color: #000000;
    letter-spacing: -0.5px;
}

.reserve-header p {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 500;
    max-width: 90%;
    margin: 0 auto;
    word-break: keep-all;
}

/* 폼 영역 */
.reserve-form-body {
    padding: 20px 24px;
    flex-grow: 1;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label.field-title {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.form-group label.field-title span.required {
    color: #ef4444;
    margin-left: 2px;
}

/* 기본 입력창 및 드롭다운 */
.input-text {
    width: 100%;
    height: 48px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    color: var(--color-text);
    background: #ffffff;
    transition: var(--transition);
}

.input-text:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 42, 74, 0.1);
}

.input-text::placeholder {
    color: #9ca3af;
}

/* 날짜 입력창(input type="date")에 플레이스홀더 수동 제공 */
input[type="date"].input-text {
    position: relative;
}

input[type="date"].input-text::before {
    content: attr(data-placeholder);
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
}

input[type="date"].input-text:focus::before,
input[type="date"].input-text:valid::before {
    display: none;
}

/* iOS 사파리에서 날짜 인풋창 글자 위치 정합성 정밀 보정 */
input[type="date"].input-text::-webkit-date-and-time-value {
    text-align: left;
    min-height: 1.2em;
}


/* 셀렉트 드롭다운 스타일 캘리브레이션 (iOS 등 화살표 대응 커스텀) */
select.input-text {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
    padding-right: 40px;
    cursor: pointer;
}

/* 버튼식 라디오 그룹 */
.radio-button-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.radio-btn-label {
    position: relative;
    cursor: pointer;
}

.radio-btn-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-btn-card {
    height: 48px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-muted);
    background: #ffffff;
    transition: var(--transition);
}

.radio-btn-label input[type="radio"]:checked + .radio-btn-card {
    border-color: var(--color-primary);
    color: #ffffff;
    background: var(--color-primary);
}

/* 조건부 명의자 섹션 (애니메이션 효과) */
.conditional-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.conditional-section.show {
    max-height: 400px;
    opacity: 1;
    margin-top: 14px;
    border-left: 2px solid var(--color-primary);
    padding-left: 14px;
}

/* 체크박스 그룹 */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* 청약 접수 특별 혜택 안내 배너 (Amber 디자인) */
.benefit-banner {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
}

.benefit-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.benefit-icon {
    color: #b45309;
    font-size: 15px;
}

.benefit-title {
    color: #92400e;
    font-size: 13.5px;
    font-weight: 700;
}

.benefit-desc {
    font-size: 12.5px;
    line-height: 1.6;
    color: #78350f;
    margin: 0;
    font-weight: 500;
}

/* 지능형 매칭 가이드 박스 (Gray 디자인) */
.guide-box {
    display: none;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.guide-box.show {
    display: block;
}

.guide-box.highlight {
    background: #fffbeb;
    border-color: #fde68a;
}

.guide-box h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-box h4 i {
    font-size: 15px;
    color: var(--color-text-muted);
}

.guide-box.highlight h4 i {
    color: #b45309;
}

.guide-box p {
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--color-text-muted);
}

.guide-box p strong {
    color: var(--color-text);
}

/* 폼 열(Row) 레이아웃 */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* 개인정보 동의 박스 */
.privacy-consent-box {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 22px;
}

.privacy-text {
    height: 80px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 4px;
    padding: 8px;
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin-bottom: 10px;
}

/* 제출 버튼 (스티치 네이비 테마) */
.btn-submit {
    width: 100%;
    height: 52px;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(30, 42, 74, 0.15);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 6px 16px rgba(30, 42, 74, 0.25);
}

.btn-submit:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

/* 하단 고정 정보 섹션 (스티치 연락처 바) */
.reserve-footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-contact-label {
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.footer-contact-numbers {
    display: flex;
    gap: 12px;
}

.footer-contact-numbers a {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-text);
    text-decoration: none;
}

/* 올리브 골드 전화기 아이콘 버튼 */
.footer-call-btn {
    width: 46px;
    height: 46px;
    background-color: var(--color-accent-gold);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(133, 114, 17, 0.3);
    transition: var(--transition);
}

.footer-call-btn:hover {
    background-color: #72610d;
    transform: scale(1.04);
}

/* 토스트 메시지 */
.toast-msg {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    z-index: 99999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.toast-msg.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==========================================================================
   땡큐 페이지 (성공 완료 화면) 스타일
   ========================================================================== */
.thankyou-content {
    padding: 50px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.success-icon-box {
    width: 72px;
    height: 72px;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: #16a34a;
    font-size: 32px;
    border: 2px solid #bbf7d0;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.1);
}

.thankyou-title {
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #111827;
    letter-spacing: -0.5px;
}

.thankyou-desc {
    font-size: 13.5px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
    word-break: keep-all;
}

.summary-card {
    width: 100%;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 32px;
    text-align: left;
}

.summary-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 10px;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-label {
    color: var(--color-text-muted);
    font-weight: 500;
}

.summary-value {
    color: #111827;
    font-weight: 700;
}

.btn-home-back {
    width: 100%;
    height: 50px;
    background: #ffffff;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-home-back:hover {
    background: #f8fafc;
}

.btn-close-window {
    width: 100%;
    height: 52px;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(30, 42, 74, 0.15);
    transition: var(--transition);
}

.btn-close-window:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 6px 16px rgba(30, 42, 74, 0.25);
}
