/**
 * CSS Frontend para VoxAI.
 * High-Fidelity Design System - Mockup Matching
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@700;800&display=swap');

:root {
    --voxai-primary: #8B5CF6;
    --voxai-secondary: #3B82F6;
    --voxai-bg-dark: #0A0A0A;
    --voxai-card-bg: #141414;
    --voxai-card-inner: #1C1C1E;
    --voxai-text-main: #FFFFFF;
    --voxai-text-muted: #A1A1AA;
    --voxai-border: #27272A;
    --voxai-font-headline: 'Manrope', sans-serif;
    --voxai-font-body: 'Inter', sans-serif;
    --voxai-zindex: 999999;
}

/* Scoped box-sizing reset — does not affect the rest of the theme */
.voxai-container *,
.voxai-container *::before,
.voxai-container *::after {
    box-sizing: border-box;
}

.voxai-container {
    margin: 32px 0;
    font-family: var(--voxai-font-body);
    width: 100%;
}

/* --- PREMIUM PLAYER CARD (MOCKUP STYLE) --- */
.voxai-player-card {
    background-color: var(--voxai-card-bg);
    border: 1px solid var(--voxai-border);
    border-radius: 12px;
    padding: 24px 28px;
    color: var(--voxai-text-main);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 16px;
}

.voxai-player-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.voxai-player-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #A78BFA 0%, #60A5FA 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    flex-shrink: 0;
}

.voxai-player-title {
    font-family: var(--voxai-font-headline);
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.voxai-player-meta {
    font-size: 13px;
    color: var(--voxai-text-muted);
}

/* Custom Player Area */
.voxai-custom-player {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Single Line Progress Bar */
.voxai-progress-bar {
    width: 100%;
    height: 6px;
    background: #27272A;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
}

.voxai-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #A78BFA; /* Solid color matched to bar in image */
    border-radius: 10px;
    width: 0%;
}

/* Controls Horizontal Row */
.voxai-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.voxai-side-controls {
    display: flex;
    align-items: center;
    width: 100px; /* Fixed side width to prevent pushing */
}

.voxai-side-controls:last-child {
    justify-content: flex-end;
}

.voxai-main-controls {
    display: flex;
    align-items: center;
    gap: 24px;
}

.voxai-control-btn {
    background: transparent;
    border: none;
    color: var(--voxai-text-muted);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.voxai-control-btn:hover {
    color: var(--voxai-text-main);
}

.voxai-btn-play {
    width: 48px;
    height: 48px;
    background: #FFFFFF;
    color: #000000 !important;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}

.voxai-volume-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    background: rgba(255, 255, 255, 0.1); 
    padding: 2px;
    border-radius: 20px;
    height: 32px;
    transition: background 0.3s ease;
}

.voxai-volume-wrapper:hover {
    background: rgba(255, 255, 255, 0.2);
}

.voxai-theme-light .voxai-volume-wrapper {
    background: rgba(0, 0, 0, 0.08); /* Darker background for visibility */
}
.voxai-theme-light .voxai-volume-wrapper:hover {
    background: rgba(0, 0, 0, 0.12);
}

.voxai-volume-slider-container {
    position: absolute;
    left: 32px;
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    height: 100%;
    padding: 0;
    border-radius: 20px;
}

.voxai-volume-wrapper:hover .voxai-volume-slider-container {
    width: 80px;
    opacity: 1;
    pointer-events: auto;
    padding: 0 10px;
}

#voxai-volume-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #3F3F46;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.voxai-theme-light #voxai-volume-slider {
    background: #D1D5DB;
}

#voxai-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: #FFFFFF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.voxai-theme-light #voxai-volume-slider::-webkit-slider-thumb {
    background: var(--voxai-primary);
}

#voxai-volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #FFFFFF;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.voxai-time-display {
    display: flex;
    justify-content: flex-start;
    font-size: 11px;
    color: var(--voxai-text-muted);
    /* margin-top: 4px;
    margin-bottom: 4px; */
    font-weight: 500;
    line-height: 1;
}

/* --- ACCORDION SUMMARY --- */
.voxai-summary-accordion {
    width: 100%;
}

.voxai-btn-summary {
    width: 100%;
    background: var(--voxai-card-bg);
    color: var(--voxai-text-main);
    border: 1px solid var(--voxai-border);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    transition: all 0.3s ease;
}

.voxai-btn-summary:focus {
    outline-width: 0;
}

.voxai-btn-summary > span:first-of-type {
    display: flex;
    align-items: center;
    gap: 12px;
}

.voxai-btn-summary:hover:not([aria-expanded="true"]) {
    border-color: var(--voxai-primary);
}

.voxai-chevron {
    transition: transform 0.3s ease;
    color: var(--voxai-text-muted);
    margin-left: auto;
}

.voxai-btn-summary[aria-expanded="true"] .voxai-chevron {
    transform: rotate(180deg);
}

.voxai-accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease, margin 0.3s ease;
    background: var(--voxai-card-bg);
    border: 0 solid var(--voxai-border); 
    border-radius: 0 0 12px 12px;
    margin-top: -12px;
    opacity: 0;
    pointer-events: none;
}

.voxai-btn-summary[aria-expanded="true"] {
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #1C1C1E;
}

.voxai-accordion-panel.is-active {
    opacity: 1;
    margin-top: 0;
    border-width: 1px;
    border-top: none;
    pointer-events: auto;
}

.voxai-panel-content {
    padding: 24px 28px;
    line-height: 1.8;
    font-size: 16px;
    color: var(--voxai-text-muted);
    text-align: left;
}

.voxai-panel-content p {
    margin: 0;
}

/* Loader */
.voxai-pulse {
    width: 40px;
    height: 40px;
    background: var(--voxai-primary);
    border-radius: 50%;
    animation: voxaiPulse 1.5s infinite ease-out;
    margin: 20px auto;
}

@keyframes voxaiPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.2; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

@media (max-width: 600px) {
    .voxai-player-card { padding: 24px; }
    .voxai-main-controls { gap: 12px; }
    .voxai-player-icon { display: none; }
}

