/* =========================================================
   SPACE VANTA
   BUYING GUIDE — PANEL SYSTEM

   File:
   public/buying-guide/cs/panel/panel.css

   Responsibility:
   - Editorial panel header
   - Panel index
   - Panel heading
   - Panel description
   - Directional control
   - Open / hover states
   - Panel content transition

   Does NOT control:
   - Individual block layouts
   - Product cards
   - Product data
   - Auto Selector logic
   ========================================================= */


/* =========================================================
   PANEL ROOT
   ========================================================= */

.sv-buying-guide [data-buying-guide-panel] {
    position:
        relative;

    width:
        100%;

    box-sizing:
        border-box;
}


/* =========================================================
   PANEL TRIGGER
   ========================================================= */

.sv-buying-guide [data-buying-guide-trigger] {
    position:
        relative;

    display:
        grid;

    grid-template-columns:
        46px minmax(0, 1fr) 42px;

    align-items:
        center;

    width:
        100%;

    min-height:
        86px;

    box-sizing:
        border-box;

    padding:
        19px 0;

    border:
        0;

    border-top:
        1px solid rgba(0, 0, 0, 0.11);

    background:
        transparent;

    color:
        inherit;

    cursor:
        pointer;

    text-align:
        left;

    appearance:
        none;

    -webkit-appearance:
        none;

    transition:
        padding 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.35s ease;
}


/* =========================================================
   LAST PANEL BOUNDARY
   ========================================================= */

.sv-buying-guide [data-buying-guide-panel]:last-child [data-buying-guide-trigger] {
    border-bottom:
        1px solid rgba(0, 0, 0, 0.11);
}


/* =========================================================
   PANEL INDEX
   ========================================================= */

.sv-buying-guide-panel__index {
    display:
        block;

    align-self:
        center;

    font-size:
        9px;

    line-height:
        1;

    letter-spacing:
        0.19em;

    font-weight:
        500;

    opacity:
        0.4;

    transform:
        translateX(0);

    transition:
        opacity 0.35s ease,
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}


/* =========================================================
   PANEL HEADING WRAP
   ========================================================= */

.sv-buying-guide-panel__heading-wrap {
    display:
        flex;

    flex-direction:
        column;

    gap:
        6px;

    min-width:
        0;
}


/* =========================================================
   PANEL HEADING
   ========================================================= */

.sv-buying-guide-panel__heading {
    display:
        block;

    min-width:
        0;

    font-size:
        clamp(20px, 2.15vw, 29px);

    line-height:
        1.04;

    letter-spacing:
        -0.038em;

    font-weight:
        500;

    opacity:
        0.91;

    transform:
        translateX(0);

    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.4s ease;
}


/* =========================================================
   PANEL DESCRIPTION

   Supports:
   - existing __description
   - legacy __subheading
   ========================================================= */

.sv-buying-guide-panel__description,
.sv-buying-guide-panel__subheading {
    display:
        block;

    max-width:
        620px;

    font-size:
        11px;

    line-height:
        1.55;

    letter-spacing:
        0.005em;

    opacity:
        0.48;

    transition:
        opacity 0.35s ease;
}


/* =========================================================
   DIRECTIONAL CONTROL
   ========================================================= */

.sv-buying-guide-panel__direction {
    position:
        relative;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    justify-self:
        end;

    width:
        33px;

    height:
        33px;

    border:
        1px solid rgba(0, 0, 0, 0.15);

    border-radius:
        50%;

    font-size:
        15px;

    line-height:
        1;

    font-weight:
        400;

    opacity:
        0.54;

    transform:
        translate3d(0, 0, 0) rotate(0deg);

    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.45s ease,
        background 0.35s ease;
}


/* =========================================================
   DIRECTIONAL INNER LIGHT
   ========================================================= */

.sv-buying-guide-panel__direction::after {
    content:
        "";

    position:
        absolute;

    inset:
        -1px;

    border-radius:
        inherit;

    pointer-events:
        none;

    opacity:
        0;

    background:
        linear-gradient(135deg,
            transparent 28%,
            rgba(92, 145, 196, 0.34) 50%,
            transparent 72%);

    transition:
        opacity 0.4s ease;
}


/* =========================================================
   PANEL HOVER
   ========================================================= */

.sv-buying-guide [data-buying-guide-trigger]:hover .sv-buying-guide-panel__index {
    opacity:
        0.7;

    transform:
        translateX(2px);
}


.sv-buying-guide [data-buying-guide-trigger]:hover .sv-buying-guide-panel__heading {
    opacity:
        1;

    transform:
        translateX(4px);
}


.sv-buying-guide [data-buying-guide-trigger]:hover .sv-buying-guide-panel__description,

.sv-buying-guide [data-buying-guide-trigger]:hover .sv-buying-guide-panel__subheading {
    opacity:
        0.64;
}


.sv-buying-guide [data-buying-guide-trigger]:hover .sv-buying-guide-panel__direction {
    opacity:
        1;

    border-color:
        rgba(72, 126, 177, 0.6);

    background:
        rgba(255, 255, 255, 0.42);

    box-shadow:
        0 0 0 3px rgba(72, 126, 177, 0.045),
        0 5px 16px rgba(0, 0, 0, 0.045);

    transform:
        translate3d(2px, -2px, 0) rotate(0deg);
}


.sv-buying-guide [data-buying-guide-trigger]:hover .sv-buying-guide-panel__direction::after {
    opacity:
        1;
}


/* =========================================================
   FOCUS
   ========================================================= */

.sv-buying-guide [data-buying-guide-trigger]:focus-visible {
    outline:
        none;

    box-shadow:
        inset 0 0 0 1px rgba(72, 126, 177, 0.55);
}


/* =========================================================
   PANEL OPEN
   ========================================================= */

.sv-buying-guide [data-buying-guide-panel].is-open [data-buying-guide-trigger] {
    padding-bottom:
        28px;
}


.sv-buying-guide [data-buying-guide-panel].is-open .sv-buying-guide-panel__index {
    opacity:
        0.76;

    transform:
        translateX(2px);
}


.sv-buying-guide [data-buying-guide-panel].is-open .sv-buying-guide-panel__heading {
    opacity:
        1;

    transform:
        translateX(4px);
}


.sv-buying-guide [data-buying-guide-panel].is-open .sv-buying-guide-panel__direction {
    opacity:
        1;

    border-color:
        rgba(72, 126, 177, 0.54);

    background:
        rgba(255, 255, 255, 0.38);

    box-shadow:
        0 0 0 3px rgba(72, 126, 177, 0.04);

    transform:
        translate3d(0, 0, 0) rotate(90deg);
}


/* =========================================================
   PANEL CONTENT
   ========================================================= */

.sv-buying-guide-panel__content {
    display: none;

    width: 100%;

    overflow: hidden;

    opacity: 0;
}


/* =========================================================
   PANEL CONTENT — VISIBLE
   ========================================================= */

.sv-buying-guide [data-buying-guide-panel].is-open .sv-buying-guide-panel__content {

    display: block;

    opacity: 1;

    animation:
        sv-buying-guide-panel-content-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}


/* =========================================================
   PANEL CONTENT INNER SPACING
   ========================================================= */

.sv-buying-guide [data-buying-guide-panel].is-open .sv-buying-guide-panel__content>* {

    padding-bottom:
        52px;
}


/* =========================================================
   PANEL CONTENT ENTER
   ========================================================= */

@keyframes sv-buying-guide-panel-content-in {

    from {
        opacity: 0;

        transform:
            translateY(-8px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }

}


/* =========================================================
   PANEL CONTENT — CLOSED
   ========================================================= */

.sv-buying-guide-panel__content[hidden] {
    display: none !important;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .sv-buying-guide [data-buying-guide-panel].is-open .sv-buying-guide-panel__content>* {

        padding-bottom:
            34px;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .sv-buying-guide [data-buying-guide-panel].is-open .sv-buying-guide-panel__content {

        animation: none;
    }

}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .sv-buying-guide [data-buying-guide-trigger] {

        grid-template-columns:
            34px minmax(0, 1fr) 36px;

        min-height:
            72px;

        padding:
            17px 0;
    }


    .sv-buying-guide-panel__index {
        font-size:
            8px;

        letter-spacing:
            0.17em;
    }


    .sv-buying-guide-panel__heading {
        font-size:
            clamp(18px, 5.1vw, 22px);

        line-height:
            1.07;

        letter-spacing:
            -0.027em;
    }


    .sv-buying-guide-panel__description,
    .sv-buying-guide-panel__subheading {
        max-width:
            92%;

        font-size:
            10px;

        line-height:
            1.5;
    }


    .sv-buying-guide-panel__direction {
        width:
            29px;

        height:
            29px;

        font-size:
            13px;
    }


    .sv-buying-guide [data-buying-guide-panel].is-open [data-buying-guide-trigger] {
        padding-bottom:
            23px;
    }


    .sv-buying-guide [data-buying-guide-panel].is-open .sv-buying-guide-panel__content>* {
        padding-bottom:
            32px;
    }


    .sv-buying-guide [data-buying-guide-trigger]:hover .sv-buying-guide-panel__direction {
        transform:
            none;

        box-shadow:
            none;
    }


    .sv-buying-guide [data-buying-guide-trigger]:hover .sv-buying-guide-panel__heading {
        transform:
            none;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .sv-buying-guide [data-buying-guide-trigger],

    .sv-buying-guide-panel__index,

    .sv-buying-guide-panel__heading,

    .sv-buying-guide-panel__description,

    .sv-buying-guide-panel__subheading,

    .sv-buying-guide-panel__direction,

    .sv-buying-guide-panel__content {

        transition-duration:
            0.01ms !important;
    }

}