/* Shared accessibility (WAVE) widget — Lux + modern storefront */

.sf-wave--fixed {
    position: fixed;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Floating dock: accessibility (left) + live-chat (right), side by side */
.sf-floating-widgets {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 10040;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 0.75rem;
    pointer-events: none;
}

.sf-floating-widgets > * {
    pointer-events: auto;
}

.sf-floating-widgets .sf-wave--docked {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.sf-floating-widgets .pf-help-chat {
    position: relative;
    right: auto;
    bottom: auto;
    z-index: 2;
}

body.lux-body .lux-floating-widgets .sf-wave--lux {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

@media (max-width: 899px) {
    body.lux-body .lux-floating-widgets .sf-wave--lux {
        align-items: flex-start;
    }
}

.sf-wave__trigger {
    position: relative;
    z-index: 2;
    min-width: 52px;
    height: 52px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sf-wave__trigger:hover {
    transform: translateY(-1px);
    box-shadow:
        0 16px 36px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.sf-wave__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    left: auto;
    top: auto;
    width: min(360px, calc(100vw - 2rem));
    margin: 0;
    z-index: 10060;
    padding: 1.1rem 1.15rem 1rem;
    background: linear-gradient(165deg, #111b2e 0%, #0b1220 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sf-wave__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sf-wave__title {
    display: block;
    font-size: 1rem;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

.sf-wave__subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #94a3b8;
}

.sf-wave__close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.sf-wave__close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sf-wave__score-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}

.sf-wave__score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.1rem;
    height: 2rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.sf-wave__score--ok {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.sf-wave__score--warn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.sf-wave__score--bad {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.sf-wave__score-caption {
    font-size: 0.82rem;
    color: #94a3b8;
}

.sf-wave__stats {
    list-style: none;
    margin: 0 0 0.95rem;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.sf-wave__stats li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.84rem;
}

.sf-wave__stats li > span {
    color: #94a3b8;
}

.sf-wave__stats li > strong {
    color: #f1f5f9;
    font-weight: 600;
    text-align: right;
}

.sf-wave__mail {
    color: #93c5fd !important;
    text-decoration: none;
}

.sf-wave__mail:hover {
    color: #bfdbfe !important;
    text-decoration: underline;
}

.sf-wave__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sf-wave__action {
    min-height: 2.35rem;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.sf-wave__action:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(147, 197, 253, 0.35);
}

.sf-wave__action--reset {
    grid-column: 1 / -1;
    color: #93c5fd;
    background: transparent;
    border-style: dashed;
}

@media (max-width: 767px) {
    body.lux-body .sf-wave--lux .sf-wave__panel:not([hidden]),
    body.app-shell .sf-wave--docked .sf-wave__panel:not([hidden]),
    body.app-shell .sf-wave--fixed .sf-wave__panel:not([hidden]) {
        position: fixed;
        left: max(0.85rem, env(safe-area-inset-left, 0px));
        right: max(0.85rem, env(safe-area-inset-right, 0px));
        bottom: calc(3.35rem + env(safe-area-inset-bottom, 0px));
        width: auto;
        max-width: none;
        max-height: min(72vh, 440px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
