/* =========================================
   SeatKit Frontend Styles (Core)
   ========================================= */

/* --- 1. GLOBAL WRAPPERS & FONTS --- */
.seatkit-booking-wrapper, 
.sk-account-wrapper,
.seatkit-container {
    max-width: 1100px; margin: 30px auto; 
    font-family: 'Inter', system-ui, -apple-system, sans-serif; 
    color: #1e293b; box-sizing: border-box;
    line-height: 1.5;
}
.seatkit-booking-wrapper *, 
.sk-account-wrapper * { box-sizing: border-box; }

/* --- 2. TRIP LIST & ACCOUNT CARDS --- */
.sk-booking-grid { display: flex; flex-direction: column; gap: 20px; }

/* The Main Card */
.sk-trip-card {
    display: flex; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px;
    overflow: hidden; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.sk-trip-card:hover { box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1); border-color: #cbd5e1; transform: translateY(-2px); }

/* History Variation */
.sk-trip-card.sk-card-history { opacity: 0.85; background: #f8fafc; }
.sk-trip-card.sk-card-history:hover { opacity: 1; transform: none; box-shadow: none; }

/* Card Date Section */
.sk-card-date {
    background: #0f172a; color: #ffffff; padding: 25px; min-width: 110px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.sk-card-date .day { font-size: 28px; font-weight: 800; line-height: 1; display: block; }
.sk-card-date .month { font-size: 13px; text-transform: uppercase; font-weight: 600; opacity: 0.9; margin-top: 5px; display: block; }
.sk-card-date .year { font-size: 11px; opacity: 0.7; margin-top: 2px; display: block; }

/* Card Details Section */
.sk-card-details { flex: 1; padding: 25px; border-right: 1px dashed #e2e8f0; display: flex; flex-direction: column; justify-content: center; }
.sk-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.sk-card-top h4 { margin: 0; font-size: 18px; color: #1e293b; font-weight: 700; }
.ref-num { font-weight: 400; color: #94a3b8; font-size: 12px; margin-left: 5px; }

.sk-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 20px; }
.sk-info-block label { font-size: 11px; text-transform: uppercase; color: #94a3b8; font-weight: 700; display: block; margin-bottom: 4px; }
.sk-info-block span { font-size: 14px; font-weight: 600; color: #334155; }
.sk-highlight { color: #0f172a; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* Card Actions/Price Section */
.sk-card-actions {
    padding: 25px; min-width: 180px; background: #f8fafc;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px;
}
.sk-card-history .sk-card-actions { background: #f8fafc; }

.sk-price { font-size: 22px; font-weight: 800; color: #0f172a; }
.sk-price small { font-size: 12px; font-weight: 400; color: #64748b; }

/* Account Header & Tabs */
.sk-account-header { margin-bottom: 30px; border-bottom: 1px solid #e2e8f0; padding-bottom: 20px; text-align: center; }
.sk-user-profile { display: flex; align-items: center; gap: 20px; justify-content: center; }
.sk-avatar img { border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.sk-user-profile h2 { margin: 0; font-size: 24px; color: #0f172a; }
.sk-user-profile p { margin: 5px 0 0 0; color: #64748b; font-size: 14px; }

.sk-tabs { display: flex; gap: 10px; margin-bottom: 25px; border-bottom: 2px solid #f1f5f9; }
.sk-tab-btn {
    padding: 12px 20px; border: none; background: none; font-size: 14px; font-weight: 600; 
    color: #64748b; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;
}
.sk-tab-btn:hover { color: #0f172a; }
.sk-tab-btn.active { color: #0f172a; border-bottom-color: #0f172a; }
.sk-tab-content { display: none; animation: fadeIn 0.3s ease; }
.sk-tab-content.active { display: block; }

/* Empty States */
.sk-empty-state { 
    text-align: center; padding: 60px 20px; background: #fff; 
    border: 1px dashed #cbd5e1; border-radius: 12px; margin-top: 20px;
}
.sk-empty-state i, .sk-empty-state .sk-icon-circle { font-size: 48px; color: #cbd5e1; margin-bottom: 15px; display: block; }
.sk-empty-state h3 { margin: 0 0 10px 0; font-size: 18px; color: #334155; }
.sk-empty-state p { color: #64748b; margin-bottom: 25px; font-size: 14px; }


/* --- 3. BOOKING WIZARD --- */
.seatkit-booking-wrapper { display: flex; gap: 30px; align-items: flex-start; }
.seatkit-main-col { flex: 1; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }

/* Header & Tabs */
.seatkit-header-simple { background: #0f172a; color: white; padding: 20px 25px; }
.seatkit-header-simple h1 { margin: 0 0 8px 0; font-size: 22px; color: white; }
.sk-trip-route { display: flex; gap: 15px; font-size: 13px; opacity: 0.9; align-items: center; }
.badge-route { background: rgba(255,255,255,0.15); padding: 4px 10px; border-radius: 4px; }
.badge-time i { font-size: 14px; margin-right: 4px; vertical-align: middle; }

.seatkit-wizard-steps { display: flex; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.sk-step { flex: 1; padding: 15px; text-align: center; font-size: 14px; font-weight: 600; color: #94a3b8; border-bottom: 3px solid transparent; cursor: default; transition: all 0.2s; }
.sk-step.active { background: #fff; color: #0f172a; border-bottom-color: #0f172a; }
.step-num { display: inline-block; width: 22px; height: 22px; background: #e2e8f0; color: #64748b; border-radius: 50%; font-size: 12px; line-height: 22px; margin-right: 6px; }
.sk-step.active .step-num { background: #0f172a; color: #fff; }

.sk-step-content { display: none; padding: 30px; }
.sk-step-content.active { display: block; }
.sk-step-content h3 { margin: 0 0 20px 0; font-size: 16px; font-weight: 700; color: #334155; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; }

/* Seat Map & Legend */
.seatkit-legend-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-bottom: 20px; padding: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; }
.legend-item { display: flex; align-items: center; font-size: 12px; font-weight: 600; color: #475569; }
.legend-marker { width: 16px; height: 16px; border-radius: 4px; margin-right: 8px; border: 2px solid transparent; }
.legend-marker.available { background: #fff; border-color: #cbd5e1; }
.legend-marker.selected { background: #10b981; border-color: #10b981; }
.legend-marker.booked { background: #e2e8f0; border-color: #e2e8f0; }
.legend-marker.vip { background: #fff; border-color: #f59e0b; }

.seatkit-map-container {
    position: relative; height: 500px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 20px;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px); background-size: 20px 20px; overflow: auto;
}
.seatkit-seat {
    position: absolute; width: 40px; height: 40px; border-radius: 8px; background: #fff; border: 2px solid #cbd5e1;
    display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #64748b; 
    cursor: pointer; transition: all 0.15s;
}
.seatkit-seat:hover { transform: scale(1.1); border-color: #3b82f6; color: #3b82f6; z-index: 10; }
.seatkit-seat.selected { background: #10b981; border-color: #10b981; color: #fff; z-index: 20; box-shadow: 0 4px 10px rgba(16,185,129,0.3); }

/* Premium Styles (Classes applied by Pro, styles kept in Core for consistency) */
.seatkit-seat.seat-premium { border-color: #f59e0b; color: #d97706; }
.seatkit-seat.seat-premium.selected { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.seatkit-seat.locked { background-color:#ffedd5 !important; border-color:#f97316 !important; color:#c2410c !important; cursor:help !important; }
.legend-marker.locked { background:#ffedd5; border:2px solid #f97316; }

.seatkit-seat.booked { background: #e2e8f0; border-color: #e2e8f0; color: #94a3b8; pointer-events: none; }

/* Forms */
.sk-form-row { display: flex; gap: 15px; }
.sk-form-group { margin-bottom: 15px; width: 100%; }
.sk-form-group.grow { flex: 1; }
.sk-form-group.shrink { width: 80px; }
.sk-form-group label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #64748b; margin-bottom: 5px; }
.sk-form-group input { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; outline: none; transition: border 0.2s; }
.sk-form-group input:focus { border-color: #3b82f6; }

.sk-passenger-row { display: flex; align-items: center; gap: 15px; background: #f8fafc; padding: 15px; border-radius: 8px; border: 1px solid #e2e8f0; margin-bottom: 10px; }
.seat-badge { background: #0f172a; color: #fff; padding: 5px 10px; border-radius: 4px; font-size: 12px; font-weight: 700; min-width: 70px; text-align: center; }

/* Sidebar */
.seatkit-sidebar { width: 340px; min-width: 340px; }
.sticky-card { position: sticky; top: 20px; }
.sk-summary-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.sk-summary-card h3 { margin: 0 0 15px 0; font-size: 16px; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; }

.sk-summary-list { max-height: 250px; overflow-y: auto; margin-bottom: 15px; }
.sk-cart-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #e2e8f0; }
.sk-cart-item:last-child { border-bottom: none; }
.item-name { font-weight: 600; font-size: 13px; display: block; }
.item-name small { font-weight: 400; color: #64748b; margin-left: 5px; }
.item-calc { font-size: 11px; color: #94a3b8; display: block; margin-top: 2px; }
.item-price { font-weight: 700; font-size: 14px; }

.sk-divider-dashed { border-top: 1px dashed #cbd5e1; margin: 0 -20px 15px -20px; }

.sk-summary-totals .row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; color: #64748b; }
.sk-summary-totals .total-row { font-size: 16px; font-weight: 800; color: #0f172a; border-top: 1px solid #f1f5f9; padding-top: 10px; margin-top: 10px; }

/* Payment Options */
.sk-payment-options { margin: 15px 0; display: flex; flex-direction: column; gap: 8px; }
.sk-radio-box { display: flex; gap: 10px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.sk-radio-box:hover { border-color: #cbd5e1; background: #f8fafc; }
.sk-radio-box.selected { border-color: #3b82f6; background: #eff6ff; }
.sk-radio-box input { margin-top: 4px; }
.opt-title { display: block; font-size: 13px; font-weight: 700; color: #334155; }
.opt-desc { display: block; font-size: 11px; color: #64748b; }

/* Policies */
.sk-policies { background: #f8fafc; border-radius: 6px; padding: 15px; border: 1px solid #f1f5f9; }
.policy-item { display: flex; gap: 10px; font-size: 11px; color: #64748b; margin-bottom: 8px; line-height: 1.4; }
.policy-item:last-child { margin-bottom: 0; }
.policy-item i { font-size: 14px; color: #94a3b8; flex-shrink: 0; }
.policy-item.text-red { color: #b91c1c; }
.policy-item.text-red i { color: #ef4444; }

/* --- 4. BUTTONS & BADGES (Shared) --- */
.seatkit-btn { padding: 12px 20px; border-radius: 6px; border: none; font-weight: 600; cursor: pointer; font-size: 14px; transition: 0.2s; display: inline-block; text-align: center; text-decoration: none; }
.seatkit-btn.primary { background: #0f172a; color: #fff; }
.seatkit-btn.primary:hover { background: #1e293b; }
.seatkit-btn.secondary { background: #fff; border: 1px solid #cbd5e1; color: #64748b; }
.seatkit-btn.danger { background: #ef4444; color: #fff; }
.seatkit-btn.danger:hover { background: #dc2626; }
.pay-btn { width: 100%; background: #10b981; color: #fff; padding: 15px; border-radius: 8px; border: none; font-size: 16px; font-weight: 700; cursor: pointer; margin-bottom: 20px; }
.pay-btn:hover { background: #059669; }
.pay-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.width-auto { width: auto; }

.sk-btn-group { display: flex; gap: 8px; justify-content: center; }
.sk-icon-btn { width: 38px; height: 38px; border-radius: 6px; border: 1px solid #e2e8f0; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #475569; transition: all 0.2s; text-decoration: none; }
.sk-icon-btn:hover { border-color: #cbd5e1; color: #0f172a; transform: translateY(-1px); }
.sk-icon-btn.primary { background: #0f172a; color: #fff; border-color: #0f172a; }
.sk-icon-btn.primary:hover { background: #1e293b; }

.sk-link-danger { background: none; border: none; color: #ef4444; font-size: 11px; cursor: pointer; text-decoration: underline; margin-top: 5px; }
.sk-link-danger:hover { color: #b91c1c; }

.sk-action-footer { margin-top: 20px; display: flex; gap: 10px; }
.sk-action-footer.right { justify-content: flex-end; }
.sk-action-footer.split { justify-content: space-between; }

/* Status Badges */
.sk-status-pill { padding: 4px 10px; border-radius: 20px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.sk-status-confirmed { background: #dcfce7; color: #15803d; }
.sk-status-reserved { background: #fef9c3; color: #a16207; }
.sk-status-cancelled { background: #fee2e2; color: #b91c1c; }
.sk-status-expired { background: #f1f5f9; color: #64748b; }
.sk-history-label { font-size: 12px; font-weight: 600; color: #64748b; background: #e2e8f0; padding: 4px 10px; border-radius: 20px; }

/* --- 5. MODALS --- */
.sk-modal { display: none; position: fixed; z-index: 99999; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; backdrop-filter: blur(3px); animation: fadeIn 0.2s ease; }
.sk-modal-content { background: white; padding: 30px; border-radius: 12px; width: 400px; max-width: 90%; position: relative; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.sk-modal .close { position: absolute; top: 15px; right: 20px; cursor: pointer; font-size: 24px; color: #94a3b8; }
.sk-modal .close:hover { color: #ef4444; }

.sk-refund-box { background: #f8fafc; padding: 15px; border-radius: 8px; margin: 20px 0; border: 1px dashed #cbd5e1; }
.sk-refund-box .row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; color: #475569; }
.sk-refund-box .text-red { color: #ef4444; }
.sk-refund-box .total { border-top: 1px solid #e2e8f0; margin-top: 10px; padding-top: 10px; font-weight: 700; font-size: 15px; color: #0f172a; }

/* Modal Centering Fix */
.sk-modal-content.center-content { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.qr-box { background: #f8fafc; padding: 20px; border-radius: 12px; border: 1px solid #e2e8f0; margin: 20px 0; display: flex; justify-content: center; width: fit-content; }
.qr-box img { width: 180px; height: 180px; display: block; }

/* Timer Bar */
.sk-timer-bar { background: #fffbeb; color: #92400e; padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; margin-top: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #fcd34d; }
.sk-due-alert { background: #fee2e2; color: #b91c1c; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 4px; margin-bottom: 8px; text-align: center; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Mobile */
@media (max-width: 850px) {
    .sk-trip-card, .seatkit-booking-wrapper { flex-direction: column; }
    .sk-card-date { flex-direction: row; gap: 10px; width: 100%; justify-content: flex-start; padding: 15px; text-align: left; }
    .sk-card-details { border-right: none; border-bottom: 1px dashed #e2e8f0; }
    .sk-card-actions { width: 100%; flex-direction: row; justify-content: space-between; padding: 15px; background: #f8fafc; }
    .seatkit-sidebar { width: 100%; min-width: auto; }
}