﻿/* ============================================================
   MODAL INCIDENCIA — TraduceHombres
   Botón flotante + modal de reporte de incidencias
   ============================================================ */

/* ── Botón flotante FAB ─────────────────────────────────── */
.th-incidencia-fab {
    position: fixed;
    bottom: 90px; /* margen para no tapar la bottom nav en móvil */
    right: 20px;
    z-index: 1040;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #e91e8c 0%, #9c27b0 100%);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(233, 30, 140, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .th-incidencia-fab:hover {
        transform: translateY(-3px) scale(1.08);
        box-shadow: 0 8px 25px rgba(233, 30, 140, 0.5);
    }

    .th-incidencia-fab:active {
        transform: scale(0.95);
    }

    /* Pulso animado para llamar la atención */
    .th-incidencia-fab::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: linear-gradient(135deg, #e91e8c 0%, #9c27b0 100%);
        animation: th-fab-pulse 2.5s ease-out infinite;
        z-index: -1;
    }

@keyframes th-fab-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    70% {
        transform: scale(1.6);
        opacity: 0;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Desktop: subir un poco para que no tape nada */
@media (min-width: 992px) {
    .th-incidencia-fab {
        bottom: 30px;
        right: 30px;
        width: 56px;
        height: 56px;
    }
}

/* ── Modal contenedor ───────────────────────────────────── */
.th-incidencia-modal {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(233, 30, 140, 0.2);
}

/* ── Header ─────────────────────────────────────────────── */
.th-incidencia-modal__header {
    background: linear-gradient(135deg, #e91e8c 0%, #9c27b0 100%);
    border-bottom: none;
    padding: 1.25rem 1.5rem;
    align-items: flex-start;
}

.th-incidencia-modal__header-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.th-incidencia-modal__icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
}

.th-incidencia-modal__header .modal-title {
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0;
    font-family: 'Nunito', sans-serif;
}

.th-incidencia-modal__subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    margin-bottom: 0;
}

/* ── Body ───────────────────────────────────────────────── */
.th-incidencia-modal__body {
    background: #fff;
    padding: 1.5rem;
}

.th-incidencia-modal__label {
    font-weight: 700;
    font-size: 0.85rem;
    color: #4a4a4a;
    margin-bottom: 0.4rem;
    display: block;
    font-family: 'Nunito', sans-serif;
}

.th-incidencia-modal__optional {
    font-weight: 400;
    color: #999;
    font-size: 0.78rem;
}

.th-incidencia-modal__input {
    border: 2px solid #f0e6f6;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fafafa;
}

    .th-incidencia-modal__input:focus {
        border-color: #e91e8c;
        box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.12);
        background: #fff;
        outline: none;
    }

.th-incidencia-modal__textarea {
    resize: vertical;
    min-height: 90px;
}

.th-incidencia-modal__char-count {
    text-align: right;
    font-size: 0.75rem;
    color: #bbb;
    margin-top: 0.25rem;
}

/* ── Criticidad radio buttons ───────────────────────────── */
.th-incidencia-modal__criticidad {
    display: flex;
    gap: 0.5rem;
}

.th-incidencia-modal__criticidad-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.25rem;
    border-radius: 10px;
    border: 2px solid #f0e6f6;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.82rem;
    font-family: 'Nunito', sans-serif;
    transition: all 0.2s ease;
    background: #fafafa;
    user-select: none;
}

    .th-incidencia-modal__criticidad-btn input[type="radio"] {
        display: none;
    }

/* Baja */
.th-incidencia-modal__criticidad-btn--baja:has(input:checked) {
    border-color: #10b981;
    background: #d1fae5;
    color: #065f46;
}

/* Media */
.th-incidencia-modal__criticidad-btn--media:has(input:checked) {
    border-color: #f59e0b;
    background: #fef3c7;
    color: #92400e;
}

/* Alta */
.th-incidencia-modal__criticidad-btn--alta:has(input:checked) {
    border-color: #ef4444;
    background: #fee2e2;
    color: #991b1b;
}

.th-incidencia-modal__criticidad-btn:hover {
    border-color: #e91e8c;
    transform: translateY(-1px);
}

/* ── Info contexto ──────────────────────────────────────── */
.th-incidencia-modal__context-info {
    background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 100%);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
    color: #7b1fa2;
    font-weight: 600;
}

/* ── Footer ─────────────────────────────────────────────── */
.th-incidencia-modal__footer {
    background: #fafafa;
    border-top: 1px solid #f0e6f6;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
}

.th-incidencia-modal__btn-cancelar {
    border: 2px solid #e0d0f0;
    color: #7b1fa2;
    border-radius: 10px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

    .th-incidencia-modal__btn-cancelar:hover {
        background: #f3e5f5;
        border-color: #9c27b0;
    }

.th-incidencia-modal__btn-enviar {
    background: linear-gradient(135deg, #e91e8c 0%, #9c27b0 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(233, 30, 140, 0.3);
}

    .th-incidencia-modal__btn-enviar:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(233, 30, 140, 0.45);
        color: #fff;
    }

    .th-incidencia-modal__btn-enviar:disabled {
        opacity: 0.65;
        transform: none;
        cursor: not-allowed;
    }
