/* ============================================
   BDK Wheels Solutions S.R.L. — Components
   Floating buttons, Cookie banner, Scroll progress
   ============================================ */

/* ========== SCROLL PROGRESS BAR ========== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--orange) 0%, var(--orange-light) 50%, #ffaa66 100%);
    z-index: 1001;
    width: 0%;
    transition: width 0.1s linear;
}

/* ========== COOKIE BANNER ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 22, 40, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-text {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    line-height: 1.6;
    flex: 1;
    min-width: 280px;
}

.cookie-text a {
    /* Fundal banner: navy #0a1628 (inchis). --orange-text (#b34700) pe inchis
       da doar 3.3:1 — sub prag. Portocaliul deschis #ff8c33 pe navy: 6.9:1. */
    color: var(--orange-light);
    text-decoration: underline;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.cookie-btn-accept {
    background: var(--orange);
    color: var(--navy);   /* 6.35:1 — WCAG AA */
}

.cookie-btn-accept:hover {
    background: var(--orange-light);
    transform: translateY(-2px);
}

.cookie-btn-decline {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.3);
}

.cookie-btn-decline:hover {
    border-color: var(--white);
    color: var(--white);
}

/* ========== BUTOANE FLOTANTE UNIFICATE (DREAPTA, UN SINGUR STACK) ========== */
/* Grup UNITAR cu 6 butoane, spatiere uniforma 14px intre TOATE:
   Telefon → WhatsApp → Email → EN → RO → Sageata.
   ANCORARE DE JOS: stiva e ancorata prin `bottom`, nu prin `top` astfel:
   - Sageata (ultimul buton) sta fix la 148px de baza ecranului (referinta
     din versiunea mobil: 706px din 854px viewport).
   - Restul butoanelor cresc in sus, in ordine, cu gap 14px constant.
   - Pe viewporturi mici, stiva creste in sus (spre header), nu iese jos.
   Fara separator vizual (cauza gap-ului dublu de 28px intre Email si EN). */
.floating-stack {
    position: fixed;
    bottom: 40px;  /* baza sagetii la 40px de jos */
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Gap constant 14px intre TOATE cele 6 butoane */
    gap: 14px;
    z-index: 9998;
    padding: 8px 0 0 0;  /* padding doar sus, jos e ancorat prin bottom */
}

.floating-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 118px;
    height: 46px;
    font: inherit;
    color: #fff;
    text-align: left;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    padding-left: 13px;
    border-radius: 23px 0 0 23px;
    background: rgba(255, 107, 0, 0.22);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-right: none;
    color: #fff;
    text-decoration: none;
    box-shadow: -3px 3px 14px rgba(0, 0, 0, 0.22);
    /* Transformul de repaus vine din animatie (fill-mode both = starea finala 34px
       ramane activa). Static aici ar bloca animatia la starea "from" (140px). */
    transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s ease, background 0.35s ease, width 0.3s cubic-bezier(.22,1,.36,1), padding-right 0.3s cubic-bezier(.22,1,.36,1);
    animation: floatingSlideIn 0.6s cubic-bezier(.22,1,.36,1) both;
}

.floating-btn svg {
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}

.floating-btn:hover,
.floating-btn:focus {
    transform: translateX(0);
    box-shadow: -4px 4px 22px rgba(0, 0, 0, 0.3);
    background: rgba(255, 107, 0, 0.42);
}

.floating-phone { animation-delay: 0.05s; }

.floating-whatsapp {
    background: rgba(37, 211, 102, 0.22);
    animation-delay: 0.15s;
}

.floating-whatsapp:hover,
.floating-whatsapp:focus {
    background: rgba(37, 211, 102, 0.42);
}

.floating-email {
    background: rgba(10, 37, 64, 0.22);
    animation-delay: 0.25s;
}

.floating-email:hover,
.floating-email:focus {
    background: rgba(10, 37, 64, 0.6);
}

/* REGULA UNITARA PENTRU TOATE CELE 6 BUTOANE:
   Iconita la acelasi offset (14px) de marginea din stanga a butonului,
   pe TOATE butoanele - inclusiv EN/RO. Fara exceptii, fara centrare.
   Astfel toate iconitele se aliniaza pe o singura coloana verticala. */
.floating-btn {
    justify-content: flex-start;
    padding-left: 13px;
}

/* Butonul Home (sageata): ultimul din grup, ACEEASI regula unitara
   (iconita la 14px, gap 14px ca restul). Ancorarea de jos a stivei
   (bottom: 148px) il pozitioneaza fix la 148px de baza ecranului. */
.floating-home {
    animation-delay: 0s;
}
.floating-home svg {
    flex: none;
}

/* Butoane limba: ACEEASI regula unitara ca restul (iconita la 14px,
   flex-start, padding-left 13px - mostenit din .floating-btn).
   RO se afla direct sub EN in stack (nu langa), ca buton independent. */
.floating-lang-btn {
    animation-delay: 0.35s;
}
.floating-lang-btn svg {
    flex: none;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.floating-lang-btn.active {
    background: rgba(37, 211, 102, 0.22);
    border-color: rgba(37, 211, 102, 0.55);
    border-right: none;
}

@keyframes floatingSlideIn {
    from { transform: translateX(140px); opacity: 0; }
    to   { transform: translateX(34px); opacity: 1; }
}

/* EXTINDERE LA APROPIERE (touch/hover)
   Starea de repaus: DESKTOP = buton complet 118px (iconita + label).
   MOBIL = compact 58px (doar iconita), extindere la 116px la atingere.
   Regula de compactare 58px sta PE MOBIL, in interiorul media query-ului
   de mai jos — in afara ei ar strange butoanele si pe desktop. */

@media (max-width: 768px) {
    /* MOBIL: repaus compact — doar iconita, jumatate din dimensiunea completa. */
    .floating-btn {
        width: 58px;
        padding-right: 0;
    }
    .floating-stack {
        gap: 12px;
        /* Container destul de lat pentru starea extinsa (116px): fara asta,
           flexbox strange containerul la latimea butonului compact (58px)
           si butoanele nu se pot extinde la atingere. */
        width: 116px;
        align-items: flex-end;
    }
    /* Mobil: TOATE butoanele aceeasi regula unitara (iconita la 11px =
       padding-left 11px, fara centrare pe EN/RO) */
    .floating-btn {
        width: 58px;  /* compact in repaus: doar iconita (jumate din 116px) */
        height: 42px;
        border-radius: 21px 0 0 21px;
        padding-left: 11px;
        padding-right: 0;
        transform: translateX(0);
        animation: none;
        flex-shrink: 0;  /* fara asta, containerul flex strange butonul la 58px indiferent de width */
        /* FARA transition: width — butonul ramanea inghetat la 58px in browserul mobil.
           Extinderea se face instant, fara animatie de latime. */
        transition: box-shadow 0.35s ease, background 0.35s ease;
    }
    /* La atingerea ecranului (touchstart): extindere la dimensiune completa.
       116px = 58px compact + spatiu pentru atingere sigura (iconita ramane
       la 11px, suprafata activa se extinde spre stanga). */
    /* Extinderea pe MOBIL se face EXCLUSIV prin clasa .apasat (JS la
       touchstart/touchend). NU prin :hover — pe iOS/Safari hover-ul e
       "sticky": dupa atingerea unui buton, :hover ramane activ pana la
       urmatoarea atingere pe alt element, iar butonul ramanea extins.
       :active e de asemenea exclus: ramane activ dupa intoarcerea din
       background (ex. dupa apel telefonic). */
    .floating-btn.apasat {
        width: 116px;
        padding-right: 11px;
        flex-shrink: 0;
    }

    /* Desktop / stylus: hover extinde (doar pe dispozitive cu hover real) */
    @media (hover: hover) and (pointer: fine) {
        .floating-btn:hover,
        .floating-btn:focus {
            width: 116px;
            padding-right: 11px;
            flex-shrink: 0;
        }
    }
    @keyframes floatingSlideIn {
        from { transform: translateX(130px); opacity: 0; }
        to   { transform: translateX(0); opacity: 1; }
    }
}

/* ========== FLOATING LABEL (WhatsApp) ========== */
.floating-label {
    margin-left: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

