/**
 * 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.3px;
    text-transform: none;
}

.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-controls .c-voicex-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

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

.c-voicex-controls .c-voicex-btn span {
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
}

.c-voicex-controls .c-voicex-btn svg {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0 !important;
}

/* Tombol Jeda (Pause / Lanjutkan) - Teks Gelap Kontras Jelas */
.c-voicex-controls .c-voicex-btn-pause {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

.c-voicex-controls .c-voicex-btn-pause span {
    color: #0f172a !important;
}

.c-voicex-controls .c-voicex-btn-pause svg {
    fill: #0f172a !important;
    color: #0f172a !important;
}

.c-voicex-controls .c-voicex-btn-pause:hover {
    background: #e2e8f0 !important;
    color: #000000 !important;
    border-color: #94a3b8 !important;
}

.c-voicex-controls .c-voicex-btn-pause:hover span {
    color: #000000 !important;
}

.c-voicex-controls .c-voicex-btn-pause:hover svg {
    fill: #000000 !important;
}

/* Tombol Berhenti (Stop) - Teks Merah Gelap Kontras Jelas */
.c-voicex-controls .c-voicex-btn-stop {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}

.c-voicex-controls .c-voicex-btn-stop span {
    color: #991b1b !important;
}

.c-voicex-controls .c-voicex-btn-stop svg {
    fill: #991b1b !important;
    color: #991b1b !important;
}

.c-voicex-controls .c-voicex-btn-stop:hover {
    background: #fecaca !important;
    color: #7f1d1d !important;
    border-color: #f87171 !important;
}

.c-voicex-controls .c-voicex-btn-stop:hover span {
    color: #7f1d1d !important;
}

.c-voicex-controls .c-voicex-btn-stop:hover svg {
    fill: #7f1d1d !important;
}

/* 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;
    }
}
