/* ========================================
   ANIMACIONES
   ======================================== */

/* Animación de pulso para el botón de grabación */
@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.recording-pulse {
    animation: pulse-ring 2s infinite;
}

/* Animaciones de transición entre páginas */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.page-exit {
    animation: fadeOut 0.3s ease-out forwards;
}

.page-enter {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Animación de spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ========================================
   UTILIDADES
   ======================================== */

/* Ocultar elementos */
.hidden {
    display: none;
}

/* ========================================
   SCROLLBAR PERSONALIZADO
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ========================================
   MEJORAS DE FORMULARIOS
   ======================================== */

input:focus {
    outline: none;
}

input[type="password"],
input[type="text"] {
    transition: border-color 0.2s ease;
}

/* ========================================
   BOTONES
   ======================================== */

button {
    transition: all 0.3s ease;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

button:not(:disabled):active {
    transform: scale(0.98);
}

/* ========================================
   DETALLES/ACORDEÓN
   ======================================== */

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    margin-bottom: 0;
}

/* ========================================
   LIVE TRANSCRIPT BOX
   ======================================== */

.live-transcript-container {
    scroll-behavior: smooth;
    transition: border-color 0.3s ease;
}

.live-transcript-container:hover {
    border-color: rgba(16, 185, 129, 0.5);
}

/* Glow sutil cuando está activo */
@keyframes live-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.1);
    }

    50% {
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    }
}

.live-transcript-container {
    animation: live-glow 3s ease-in-out infinite;
}

/* ========================================
   RESPONSIVIDAD
   ======================================== */

@media (max-width: 768px) {
    #recordBtn {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }

    .p-12 {
        padding: 2rem;
    }
}