/**
 * ==========================================================================
 * VASS PUBLIC PRODUCT OPTIONS
 *
 * Pill-style size display for logged-out visitors.
 * ==========================================================================
 */


/* --------------------------------------------------------------------------
   Main options area
   -------------------------------------------------------------------------- */

.public-product-options {
    width: 100%;
    margin: 18px 0 36px;
}

.public-product-options .product-page-sub-sub {
    margin: 0 0 18px;
}


/* --------------------------------------------------------------------------
   Option groups
   -------------------------------------------------------------------------- */

.public-option-group {
    width: 100%;
}

.public-option-group + .public-option-group {
    margin-top: 38px;
}


/* --------------------------------------------------------------------------
   Four-column grid
   -------------------------------------------------------------------------- */

.public-option-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 10px;
    width: 100%;
}


/* --------------------------------------------------------------------------
   Shared pill design
   -------------------------------------------------------------------------- */

.public-option-pill {
    /*
     * Default resting glow for all pill types.
     */
    --pill-glow: 176, 201, 214;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;

    height: 60px;
    min-height: 60px;

    padding: 6px 10px;
    gap: 4px;

    box-sizing: border-box;
    overflow: hidden;

    border: 1px solid rgba(var(--pill-glow), 0.42);
    border-radius: 999px;

    background-color: #666666;
    color: #ffffff;

    box-shadow:
        0 0 0 1px rgba(var(--pill-glow), 0.10),
        0 0 9px rgba(var(--pill-glow), 0.22);

    text-align: center;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.1;
    text-transform: uppercase;

    cursor: default;
    user-select: none;

    transform: translateY(0) scale(1);

    transition:
        transform 180ms ease,
        background-color 220ms ease,
        color 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease,
        filter 220ms ease;

    will-change:
        transform,
        background-color,
        color,
        box-shadow;
}


/* --------------------------------------------------------------------------
   All pill types share the same resting appearance
   -------------------------------------------------------------------------- */

.public-option-pill--standard,
.public-option-pill--studded,
.public-option-pill--mega-stud {
    background-color: #666666;
    color: #ffffff;
}


/* --------------------------------------------------------------------------
   Text inside each pill
   -------------------------------------------------------------------------- */

.public-option-pill__type,
.public-option-pill__size {
    display: block;
    max-width: 100%;
    margin: 0;

    color: inherit;
    font: inherit;
    line-height: 1.1;

    white-space: nowrap;
}


/* --------------------------------------------------------------------------
   Hover bounce
   -------------------------------------------------------------------------- */

@keyframes public-option-pill-bounce {
    0% {
        transform: translateY(0) scale(1);
    }

    35% {
        transform: translateY(-7px) scale(1.035);
    }

    55% {
        transform: translateY(-1px) scale(0.995);
    }

    75% {
        transform: translateY(-4px) scale(1.018);
    }

    100% {
        transform: translateY(-2px) scale(1.01);
    }
}


/*
 * Only use hover effects on devices with a mouse or trackpad.
 */
@media (hover: hover) and (pointer: fine) {

    .public-option-pill:hover {
        animation:
            public-option-pill-bounce
            520ms
            cubic-bezier(0.22, 0.8, 0.28, 1)
            both;

        filter: brightness(1.03);
    }


    /* Normal / standard sole */
    .public-option-pill--standard:hover {
        --pill-glow: 251, 199, 21;

        background-color: #fbc715;
        color: #43631f;

        border-color: rgba(var(--pill-glow), 0.72);

        box-shadow:
            0 0 0 1px rgba(var(--pill-glow), 0.62),
            0 0 16px rgba(var(--pill-glow), 0.50);
    }


    /* Studded sole */
    .public-option-pill--studded:hover {
        --pill-glow: 67, 99, 31;

        background-color: #43631f;
        color: #fbc715;

        border-color: rgba(var(--pill-glow), 0.78);

        box-shadow:
            0 0 0 1px rgba(var(--pill-glow), 0.68),
            0 0 16px rgba(var(--pill-glow), 0.55);
    }


    /* Mega-Stud sole */
    .public-option-pill--mega-stud:hover {
        --pill-glow: 251, 199, 21;

        background-color: #111111;
        color: #fbc715;

        border-color: rgba(var(--pill-glow), 0.70);

        box-shadow:
            0 0 0 1px rgba(var(--pill-glow), 0.62),
            0 0 16px rgba(var(--pill-glow), 0.48);
    }
}


/* --------------------------------------------------------------------------
   Tablet
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .public-option-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .public-option-group + .public-option-group {
        margin-top: 30px;
    }
}


/* --------------------------------------------------------------------------
   Small mobile screens
   -------------------------------------------------------------------------- */

@media (max-width: 479.98px) {
    .public-product-options {
        margin-bottom: 28px;
    }

    .public-option-grid {
        column-gap: 8px;
        row-gap: 8px;
    }

    .public-option-pill {
        height: 56px;
        min-height: 56px;
        padding: 5px 8px;
        font-size: 12px;
    }
}


/* --------------------------------------------------------------------------
   Accessibility: reduce motion when requested by the visitor
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .public-option-pill {
        transition:
            background-color 220ms ease,
            color 220ms ease,
            border-color 220ms ease,
            box-shadow 220ms ease;
    }

    .public-option-pill:hover {
        animation: none;
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   Mobile tap / press effects
   -------------------------------------------------------------------------- */

@media (hover: none), (pointer: coarse) {

    .public-option-pill {
        /*
         * Helps mobile browsers treat the pill as an interactive tap target.
         */
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .public-option-pill:active {
        animation:
            public-option-pill-mobile-bounce
            420ms
            cubic-bezier(0.22, 0.8, 0.28, 1)
            both;

        filter: brightness(1.03);
    }

    /* Normal / standard sole */
    .public-option-pill--standard:active {
        --pill-glow: 251, 199, 21;

        background-color: #fbc715;
        color: #43631f;

        border-color: rgba(var(--pill-glow), 0.72);

        box-shadow:
            0 0 0 1px rgba(var(--pill-glow), 0.62),
            0 0 16px rgba(var(--pill-glow), 0.50);
    }

    /* Studded sole */
    .public-option-pill--studded:active {
        --pill-glow: 67, 99, 31;

        background-color: #43631f;
        color: #fbc715;

        border-color: rgba(var(--pill-glow), 0.78);

        box-shadow:
            0 0 0 1px rgba(var(--pill-glow), 0.68),
            0 0 16px rgba(var(--pill-glow), 0.55);
    }

    /* Mega-Stud sole */
    .public-option-pill--mega-stud:active {
        --pill-glow: 251, 199, 21;

        background-color: #111111;
        color: #fbc715;

        border-color: rgba(var(--pill-glow), 0.70);

        box-shadow:
            0 0 0 1px rgba(var(--pill-glow), 0.62),
            0 0 16px rgba(var(--pill-glow), 0.48);
    }
}


/* A smaller press animation works better on touchscreens. */
@keyframes public-option-pill-mobile-bounce {
    0% {
        transform: translateY(0) scale(1);
    }

    35% {
        transform: translateY(-4px) scale(1.025);
    }

    65% {
        transform: translateY(1px) scale(0.985);
    }

    100% {
        transform: translateY(-1px) scale(1.01);
    }
}

/* --------------------------------------------------------------------------
   Sole-type group headings
   -------------------------------------------------------------------------- */

.public-option-group-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 14px;
}

.public-option-group-title {
    flex: 0 0 auto;
    margin: 0;

    color: #fbc715;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.public-option-group-divider {
    display: block;
    flex: 1 1 auto;
    height: 1px;

    background: linear-gradient(
        90deg,
        rgba(251, 199, 21, 0.65),
        rgba(251, 199, 21, 0.08)
    );
}