/**
 * assets/css/elite.css
 * Shared UI Components — Cyber Noir Edition
 * Chat, Cart, Modals, Notifications, Trackers
 */

/* ── Fallback Variables ── */
:root {
    --glass-bg: rgba(12, 18, 32, 0.8);
    --glass-border-color: rgba(34, 211, 238, 0.06);
}

/* ── Layout ── */
body.elite-theme {
    background-color: var(--bg-dark);
    color: var(--text-primary, #e2e8f0);
    overflow-x: hidden;
}

/* ── Glass Card ── */
.glass-card {
    background: var(--bg-card, #0e1528);
    border: 1px solid var(--border, rgba(255,255,255,0.05));
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* ═══ STATUS TRACKER ═══════════════════════════ */
.status-tracker {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin: 20px 0; padding: 16px; background: var(--bg-surface, #0c1220);
    border-radius: 8px; border: 1px solid var(--border, rgba(255,255,255,0.05));
    position: relative;
}

.tracker-step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 1; }

.step-icon {
    width: 40px; height: 40px;
    background: rgba(34, 211, 238, 0.04);
    border: 2px solid rgba(34, 211, 238, 0.1);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px; transition: 0.4s;
    color: var(--text-muted, #64748b);
}

.step-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); transition: 0.4s; font-family: var(--font-mono, monospace); }

.tracker-line { position: absolute; top: 39px; left: 50px; right: 50px; height: 1px; background: rgba(34, 211, 238, 0.06); z-index: 0; }
.progress-fill { position: absolute; top: 0; left: 0; height: 100%; background: var(--primary, #22d3ee); box-shadow: 0 0 10px rgba(34, 211, 238, 0.3); transition: 1s ease-in-out; width: 0%; }

.tracker-step.completed .step-icon { background: rgba(34, 211, 238, 0.08); border-color: var(--primary); color: var(--primary); }
.tracker-step.completed .step-label { color: #fff; }

.status-pickup {
    margin-top: 20px; padding: 16px 20px;
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.12);
    border-radius: 8px;
    display: flex; align-items: center; gap: 16px;
    animation: slideUpFade 0.5s both;
}

/* ── Reveal ── */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.6s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)); }
.reveal.active { opacity: 1; transform: translateY(0); }

@keyframes slideUpFade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ═══ DRAWER & PANELS ══════════════════════════ */
#cartDrawer, #chatPanel {
    position: fixed; z-index: 2000;
    transition: 0.4s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

/* ── Chat Widget ── */
.chat-widget-btn {
    position: fixed; bottom: 24px; right: 24px;
    background: var(--bg-card, #0e1528);
    border: 1px solid var(--border, rgba(255,255,255,0.05));
    color: var(--primary, #22d3ee);
    width: 48px; height: 48px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 2000; transition: 0.3s;
}

.chat-widget-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.15);
    transform: translateY(-2px);
}

#chatPanel {
    bottom: 24px; right: 24px;
    width: 420px; height: 70vh;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 120px);
    display: flex; flex-direction: column;
    overflow: hidden;
    transform: translateY(20px); opacity: 0; pointer-events: none;
    background: var(--bg-surface, #0c1220);
    border: 1px solid var(--border, rgba(255,255,255,0.05));
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

#chatPanel.active { transform: translateY(0); opacity: 1; pointer-events: all; }

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.05));
    display: flex; justify-content: space-between; align-items: center;
}

.online-indicator { width: 8px; height: 8px; background: var(--success, #22c55e); border-radius: 50%; box-shadow: 0 0 8px rgba(34, 197, 94, 0.5); }

.chat-body { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }

.panel-input {
    padding: 12px;
    border-top: 1px solid var(--border, rgba(255,255,255,0.05));
    display: flex; gap: 8px;
}

.panel-input input {
    flex: 1;
    background: var(--bg-card, #0e1528);
    border: 1px solid var(--border, rgba(255,255,255,0.05));
    padding: 10px 14px;
    border-radius: 6px;
    color: white; outline: none;
    font-size: 0.85rem;
}

.panel-input input:focus { border-color: var(--primary); }

.panel-input button {
    background: var(--primary, #22d3ee);
    color: var(--bg-dark, #070b14);
    border: none;
    width: 40px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.panel-input button:hover { box-shadow: 0 0 15px rgba(34, 211, 238, 0.3); }

/* ═══ CART DRAWER ══════════════════════════════ */
#cartDrawer {
    top: 0; right: 0; height: 100vh; width: 340px; max-width: 100vw;
    display: flex; flex-direction: column;
    transform: translateX(100%);
    background: rgba(7, 11, 20, 0.95);
    backdrop-filter: blur(30px);
    border-left: 1px solid var(--border, rgba(255,255,255,0.05));
    box-shadow: -20px 0 60px rgba(0,0,0,0.5);
}

#cartDrawer.active { transform: translateX(0); }

.drawer-header {
    padding: 30px;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.05));
    display: flex; justify-content: space-between; align-items: center;
}

.drawer-header h3 {
    font-size: 0.9rem; font-weight: 900;
    letter-spacing: 3px; text-transform: uppercase;
    color: #fff;
    font-family: var(--font-heading, 'Outfit', sans-serif);
}

.drawer-header button {
    background: var(--bg-card, #0e1528);
    border: 1px solid var(--border, rgba(255,255,255,0.05));
    color: white;
    width: 36px; height: 36px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.3s;
}

.drawer-header button:hover { background: var(--danger, #ef4444); color: white; }

.drawer-body {
    flex: 1; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 16px;
}

.drawer-body::-webkit-scrollbar { width: 2px; }
.drawer-body::-webkit-scrollbar-thumb { background: rgba(34, 211, 238, 0.1); border-radius: 4px; }

.cart-item-luxury {
    display: flex; align-items: center; gap: 16px; padding: 16px;
    background: var(--bg-card, #0e1528);
    border-radius: 8px;
    border: 1px solid var(--border, rgba(255,255,255,0.05));
    transition: 0.3s;
    animation: slideInRight 0.4s both;
}

.cart-item-luxury:hover {
    border-color: rgba(34, 211, 238, 0.15);
    background: rgba(34, 211, 238, 0.03);
}

@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.drawer-footer {
    padding: 30px;
    border-top: 1px solid var(--border, rgba(255,255,255,0.05));
}

.total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.total-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted, #64748b); font-family: var(--font-mono, monospace); }
#cartTotal { font-size: 1.4rem; font-weight: 950; color: var(--primary, #22d3ee); font-family: var(--font-heading, 'Outfit'); }

.drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(7, 11, 20, 0.5);
    backdrop-filter: blur(8px);
    z-index: 1010; opacity: 0;
    pointer-events: none;
    transition: 0.4s;
}

#cartDrawer.active ~ .drawer-overlay { opacity: 1; pointer-events: all; }

/* ═══ PROOF MODAL ══════════════════════════════ */
#proofModal {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(7, 11, 20, 0.7);
    backdrop-filter: blur(20px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: 0.4s;
}

#proofModal.active { opacity: 1; pointer-events: all; }

.proof-box {
    background: var(--bg-surface, #0c1220);
    border: 1px solid var(--border, rgba(255,255,255,0.05));
    border-radius: 12px; padding: 40px;
    width: 100%; max-width: 480px;
    transform: translateY(20px) scale(0.97);
    transition: 0.4s var(--ease);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

#proofModal.active .proof-box { transform: translateY(0) scale(1); }

.proof-drop-zone {
    border: 1px dashed rgba(34, 211, 238, 0.15);
    border-radius: 8px;
    padding: 40px 24px; text-align: center;
    cursor: pointer; position: relative; overflow: hidden;
    background: rgba(34, 211, 238, 0.02);
    transition: 0.3s;
}

.proof-drop-zone:hover { border-color: var(--primary); background: rgba(34, 211, 238, 0.04); }
.proof-drop-zone.dragover { border-color: var(--primary); background: rgba(34, 211, 238, 0.06); }
.proof-drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 10; }

.proof-icon-box {
    width: 52px; height: 52px;
    background: rgba(34, 211, 238, 0.04);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    border: 1px solid rgba(34, 211, 238, 0.08);
    color: var(--text-muted); transition: 0.3s;
}

.proof-drop-zone:hover .proof-icon-box {
    background: var(--primary, #22d3ee);
    color: var(--bg-dark, #070b14);
    border-color: transparent;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
}

#proofPreview {
    width: 100%; height: 200px;
    object-fit: cover; border-radius: 8px;
    margin-top: 16px;
    border: 1px solid var(--border);
    animation: zoomInFade 0.3s both;
}

@keyframes zoomInFade { from { opacity:0; transform: scale(0.95); } to { opacity:1; transform: scale(1); } }

/* ── btn-secondary ── */
.btn-secondary {
    background: transparent;
    border: 1px solid var(--border, rgba(255,255,255,0.05));
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer; transition: 0.3s;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(34, 211, 238, 0.04);
}

/* ═══ RESPONSIVE ═══════════════════════════════ */
@media (max-width: 768px) {
    #chatPanel { width: calc(100vw - 24px); height: 55vh; bottom: 12px; right: 12px; }
    #cartDrawer { width: 100vw; }
    .chat-widget-btn { width: 44px; height: 44px; bottom: 16px; right: 16px; }
    .proof-box { padding: 24px 16px; border-radius: 8px; }
}

/* ═══ SKELETON ═════════════════════════════════ */
.skeleton {
    background: linear-gradient(90deg, rgba(34,211,238,0.02) 25%, rgba(34,211,238,0.06) 50%, rgba(34,211,238,0.02) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 2s ease infinite;
    border-radius: 4px; display: inline-block;
}

@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.skeleton-text { height: 8px; width: 100%; margin-bottom: 6px; }
.skeleton-title { height: 14px; width: 60%; margin-bottom: 12px; }
.skeleton-box { height: 50px; width: 100%; border-radius: 6px; }
.skeleton-avatar { height: 36px; width: 36px; border-radius: 6px; }

/* ═══ MAINTENANCE ══════════════════════════════ */
.maintenance-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: #070b14;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; text-align: center; padding: 40px;
}

.maintenance-content h1 { font-family: 'Outfit', sans-serif; font-weight: 950; font-size: 2.5rem; letter-spacing: -1px; margin-bottom: 16px; color: #fff; }
.maintenance-content p { font-size: 0.9rem; color: var(--text-muted); max-width: 460px; line-height: 1.7; }

/* ═══ NOTIFICATIONS ════════════════════════════ */
.notif-item {
    display: flex; gap: 12px; padding: 12px; border-radius: 6px;
    transition: 0.2s; cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.notif-item:hover { background: rgba(34, 211, 238, 0.04); }
.notif-item.unread { background: rgba(34, 211, 238, 0.03); }

.notif-icon {
    width: 32px; height: 32px; border-radius: 6px;
    background: rgba(34, 211, 238, 0.04);
    display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
}

.notif-content { flex: 1; }
.notif-msg { font-size: 0.7rem; font-weight: 700; color: #fff; line-height: 1.4; }
.notif-time { font-size: 0.55rem; color: var(--text-muted); font-weight: 700; margin-top: 3px; text-transform: uppercase; font-family: var(--font-mono, monospace); }

/* ═══ TIMELINE / TRACKER ═══════════════════════ */
.tracker-container {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 24px; background: var(--bg-surface, #0c1220);
    border-radius: 8px;
    border: 1px solid var(--border, rgba(255,255,255,0.05));
    position: relative; margin-top: 24px;
}

.step-dot {
    width: 12px; height: 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    border: 2px solid var(--bg-dark, #070b14);
    margin-bottom: 12px; transition: 0.4s;
}

.tracker-step.active .step-dot { background: var(--primary, #22d3ee); box-shadow: 0 0 12px rgba(34, 211, 238, 0.4); transform: scale(1.3); }
.tracker-step.completed .step-dot { background: var(--success, #22c55e); box-shadow: 0 0 12px rgba(34, 197, 94, 0.4); }

.step-title { font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); font-family: var(--font-mono, monospace); }
.tracker-step.active .step-title { color: #fff; }

.step-line {
    position: absolute; top: 6px; left: 50%; width: 100%; height: 1px;
    background: rgba(255,255,255,0.04); z-index: -1;
}

.tracker-step:last-child .step-line { display: none; }
.line-fill { position: absolute; top: 0; left: 0; height: 100%; background: var(--primary); width: 0%; transition: 1s ease; }
.tracker-step.completed .line-fill { width: 100%; background: var(--success); }
