:root {
    --voice-accent-color: #ff6600;
    /* Toneart Orange */
    --voice-accent-hover: #e65c00;
    --voice-glow: 0 0 15px rgba(255, 102, 0, 0.4);
    --voice-text-color: #fff;
    --voice-bg-dark: #1a1a1a;
}

.voice-enabled-block {
    position: relative !important;
    /* Force relative to contain absolute buttons */
}

.voice-player-container {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 20;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.voice-controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* --- Play Button --- */
.voice-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ff6a00 !important;
    color: white !important;
    border: none !important;
    border-radius: 50px;
    padding: 10px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 106, 0, 0.4);
    transition: all 0.3s ease;
    white-space: nowrap;
    text-transform: none;
    /* Changed from uppercase if it was set */
    min-width: 260px;
    /* Ensure wide enough */
}

/* New Stacked Layout Styles */
.voice-play-btn .voice-btn-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-left: 12px;
    line-height: 1.2;
}

.voice-play-btn .voice-btn-title {
    font-size: 19px;
    font-weight: 700;
    display: block;
}

.voice-play-btn .voice-btn-subtitle {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.95;
    display: block;
}

/* .voice-play-btn:hover {
    background: linear-gradient(135deg, #ff7700 0%, #ff6600 100%);
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 0 25px rgba(255, 102, 0, 0.8), 0 6px 15px rgba(0, 0, 0, 0.25);
}

.voice-play-btn:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
} */

.voice-btn-icon svg {
    width: 40px;
    height: 40px;
    fill: #ffffff;
}

/* --- Active Controls Container --- */
.voice-active-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 6px 12px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    animation: voice-fade-in 0.3s ease-out;
}

.voice-active-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--voice-accent-color);
    padding-right: 12px;
    border-right: 1px solid #eee;
}

.voice-active-status svg {
    width: 18px;
    height: 18px;
    animation: voice-pulse 2s infinite;
}

/* --- Control Buttons (Pause/Stop) --- */
.voice-control-btn {
    appearance: none;
    background: transparent;
    border: none;
    color: #333;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-control-btn:hover {
    background: #f5f5f5;
    color: var(--voice-accent-color);
}

.voice-control-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* --- Hover Overlay --- */
.voice-hover-overlay {
    position: absolute;
    bottom: 120%;
    right: 0;
    left: auto;
    width: 280px;
    background: #0F0F0F;
    color: #fff;
    padding: 14px 16px;
    border-radius: 16px;
    box-shadow: 0 0 18px rgba(245, 166, 35, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
    z-index: 1000;
    pointer-events: none;
    text-align: left;
    border: 0.5px solid #F5A623;
}

.voice-hover-overlay.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

.voice-hover-overlay::after {
    content: '';
    position: absolute;
    top: 100%;
    left: auto;
    right: 20px;
    border-width: 6px;
    border-style: solid;
    border-color: #FF8A1F transparent transparent transparent;
}

.voice-overlay-headline {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 9px;
    color: #ffffff;
    /* border-bottom: 1px solid #FF8A1F; */
    /* padding-bottom: 9px; */
    /* position: relative; */
}

/* .voice-overlay-headline:after {
    content: "";
    bottom: -2.1px;
    position: absolute;
    height: 3.8px;
    width: 100%;
    background: #FF8A1F;
    left: 0;
    right: 0;
    max-width: 50px;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 138, 0, 0.25);
    display: block;
} */

.voice-overlay-subline {
    font-size: 14px;
    line-height: 1.45;
    color: #E6E6E6;
    font-weight: 500;
}


/* .light-mode .voice-overlay-subline,
.light-mode .voice-overlay-headline {
    color: #000;
} */

svg.headphone-svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    position: relative;
    top: 3px;
    fill: #F5A623;
}

/* .light-mode svg.headphone-svg {
    fill: #000;
} */


@media screen and (min-width:769px) {
    .product.attribute.overview .voice-player-container {
        top: 15px;
        right: 15px;
    }
    .product.attribute.description .value {
        padding-top: 15px;
    }
}

/* --- Loading State --- */
.voice-loading-state {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: #fff;
    border-radius: 50px;
    border: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.voice-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid #333;
    border-top-color: var(--voice-accent-color);
    border-radius: 50%;
    animation: voice-spin 1s linear infinite;
    flex-shrink: 0;
}

.voice-loading-text {
    font-size: 12px;
    color: #555;
    line-height: 1.3;
}

.voice-countdown {
    font-size: 14px;
    font-weight: 700;
    color: var(--voice-accent-color);
    width: 20px;
    text-align: center;
}

/* --- Animations --- */
@keyframes voice-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes voice-fade-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes voice-pulse {
    0% {
        opacity: 0.6;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    100% {
        opacity: 0.6;
        transform: scale(0.95);
    }
}

/* --- Mobile / Responsive Tweaks --- */
@media (max-width: 768px) {
    .voice-player-container {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin-bottom: 25px;
        /* Push content down */
    }

    .voice-controls-wrapper {
        justify-content: flex-end;
    }

    .voice-play-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        /* Larger touch area */
    }

    .voice-active-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* --- Dark Mode Support --- */
@media (prefers-color-scheme: dark) {

    .voice-active-controls,
    .voice-loading-state {
        background: #2a2a2a;
        border-color: #444;
    }

    .voice-control-btn {
        color: #eee;
    }

    .voice-control-btn:hover {
        background: #333;
    }

    .voice-loading-text {
        color: #bbb;
    }
}


.product.attribute.description .voice-hover-overlay {
    top: 130%;
    bottom: auto;
    background: #000;
}

/* .light-mode .product.attribute.description .voice-hover-overlay {
    background: #fff;
} */

.product.attribute.description .voice-hover-overlay::after {
    content: '';
    top: -13px;
    border-color: transparent transparent #FF8A1F transparent;
}

/* .product.attribute.description .voice-play-btn:hover {
    transform: translateY(0px) scale(1);
} */

.catalog-product-view:not(.light-mode) .product.attribute.overview .voice-btn-text span {
    color: #fff !important;
}

.ein-moment {
    border-block: 1px solid #dab879;
    margin-block: 9px !important;
    display: block;
    padding-bottom: 6px;
}