/* =====================================================
   order.css — 결제/주문확인 페이지 전용 스타일
   ===================================================== */

/* ===== 섹션 ===== */
.order-section {
    background: var(--bg-secondary);
    padding: 8rem 0;
    position: relative;
}

.order-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 10% 20%, rgba(99,102,241,0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* 부제목 */
.order-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: -2.5rem;
    margin-bottom: 3rem;
}

/* ===== 메인 카드 ===== */
.order-card {
    max-width: 560px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* ===== 탭 ===== */
.order-type-tabs {
    display: flex;
    border-bottom: 2px solid #f1f5f9;
}

.order-tab {
    flex: 1;
    padding: 1.2rem 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.order-tab:hover {
    color: #667eea;
    background: rgba(99,102,241,0.04);
}

.order-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(99,102,241,0.04);
}

/* ===== 폼 영역 ===== */
.order-form-wrap {
    padding: 32px;
}

/* 안내 박스 */
.order-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 14px 18px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #1d4ed8;
    font-size: 0.9rem;
    margin-bottom: 28px;
    line-height: 1.5;
}

.order-notice i {
    color: #3b82f6;
    margin-top: 2px;
    flex-shrink: 0;
}

.confirm-notice {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.confirm-notice i {
    color: #22c55e;
}

/* 폼 그룹 */
.order-form-group {
    margin-bottom: 20px;
}

.order-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 8px;
}

.order-form-group .required {
    color: #ef4444;
    margin-left: 2px;
}

.order-form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    color: #1e293b;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.order-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.order-form-group input.input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.field-error {
    display: block;
    font-size: 0.83rem;
    color: #ef4444;
    margin-top: 5px;
    min-height: 1.1em;
}

/* ===== 버튼 ===== */
.order-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 8px;
    transition: all 0.25s ease;
}

.payment-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

.payment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.45);
}

.confirm-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(14,165,233,0.35);
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14,165,233,0.45);
}

/* ===== 주문확인 결과 카드 ===== */
@keyframes slideInResult {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.confirm-result.slide-in {
    animation: slideInResult 0.35s ease forwards;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.result-header i {
    font-size: 1.2rem;
    color: #22c55e;
}

.result-table {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.result-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

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

.result-label {
    width: 110px;
    min-width: 110px;
    padding: 13px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
}

.result-value {
    padding: 13px 16px;
    font-size: 0.95rem;
    color: #1e293b;
    flex: 1;
}

.price-value {
    font-weight: 700;
    color: #667eea;
    font-size: 1rem;
}

/* 상태 배지 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-badge.paid {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* 결제 정보 영역 (추후 확장용) */
.result-payment-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.result-payment-info-header {
    font-size: 0.9rem;
    font-weight: 700;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 10px;
}

.result-payment-info-header i {
    color: #667eea;
}

.result-payment-info-placeholder {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0;
}

/* 다시 조회하기 버튼 */
.reset-btn {
    background: #f1f5f9;
    color: #475569;
    box-shadow: none;
    margin-top: 12px;
}

.reset-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

/* ===== 팝업 모달 (공통 기반) ===== */
.popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: white;
    border-radius: 30px;
    padding: 3rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-overlay.active .popup-content {
    transform: scale(1) translateY(0);
}

.popup-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.popup-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.7;
    word-break: keep-all;
}

.popup-close-btn {
    width: 100%;
    padding: 1rem;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.popup-close-btn:hover {
    transform: translateY(-3px);
}

/* ===== 에러 모달 변형 ===== */
.popup-icon.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.popup-icon.error i {
    font-size: 3rem;
    color: #ef4444;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-8px); }
    40%       { transform: translateX(8px); }
    60%       { transform: translateX(-5px); }
    80%       { transform: translateX(5px); }
}

.popup-overlay.active .popup-icon.error {
    animation: errorShake 0.5s ease;
}

.error-title {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-close-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 14px rgba(239,68,68,0.35);
}

.error-close-btn:hover {
    box-shadow: 0 6px 20px rgba(239,68,68,0.5);
}

/* ===== 결제 완료 모달 변형 ===== */
@keyframes paidBounce {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.25); opacity: 1; }
    80%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.popup-icon.paid {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    width: 120px;
    height: 120px;
}

.popup-icon.paid i {
    font-size: 4rem !important;
    color: #10b981 !important;
}

.popup-overlay.active .popup-icon.paid {
    animation: paidBounce 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.paid-title {
    font-size: 1.35rem !important;
    color: #059669 !important;
    -webkit-text-fill-color: #059669 !important;
}

.paid-close-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}

.paid-close-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 6px 20px rgba(16,185,129,0.6) !important;
    transform: translateY(-3px);
}

/* ===== 반응형 ===== */
@media (max-width: 600px) {
    .order-section { padding: 5rem 0; }
    .order-form-wrap { padding: 24px 20px; }
    .popup-content { padding: 2rem 1.5rem; }
    .popup-icon { width: 80px; height: 80px; }
    .popup-icon.error i { font-size: 2.5rem; }
    .popup-title { font-size: 1.5rem; }
}