/**
 * VoiceX - Text Reader Component Stylesheet
 * Theme: Pengadilan Negeri Red (pn-red)
 * Package: PN-RED Suite
 */

/* 1. Highlight Teks yang Sedang Dibaca */
.c-voicex-reading {
    background-color: rgba(154, 33, 9, 0.12) !important;
    outline: 2px solid rgba(154, 33, 9, 0.38) !important;
    outline-offset: 3px !important;
    border-radius: 4px !important;
    box-shadow: 0 0 12px rgba(154, 33, 9, 0.12) !important;
    transition: background-color 0.2s ease, outline-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* 2. Floating Player Controls */
.c-voicex-controls {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-left: 4px solid #9a2109;
    padding: 10px 16px;
    border-radius: 50px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 13px;
    color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.95);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
    pointer-events: none;
    user-select: none;
}

.c-voicex-controls.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Sound Wave / Speaker Indicator */
.c-voicex-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #9a2109;
    color: #ffffff;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(154, 33, 9, 0.35);
}

.c-voicex-indicator svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.c-voicex-indicator.is-playing {
    animation: cvoicexPulse 1.4s ease-in-out infinite;
}

@keyframes cvoicexPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(154, 33, 9, 0.5);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 0 6px rgba(154, 33, 9, 0);
    }
}

/* Status Text Info */
.c-voicex-info {
    display: flex;
    flex-direction: column;
    min-width: 80px;
    line-height: 1.25;
}

.c-voicex-title {
    font-weight: 700;
    font-size: 12px;
    color: #9a2109;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.c-voicex-status {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

/* Action Buttons Container */
.c-voicex-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.c-voicex-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
    line-height: 1;
}

.c-voicex-btn:active {
    transform: scale(0.96);
}

.c-voicex-btn-pause {
    background: #f1f5f9;
    color: #334155;
}

.c-voicex-btn-pause:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.c-voicex-btn-stop {
    background: #fee2e2;
    color: #991b1b;
}

.c-voicex-btn-stop:hover {
    background: #fecaca;
    color: #7f1d1d;
}

.c-voicex-btn svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* Responsive adjustment */
@media (max-width: 640px) {
    .c-voicex-controls {
        bottom: 16px;
        right: 16px;
        left: 16px;
        justify-content: space-between;
        border-radius: 16px;
        padding: 8px 12px;
    }
}
