/**
 * TARGARYEN CAR V12 — UX Upgrades CSS
 * Sticky bar, price breakdown, comparator, social proof
 */

/* ═══════════════════════════════════════════
   VARIABLES
   ═══════════════════════════════════════════ */
:root {
    --tc-gold: #d4a853;
    --tc-gold-bright: #f0c96e;
    --tc-gold-dim: #a3812e;
    --tc-dark: #0a0a0f;
    --tc-dark2: #12121a;
    --tc-dark3: #1a1a26;
    --tc-card: #16161f;
    --tc-green: #2dd47a;
    --tc-red: #e8432a;
    --tc-blue: #3b8bff;
    --tc-text: #f0ede6;
    --tc-text2: #9a978f;
    --tc-text3: #5e5c57;
    --tc-border: #2a2a36;
    --tc-radius: 12px;
    --tc-font: 'Outfit', system-ui, sans-serif;
}

/* ═══════════════════════════════════════════
   3A. STICKY BOOKING BAR
   ═══════════════════════════════════════════ */
.tc-sticky-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--tc-border);
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.tc-sticky-bar.tc-visible {
    transform: translateY(0);
}
.tc-sb-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 24px;
}
.tc-sb-logo {
    font-family: var(--tc-font);
    font-weight: 700;
    font-size: 15px;
    color: var(--tc-gold);
    white-space: nowrap;
    letter-spacing: -0.5px;
}
.tc-sb-logo span {
    font-weight: 400;
    color: var(--tc-text2);
}
.tc-sb-fields {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
}
.tc-sb-field {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--tc-dark3);
    border: 1px solid var(--tc-border);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--tc-text2);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}
.tc-sb-field:hover {
    border-color: var(--tc-gold-dim);
    color: var(--tc-text);
}
.tc-sb-field.tc-filled {
    border-color: var(--tc-gold-dim);
    color: var(--tc-gold);
}
.tc-sb-field svg {
    flex-shrink: 0;
    opacity: 0.6;
}
.tc-sb-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--tc-gold);
    color: var(--tc-dark);
    border: none;
    padding: 10px 22px;
    border-radius: 10px;
    font-family: var(--tc-font);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s;
}
.tc-sb-cta:hover {
    background: var(--tc-gold-bright);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(212, 168, 83, 0.25);
}
.tc-sb-cta .tc-sb-price {
    font-weight: 700;
}

/* Mobile sticky bar */
@media (max-width: 768px) {
    .tc-sb-inner { padding: 8px 12px; gap: 8px; }
    .tc-sb-fields { display: none; }
    .tc-sb-logo { font-size: 13px; }
    .tc-sb-cta { padding: 10px 16px; font-size: 13px; flex: 1; justify-content: center; }
}


/* ═══════════════════════════════════════════
   3B. PRICE BREAKDOWN PANEL
   ═══════════════════════════════════════════ */
.tc-price-panel {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.tc-pp-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
.tc-pp-content {
    position: relative;
    background: var(--tc-dark2);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    width: 100%;
    max-width: 500px;
    padding: 24px;
    max-height: 85vh;
    overflow-y: auto;
    animation: tc-slide-up 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes tc-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.tc-pp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.tc-pp-header h3 {
    font-family: var(--tc-font);
    font-weight: 700;
    font-size: 18px;
    color: var(--tc-text);
}
.tc-pp-close {
    background: none;
    border: none;
    color: var(--tc-text3);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.tc-pp-close:hover { color: var(--tc-text); }

.tc-pp-car {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tc-border);
}
.tc-pp-car-name {
    font-family: var(--tc-font);
    font-weight: 600;
    font-size: 17px;
    color: var(--tc-text);
}
.tc-pp-car-cat {
    font-size: 13px;
    color: var(--tc-text3);
    margin-top: 4px;
}

.tc-pp-lines {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.tc-pp-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.tc-pp-line-label {
    color: var(--tc-text2);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tc-pp-line-val {
    font-family: var(--tc-font);
    font-weight: 500;
    color: var(--tc-text);
}
.tc-pp-line-val.free {
    color: var(--tc-green);
}
.tc-pp-line-val.discount {
    color: var(--tc-green);
}
.tc-pp-line.tc-pp-divider {
    height: 1px;
    background: var(--tc-border);
    margin: 4px 0;
}

.tc-pp-total {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--tc-border);
    margin-bottom: 20px;
}
.tc-pp-total > span {
    font-size: 14px;
    color: var(--tc-text2);
}
.tc-pp-total-val {
    font-family: var(--tc-font);
    font-weight: 800;
    font-size: 28px;
    color: var(--tc-gold);
    text-align: right;
}
.tc-pp-total-daily {
    font-size: 13px;
    color: var(--tc-text3);
    text-align: right;
}

.tc-pp-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: rgba(45, 212, 122, 0.08);
    border: 1px solid rgba(45, 212, 122, 0.2);
    border-radius: var(--tc-radius);
    color: var(--tc-green);
    font-family: var(--tc-font);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.tc-pp-wa:hover {
    background: rgba(45, 212, 122, 0.15);
    transform: translateY(-1px);
}
.tc-pp-trust {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    font-size: 11px;
    color: var(--tc-text3);
}


/* ═══════════════════════════════════════════
   3C. VEHICLE COMPARATOR
   ═══════════════════════════════════════════ */

/* Compare bar (bottom fixed) */
.tc-compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--tc-border);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.tc-compare-bar.tc-visible {
    transform: translateY(0);
}
.tc-cb-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
}
.tc-cb-count {
    font-size: 13px;
    color: var(--tc-text2);
    white-space: nowrap;
}
.tc-cb-count span {
    font-family: var(--tc-font);
    font-weight: 700;
    color: var(--tc-gold);
}
.tc-cb-slots {
    display: flex;
    gap: 8px;
    flex: 1;
    overflow-x: auto;
}
.tc-cb-slot {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--tc-dark3);
    border: 1px solid var(--tc-border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--tc-text);
    white-space: nowrap;
}
.tc-cb-slot-remove {
    cursor: pointer;
    opacity: 0.4;
    font-size: 14px;
}
.tc-cb-slot-remove:hover { opacity: 1; }
.tc-cb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--tc-gold);
    color: var(--tc-dark);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: var(--tc-font);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.tc-cb-btn:hover { background: var(--tc-gold-bright); }
.tc-cb-clear {
    background: none;
    border: 1px solid var(--tc-border);
    color: var(--tc-text3);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tc-cb-clear:hover { border-color: var(--tc-red); color: var(--tc-red); }

/* Compare modal */
.tc-compare-modal {
    position: fixed;
    inset: 0;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tc-cm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
}
.tc-cm-content {
    position: relative;
    background: var(--tc-dark2);
    border-radius: 20px;
    width: 95%;
    max-width: 800px;
    padding: 28px;
    max-height: 85vh;
    overflow-y: auto;
    animation: tc-scale-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes tc-scale-in {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.tc-cm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.tc-cm-header h3 {
    font-family: var(--tc-font);
    font-weight: 700;
    font-size: 20px;
    color: var(--tc-text);
}
.tc-cm-close {
    background: none;
    border: none;
    color: var(--tc-text3);
    font-size: 26px;
    cursor: pointer;
}
.tc-cm-close:hover { color: var(--tc-text); }

.tc-cm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.tc-cm-card {
    background: var(--tc-card);
    border-radius: 14px;
    border: 1px solid var(--tc-border);
    overflow: hidden;
}
.tc-cm-card-img {
    height: 130px;
    background: var(--tc-dark3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.tc-cm-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tc-cm-card-body {
    padding: 14px;
}
.tc-cm-card-name {
    font-family: var(--tc-font);
    font-weight: 600;
    font-size: 14px;
    color: var(--tc-text);
    margin-bottom: 12px;
}
.tc-cm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--tc-border);
    font-size: 12px;
}
.tc-cm-row:last-child { border-bottom: none; }
.tc-cm-row-label { color: var(--tc-text3); }
.tc-cm-row-val { color: var(--tc-text); font-weight: 500; }
.tc-cm-card-price {
    margin-top: 12px;
    font-family: var(--tc-font);
    font-weight: 700;
    font-size: 22px;
    color: var(--tc-gold);
}
.tc-cm-card-price span {
    font-size: 13px;
    font-weight: 400;
    color: var(--tc-text3);
}
.tc-cm-card-cta {
    display: block;
    text-align: center;
    margin-top: 12px;
    padding: 10px;
    background: rgba(212, 168, 83, 0.1);
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: 8px;
    color: var(--tc-gold);
    font-family: var(--tc-font);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}
.tc-cm-card-cta:hover { background: rgba(212, 168, 83, 0.2); }


/* ═══════════════════════════════════════════
   3D. SOCIAL PROOF NOTIFICATION
   ═══════════════════════════════════════════ */
.tc-social-proof {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--tc-dark2);
    border: 1px solid var(--tc-border);
    border-radius: 14px;
    padding: 12px 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 340px;
}
.tc-social-proof.tc-visible {
    transform: translateY(0);
}
.tc-sp-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(212, 168, 83, 0.15);
    color: var(--tc-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--tc-font);
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}
.tc-sp-name {
    font-family: var(--tc-font);
    font-weight: 600;
    font-size: 13px;
    color: var(--tc-text);
}
.tc-sp-action {
    font-size: 12px;
    color: var(--tc-text2);
}
.tc-sp-time {
    font-size: 11px;
    color: var(--tc-text3);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .tc-social-proof { left: 12px; right: 12px; max-width: none; bottom: 70px; }
    .tc-compare-bar.tc-visible ~ .tc-social-proof.tc-visible { bottom: 130px; }
}


/* ═══════════════════════════════════════════
   COMPARE TOGGLE BUTTON ON FLEET CARDS
   ═══════════════════════════════════════════ */
.tc-compare-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 14px;
    transition: all 0.2s;
    z-index: 2;
}
.tc-compare-toggle:hover {
    border-color: var(--tc-gold);
}
.tc-compare-toggle.tc-selected {
    background: var(--tc-gold);
    border-color: var(--tc-gold);
    color: var(--tc-dark);
}

/* ═══════════════════════════════════════════
   PRICE SEE-DETAILS BUTTON
   ═══════════════════════════════════════════ */
.tc-see-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--tc-gold);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    font-family: var(--tc-font);
    opacity: 0.8;
    transition: opacity 0.2s;
}
.tc-see-price:hover { opacity: 1; }
