/**
 * static/css/style.css
 * Fixed height and status visibility
 */

.custom-scroll::-webkit-scrollbar {
    width: 2px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

/* Word List Item Design */
.word-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #f8fafc;
    background: #ffffff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: #475569;
}

.word-link:hover {
    border-color: #e2e8f0;
    background: #fcfcfd;
}

.active-selection {
    border-color: #0ea5e9 !important;
    background-color: #0ea5e9 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2) !important;
}

/* Status: Completed Word */
.word-link.word-submitted {
    background-color: #f0fdf4;
    border-color: #dcfce7;
    color: #166534;
    opacity: 0.8;
}

.word-link.word-submitted .status-icon {
    color: #22c55e;
}

.word-link.word-submitted.active-selection {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
    color: #fff !important;
}

.word-link.word-submitted.active-selection .status-icon {
    color: #fff;
}

/* Status Icon Styling */
.status-icon {
    font-size: 9px;
}

#difference-waveform-container .stage-layer {
    position: absolute;
    inset: 0;
}

#difference-waveform-container canvas {
    border-radius: 1rem;
    width: 100% !important;
}

#test-type {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 0.5rem;
}

/* Processing Overlay */
.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    /* Semi-transparent white */
    backdrop-filter: blur(4px);
    /* Blur effect */
    z-index: 50;
    /* Above canvases */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    transition: opacity 0.3s ease;
}

.processing-spinner {
    border: 3px solid #e2e8f0;
    border-top: 3px solid #6366f1;
    /* Indigo */
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Score Colors (Feedback) */
.score-success {
    color: #16a34a !important;
    font-weight: 800;
}

/* emerald-600 */
.score-warning {
    color: #ca8a04 !important;
    font-weight: 800;
}

/* yellow-600 */
.score-danger {
    color: #dc2626 !important;
    font-weight: 800;
}

/* red-600 */

/* FORCE CROSS-BROWSER CONSISTENCY */
html {
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    touch-action: pan-x pan-y;
    /* Disable pinch zoom actions via CSS */
    height: 100%;
    /* LOCK ROOT SIZE: Ensures 1rem = 16px everywhere */
    font-size: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    /* Force consistent padding math */
}

body {
    overscroll-behavior: none;
    /* Prevent bounce effects */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Consistency Fixes */
    line-height: 1.5;
    letter-spacing: normal;
    text-rendering: optimizeLegibility;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}