﻿/* ================================================
   traduccion.css — exclusivo de TraduccionTexto
   Importar ÚLTIMO
   ================================================ */

/* ── TARJETA PRINCIPAL ── */
.card-principal {
    background-color: #ffffff !important;
    background-image: none !important;
    border: 1px solid #e8f0f5 !important;
    box-shadow: 0 2px 8px rgba(0, 88, 122, 0.07) !important;
    border-radius: 16px !important;
    width: 90% !important;
    margin: 10px auto 20px !important;
}

/* ── UNA SOLA COLUMNA ── */
.card-columns {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.column-left,
.column-right {
    width: 100% !important;
    max-width: 600px !important;
    padding: 16px 20px !important;
}

/* ── ANCHO SIMÉTRICO: textarea, botones y resultado ── */
#textoFinal,
.button-container,
#textoResultado {
    width: 80% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ── TEXTAREA ── */
#textoFinal {
    text-align: left !important;
    vertical-align: top !important;
    display: block !important;
    padding-top: 0.5rem !important;
    padding-left: 0.5rem !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    height: 72px !important;
    border: 1.5px solid #b5d4f4 !important;
    border-radius: 10px !important;
    background: #f8fbfe !important;
    transition: border-color .2s !important;
}

    #textoFinal:focus {
        border-color: #00587a !important;
        box-shadow: 0 0 0 3px rgba(0, 88, 122, 0.1) !important;
        outline: none !important;
    }

    /* Placeholder en contenteditable */
    #textoFinal:empty::before {
        content: attr(data-placeholder);
        color: #b0cdd8;
        font-size: 0.78rem;
        text-transform: none;
        pointer-events: none;
    }

/* ── BOTONES ── */
.button-container {
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
    margin-top: 8px !important;
}

#botonTraducir {
    flex: 7 !important;
    background: linear-gradient(135deg, #0F6E56, #00587a) !important;
    border: none !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    padding: 8px 12px !important;
    letter-spacing: .03em !important;
    box-shadow: 0 3px 10px rgba(15, 110, 86, 0.2) !important;
    transition: transform .15s, box-shadow .15s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

    #botonTraducir:hover:not(:disabled) {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 16px rgba(15, 110, 86, 0.28) !important;
    }

    #botonTraducir:disabled {
        opacity: .5 !important;
        cursor: not-allowed !important;
    }

#botonLimpiar {
    flex: 3 !important;
    background: #fff !important;
    border: 1.5px solid #d0d8e0 !important;
    border-radius: 10px !important;
    color: #8a9aaa !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    padding: 8px 10px !important;
    transition: background .15s, border-color .15s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

    #botonLimpiar:hover {
        background: #f0f4f8 !important;
        border-color: #aabbc8 !important;
    }

/* ── VIDEO ── */
.video-avatar {
    width: 210px !important;
    height: 280px !important;
    border: none !important;
    border-radius: 20% 20% 15% 15% / 25% 25% 15% 15% !important;
    background-color: transparent !important;
    object-fit: cover !important;
    overflow: hidden !important;
    transition: transform 0.3s ease !important;
    box-shadow: 0 0 15px rgba(0, 173, 239, 0.5), 0 0 30px rgba(120, 150, 170, 0.3), 0 0 60px rgba(180, 180, 180, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.05) !important;
    animation: breathing 3s ease-in-out infinite !important;
    display: block !important;
    margin: 0 auto !important;
}

    .video-avatar:hover {
        transform: scale(1.02) !important;
    }

@keyframes breathing {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.01);
    }
}

/* ── RESULTADO ── */
.resultado-wrapper {
    display: flex !important;
    justify-content: center !important;
}

#textoResultado {
    background-color: #f8fbfe !important;
    color: #00587a !important;
    border: 1.5px solid #b5d4f4 !important;
    border-radius: 10px !important;
    padding: 7px 12px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    transition: border-color .2s !important;
}

    #textoResultado::placeholder {
        color: #b0cdd8 !important;
        font-weight: 400 !important;
        font-size: 0.78rem !important;
    }

/* ── SPINNER ── */
#spinnerOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

    #spinnerOverlay.active {
        display: flex !important;
    }

.spinner-box {
    background: white;
    padding: 28px 36px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    text-align: center;
}

.dot-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

    .dot-loader span {
        width: 10px;
        height: 10px;
        background-color: #00587a !important;
        border-radius: 50%;
        animation: bounce 0.6s infinite alternate;
    }

        .dot-loader span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .dot-loader span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes bounce {
    to {
        transform: translateY(-10px);
        opacity: 0.5;
    }
}

#mensajeCarga {
    font-size: 0.88rem;
    color: #00587a;
    font-weight: 600;
}

/* ── RESALTADO ── */
.resaltado {
    background: #fff59d !important;
    border-radius: 3px !important;
    padding: 0 3px !important;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
    /* bajar todo el contenido */
    .nk-content-body {
        padding-top: 12px !important;
    }

    .card-principal {
        margin-top: 16px !important;
        padding-top: 8px !important;
    }

    .column-left,
    .column-right {
        padding: 10px 16px !important;
    }

    #textoFinal,
    .button-container,
    #textoResultado {
        width: 90% !important;
    }

    .video-avatar {
        width: 150px !important;
        height: 200px !important;
    }

    #textoFinal {
        font-size: 0.82rem !important;
    }
}
