/* Reservation Page Styles */

/* Honeypot field - hidden from users */
.form-field-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Page Title Section */
.page-title-section {
    background-color: var(--primary-color);
    border-radius: 24px;
    overflow: hidden;
    height: 120px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 20px;
}

.page-title-section .section-title {
    padding: 0 40px 0;
    text-align: left;
}

/* Reservation Content Section */
.reservation-content {
    background: var(--white);
    border-radius: 15px;
    padding: 10px 40px 40px;
    overflow: hidden;
}

/* Section Header */
.section-header {
    text-align: center;
    padding: 40px 0 20px;
}

.section-header h2 {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 900;
    font-size: 40px;
    color: var(--primary-color);
    letter-spacing: -3.2px;
    margin-bottom: 16px;
}

.section-header p {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: var(--primary-color);
    letter-spacing: -0.64px;
}

/* Calendar Container */
.calendar-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 60px;
}

/* Month Navigation */
.month-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    margin-bottom: 20px;
}

.month-nav {
    background: none;
    border: none;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: var(--text-gray);
    cursor: pointer;
    padding: 10px;
}

.month-nav:hover:not(.disabled) {
    color: var(--primary-color);
}

.month-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.current-month {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    font-size: 24px;
    color: var(--text-dark);
}

/* Calendar */
.calendar {
    background: var(--primary-color);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.day-name {
    text-align: center;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: var(--white);
    padding: 10px;
}

.day-name.sun {
    color: #ffcccc;
}

.day-name.sat {
    color: #cce5ff;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-date {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-date:hover:not(.disabled):not(.closed) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-date.selected {
    background: var(--primary-dark);
    color: var(--white);
}

.calendar-date.selected .date-number {
    color: var(--white);
}

.calendar-date.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-date.closed {
    background: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.calendar-date.closed .date-number {
    color: rgba(255, 255, 255, 0.6);
}

.date-number {
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--primary-color);
}

.calendar-date.sun .date-number {
    color: #e57373;
}

.calendar-date.sat .date-number {
    color: #64b5f6;
}

/* Holiday styling - same as Sunday (red) */
.calendar-date.holiday .date-number {
    color: #e57373;
}

.calendar-date.holiday.closed .date-number {
    color: rgba(229, 115, 115, 0.6);
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 12px;
    color: var(--text-gray);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.available {
    background: var(--primary-color);
}

.legend-dot.unavailable {
    background: #ccc;
}

/* Time Selection */
.time-selection {
    max-width: 880px;
    margin: 40px auto;
    padding: 0 120px;
}

.selected-date {
    text-align: center;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    font-size: 24px;
    color: var(--text-dark);
    padding: 40px 0 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.time-slots {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-row {
    display: flex;
    align-items: center;
    padding: 15px 24px;
    border: 1px solid var(--primary-color);
    border-radius: 16px;
}

.time-label {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: var(--primary-color);
    min-width: 60px;
}

.time-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.time-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 18px;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.time-btn:hover {
    color: var(--primary-color);
}

.time-btn.selected {
    color: var(--primary-color);
}

.time-btn .radio-icon {
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: relative;
}

.time-btn.selected .radio-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.time-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.time-legend {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 20px;
}

/* Personal Information Form */
.personal-info {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 60px;
}

.personal-info h3 {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 40px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.form-row {
    display: flex;
    gap: 50px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-group.full-width {
    flex: 1;
}

.form-group label {
    display: block;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 25px 20px;
    border: 1px solid var(--primary-color);
    border-radius: 16px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-dark);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #ccc;
}

.form-group textarea {
    resize: vertical;
    min-height: 200px;
}

/* Birthdate Group */
.birthdate-group {
    max-width: 520px;
}

.birthdate-inputs {
    display: flex;
    gap: 10px;
}

.birthdate-inputs input {
    text-align: center;
}

.birthdate-inputs input:first-child {
    flex: 2;
}

.birthdate-inputs input:nth-child(2),
.birthdate-inputs input:nth-child(3) {
    flex: 1;
}

/* Form Submit */
.form-submit {
    text-align: center;
    margin-top: 40px;
}

.submit-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 18px 80px;
    border-radius: 30px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.submit-btn:hover {
    background: var(--primary-dark);
}

/* Responsive Styles */
@media screen and (max-width: 1024px) {
    .calendar-container {
        padding: 20px;
    }

    .time-selection {
        padding: 0 40px;
    }

    .personal-info {
        padding: 0 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 20px;
    }

    .birthdate-group {
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .reservation-content {
        padding: 10px 0px 30px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .month-navigation {
        gap: 40px;
    }

    .current-month {
        font-size: 20px;
    }

    .calendar {
        padding: 15px;
    }

    .calendar-header {
        gap: 5px;
    }

    .calendar-body {
        gap: 5px;
    }

    .date-number {
        font-size: 16px;
    }

    .time-selection {
        padding: 0 20px;
    }

    .time-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px 10px;
    }

    .time-btn {
        font-size: 16px;
        padding: 8px 15px;
    }

    .personal-info h3 {
        font-size: 20px;
    }

    .form-group input,
    .form-group textarea {
        padding: 20px 15px;
    }
}

@media screen and (max-width: 480px) {
    .page-title-section {
        height: 100px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .section-header p {
        font-size: 14px;
    }

    .month-navigation {
        gap: 20px;
    }

    .calendar {
        padding: 10px;
        border-radius: 16px;
    }

    .day-name {
        font-size: 12px;
        padding: 5px;
    }

    .date-number {
        font-size: 14px;
    }

    .selected-date {
        font-size: 20px;
    }

    .time-btn {
        font-size: 14px;
        padding: 6px 12px;
    }

    .time-btn .radio-icon {
        width: 14px;
        height: 14px;
    }

    .submit-btn {
        padding: 15px 60px;
        font-size: 14px;
    }
}

/* Confirmation Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    font-size: 24px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
}

.modal-body {
    background: rgba(125, 203, 236, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
}

.modal-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid rgba(125, 203, 236, 0.3);
}

.modal-row:last-child {
    border-bottom: none;
}

.modal-label {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: var(--primary-color);
    min-width: 100px;
    flex-shrink: 0;
}

.modal-value {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: var(--text-dark);
    word-break: break-word;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    padding: 15px 40px;
    border-radius: 30px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn.edit-btn {
    background: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.modal-btn.edit-btn:hover {
    background: rgba(125, 203, 236, 0.1);
}

.modal-btn.confirm-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
}

.modal-btn.confirm-btn:hover {
    background: var(--primary-dark);
}

/* Modal Responsive */
@media screen and (max-width: 480px) {
    .modal-content {
        padding: 30px 20px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-row {
        flex-direction: column;
        gap: 5px;
    }

    .modal-label {
        min-width: auto;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
        padding: 15px 20px;
    }
}

/* Complete Modal */
.modal-complete {
    text-align: center;
}

.complete-icon {
    margin-bottom: 20px;
}

.complete-icon svg {
    color: var(--primary-color);
}

.complete-message {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.complete-email {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.complete-email-address {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 30px;
}

/* Loading state for confirm button */
.modal-btn.confirm-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.modal-btn.confirm-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Japanese font override */
html[lang="ja"] .section-header h2,
html[lang="ja"] .section-header p,
html[lang="ja"] .month-nav,
html[lang="ja"] .current-month,
html[lang="ja"] .day-name,
html[lang="ja"] .legend-item,
html[lang="ja"] .selected-date,
html[lang="ja"] .time-label,
html[lang="ja"] .time-btn,
html[lang="ja"] .personal-info h3,
html[lang="ja"] .form-group label,
html[lang="ja"] .form-group input,
html[lang="ja"] .form-group textarea,
html[lang="ja"] .submit-btn,
html[lang="ja"] .modal-title,
html[lang="ja"] .modal-label,
html[lang="ja"] .modal-value,
html[lang="ja"] .modal-btn,
html[lang="ja"] .complete-message,
html[lang="ja"] .complete-email {
    font-family: 'Noto Sans JP', sans-serif;
}
