/* 예약확인 페이지 스타일 */

.check-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 검색 폼 */
.check-form-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-group {
    flex: 1;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.btn-check {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-check:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-check:active {
    transform: translateY(0);
}

.btn-check:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 결과 영역 */
.result-area {
    display: none;
}

.result-area.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header-info {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.result-count {
    font-weight: 400;
    color: #6b7280;
}

/* 예약 카드 목록 */
.reservation-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* 예약 카드 아이템 */
.reservation-item {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.reservation-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 카드 헤더 (항상 표시) */
.reservation-header {
    display: grid;
    grid-template-columns: 120px 1fr 50px 60px;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.res-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
    font-family: monospace;
}

.res-program {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.res-program-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.res-schedule {
    font-size: 0.82rem;
    font-weight: 500;
    color: #6b7280;
}

.res-full-schedule {
    color: #0369a1;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.res-branch {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
}

/* 상태 배지 */
.status-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 72px;
    padding: 0.35rem 0.7rem;
    border-radius: 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.confirmed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.paid {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.cancel_requested {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.cancelled,
.status-badge.unpaid_cancelled,
.status-badge.customer_cancelled,
.status-badge.branch_cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.postponed {
    background: #ffedd5;
    color: #9a3412;
}

/* 카드 상세 (펼침) */
.reservation-details {
    padding: 1rem;
    background: #f9fafb;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.detail-label {
    font-size: 0.8rem;
    color: #6b7280;
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
}

.detail-value.highlight {
    color: #3b82f6;
    font-size: 1rem;
}

.account-box {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 0.5rem;
}

.account-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 0.25rem;
}

.account-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e3a8a;
}

.account-phone {
    font-size: 0.75rem;
    color: #3b82f6;
    margin-top: 0.25rem;
}

/* 에러 메시지 */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    color: #dc2626;
    font-size: 0.875rem;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* 로딩 스피너 */
.loading-spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

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

/* 모바일 최적화 */
@media (max-width: 640px) {
    .check-container {
        padding: 1rem;
    }

    .check-form-card {
        padding: 1.5rem;
    }

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

    .form-group {
        margin-bottom: 1rem;
    }

    .reservation-header {
        grid-template-columns: 100px 1fr 60px;
        gap: 0.5rem;
    }

    .res-branch {
        display: none;
    }

    .res-number {
        font-size: 0.7rem;
    }

    .res-program-name {
        font-size: 0.8rem;
    }
}

/* 계좌 정보 스타일 업데이트 */
.account-info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.bank-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
}

.account-num {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e3a8a;
    font-family: monospace;
}

.btn-copy {
    padding: 0.125rem 0.5rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #f3f4f6;
    color: #1f2937;
    border-color: #9ca3af;
}

.account-holder {
    font-size: 0.75rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.no-account {
    font-size: 0.875rem;
    color: #9ca3af;
    font-style: italic;
    padding: 0.5rem 0;
}

/* 취소 버튼 영역 */
.cancel-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn-cancel {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn-cancel:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-cancel:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cancel-deadline {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    color: #4b5563;
}

.cancel-deadline strong {
    color: #111827;
}

.cancel-warning {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #92400e;
    line-height: 1.4;
}

.cancel-info {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #1e40af;
    line-height: 1.4;
}

/* 확인 모달 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.2s;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.modal-message {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 0.75rem;
}

.modal-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modal-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.modal-btn-secondary:hover {
    background: #e5e7eb;
}

.modal-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.modal-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}


/* 미입금취소 당시 입금기한 도움말 */
.payment-deadline-help {
    position: relative;
    max-width: 100%;
}

.payment-deadline-trigger {
    min-height: 44px;
    padding: 0.35rem 0.6rem;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    background: #fef2f2;
    color: #991b1b;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.payment-deadline-trigger:focus-visible {
    outline: 2px solid #0369a1;
    outline-offset: 2px;
}

.payment-deadline-panel {
    position: absolute;
    right: 0;
    bottom: 100%;
    z-index: 1;
    width: max-content;
    max-width: min(18rem, calc(100vw - 4rem));
    padding: 0.65rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 4px 12px rgb(15 23 42 / 12%);
    color: #334155;
    font-size: 0.8rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.payment-deadline-panel[hidden] {
    display: none;
}
