/* Estilos para el seguimiento de denuncias */

.denuncias-seguimiento-container {
    width: 100%;
    padding: 20px;
}

.denuncias-seguimiento-info {
    width: 100%;
    .denuncias-seguimiento-header{
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 30px;
        @media (max-width: 768px) {
            gap: 10px;
            justify-content: center;
        }
        .estado-denuncias{
            padding: 5px 10px;
            border-radius: 20px;
            color: #FFF;
            font-family: Montserrat;
            font-size: 15px;
            font-style: normal;
            font-weight: 400;
            line-height: 20px; 
            &.estado-pendiente{
                background: #FF8787;
            }
            &.estado-en_revision{
                background: #FFD587;
            }
            &.estado-resuelto{
                background: #44AC57;
            }
        }
        
        .denuncias-field-info-wrapper {
            position: relative;

            .denuncias-field-info-btn {
                background: transparent;
                border: none;
                cursor: pointer;
                padding: 0.25rem;
                display: flex;
                align-items: center;
                justify-content: center;
                color: #233676;
                transition: color 0.2s ease;

                &:hover {
                    color: #F3953E;
                }

                svg {
                    width: 18px;
                    height: 18px;
                }
            }

            .denuncias-field-info-popup {
                position: absolute;
                bottom: 100%;
                left: 0;
                margin-bottom: 10px;
                z-index: 1000;
                width: 276px;
                border-radius: 20px;
                background: #FFF;
                box-shadow: 0 10px 35px 0 rgba(0, 0, 0, 0.05);
                display: flex;
                padding: 20px;
                flex-direction: column;
                justify-content: flex-end;
                align-items: flex-start;
                gap: 10px;
                opacity: 0;
                visibility: hidden;
                pointer-events: none;
                transform: translateY(-10px);
                transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;

                &.is-open {
                    opacity: 1;
                    visibility: visible;
                    pointer-events: auto;
                    transform: translateY(0);
                }

                .denuncias-field-info-popup-close {
                    position: absolute;
                    top: 3px;
                    right: 3px;
                    background: transparent;
                    border: none;
                    cursor: pointer;
                    padding: 0.25rem;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    color: #233676;

                    &:hover {
                        color: #F3953E;
                    }

                    svg {
                        width: 16px;
                        height: 16px;
                    }
                }

                .denuncias-field-info-popup-content {
                    h3 {
                        color: #233676;
                        font-family: Montserrat;
                        font-size: 13px;
                        font-style: normal;
                        font-weight: 800;
                        line-height: normal;
                        margin-bottom: 7px;
                    }

                    p {
                        color: #000;
                        font-family: Montserrat;
                        font-size: 11px;
                        font-style: normal;
                        font-weight: 300;
                        line-height: 16px;
                        margin: 0;
                    }
                }
            }
        }
    }
    .denuncias-seguimiento-titulo {
        color: #233676;
        font-family: Montserrat;
        font-size: 25px;
        font-style: normal;
        font-weight: 800;
        line-height: 30px;
        margin-bottom: 0;

        @media (max-width: 768px) {
            font-size: 23px;
            line-height: 25px;
        }
        .denuncias-seguimiento-datos & {
            margin-bottom: 30px;
        }
    }
    
    .denuncias-seguimiento-datos {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
        
        .denuncias-seguimiento-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            @media (max-width: 768px) {
                grid-template-columns: repeat(1, 1fr);
            }
        }
        
        .denuncias-seguimiento-field {
            display: flex;
            flex-direction: column;
            gap: 7px;
            
            label {
                color: #233676;
                font-family: Montserrat;
                font-size: 15px;
                font-style: normal;
                font-weight: 400;
                line-height: 20px;
            }
            
            input,
            textarea {
                display: flex;
                width: 100%;
                padding: 10px 20px;
                align-items: center;
                gap: 10px;
                align-self: stretch;
                border-radius: 20px;
                border: 1px solid rgba(35, 54, 118, 0.20);
                background: #E9EBF2;
                &:disabled{
                    cursor: not-allowed;
                    opacity: 1;
                }
                &::placeholder{
                    color: #000;
                    text-align: center;
                    font-family: Montserrat;
                    font-size: 15px;
                    font-style: normal;
                    font-weight: 400;
                    line-height: 20px;
                    opacity: 1;
                }
                &:focus{
                    outline: none;
                }
                
                &:read-only {
                    cursor: default;
                }
            }
            
            .denuncias-password-wrapper {
                position: relative;
                display: flex;
                align-items: center;
                
                input[type="password"],
                input[type="text"] {
                    width: 100%;
                    padding-right: 50px;
                }
                
                .denuncias-toggle-password {
                    position: absolute;
                    right: 15px;
                    background: transparent;
                    border: none;
                    cursor: pointer;
                    padding: 5px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    z-index: 1;
                    
                    svg {
                        width: 19px;
                        height: 15px;
                    }
                    
                    &:hover {
                        opacity: 0.7;
                    }
                }
            }
            
            textarea {
                min-height: 60px;
                resize: vertical;
            }
            
            &.denuncias-seguimiento-field-full {
                grid-column: 1 / -1;
            }
            .denuncias-archivos-grid{
                padding: 10px 20px;
                gap: 10px;
                border-radius: 20px;
                border: 1px solid rgba(35, 54, 118, 0.20);
                background: #E9EBF2;
                grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
                .denuncias-archivo-item{
                    width: 52px;
                    height: 52px;
                    overflow: hidden;
                    border-radius: 10px;
                    a{
                        img{
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                        }
                    }
                }
            }
        }
        
    }
    
    .denuncias-seguimiento-comentarios {
        margin-top: 30px;
        display: flex;
        flex-direction: column;
        
        .denuncias-seguimiento-titulo {
            margin-bottom: 20px;
        }
        
        .denuncias-mensajes-chat {
            max-height: 400px;
            overflow-y: auto;
            padding: 15px;
            background: transparent;
            border-radius: 8px;
            margin-bottom: 20px;
            position: relative;
            /* Ocultar scrollbar nativo */
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE y Edge */
        }
        
        .denuncias-mensajes-chat::-webkit-scrollbar {
            display: none; /* Chrome, Safari, Opera */
        }
        
        /* Scrollbar personalizado */
        .denuncias-mensajes-chat .denuncias-scrollbar-track {
            position: absolute;
            top: 0;
            right: 2px;
            width: 5px;
            background: #c9cddb;
            z-index: 10;
            border-radius: 5px;
            pointer-events: none;
        }
        
        .denuncias-mensajes-chat .denuncias-scrollbar-track .denuncias-scrollbar-thumb {
            position: absolute;
            top: 0;
            right: 0;
            width: 5px;
            background: #233676;
            border-radius: 5px;
            pointer-events: auto;
            opacity: 1;
            cursor: pointer;
            min-height: 20px;
        }
        
        .denuncias-mensajes-chat .denuncias-sin-mensajes {
            text-align: center;
            color: #666;
            font-family: Montserrat;
            font-size: 14px;
            padding: 20px;
        }
        
        .denuncias-mensajes-chat .denuncias-mensaje-item {
            border: none;
            max-width: 80%;
            margin-bottom: 30px;
        }
        
        .denuncias-mensajes-chat .denuncias-mensaje-item .conjunto-mensaje {
            border-radius: 20px;
            border: 1px solid rgba(35, 54, 118, 0.20);
            background: var(--1a, #E9EBF2);
            display: flex;
            padding: 10px 20px;
            align-items: flex-start;
            flex-direction: column;
            gap: 0px;
            align-self: stretch;
        }
        
        .denuncias-mensajes-chat .denuncias-mensaje-item .denuncias-mensaje-archivos {
            border-radius: 28px;
            border: 1px solid rgba(35, 54, 118, 0.20);
            background: var(--1a, #E9EBF2);
            display: flex;
            flex-direction: column; 
            padding: 12px 20px;
            gap: 10px;
            margin: 0;
        }
        
        .denuncias-mensajes-chat .denuncias-mensaje-item .denuncias-mensaje-archivos h4 {
            margin: 0;
        }
        
        /* Mensajes del cliente (alineados a la derecha) */
        .denuncias-mensajes-chat .denuncias-mensaje-item.denuncias-mensaje-cliente {
            margin-left: auto;
            margin-right: 0;
            display: flex;
            flex-direction: column;
            gap: 7px;
        }
        
        /* Mensajes del admin (alineados a la izquierda) */
        .denuncias-mensajes-chat .denuncias-mensaje-item.denuncias-mensaje-admin {
            margin-left: 0;
            margin-right: auto;
        }
        
        .denuncias-mensajes-chat .denuncias-mensaje-item .denuncias-mensaje-header {
            margin-bottom: 15px;
            display: flex;
            justify-content: space-between;
            width: 100%;
        }
        
        .denuncias-mensajes-chat .denuncias-mensaje-item .denuncias-mensaje-header strong {
            color: #233676;
            font-family: Montserrat;
            font-size: 15px;
            font-weight: 700;
            line-height: 20px;
        }
        
        .denuncias-mensajes-chat .denuncias-mensaje-item .denuncias-mensaje-header span {
            color: #000;
            font-family: Montserrat;
            font-size: 15px;
            font-weight: 400;
            line-height: 20px;
        }
        
        .denuncias-mensajes-chat .denuncias-mensaje-item .denuncias-mensaje-contenido {
            color: #000;
            font-family: Montserrat;
            font-size: 15px;
            font-weight: 400;
            line-height: 20px;
            margin-bottom: 15px;
        }
        
        .denuncias-mensajes-chat .denuncias-mensaje-item .denuncias-mensaje-archivos h4 {
            color: #000;
            font-family: Montserrat;
            font-size: 15px;
            font-weight: 400;
            line-height: 20px;
        }
        
        /* Botón Responder */
        .denuncias-btn-responder {
            padding: 12px 20px;
            background: #233676;
            color: #FFF;
            border: none;
            border-radius: 20px;
            font-family: Montserrat;
            font-size: 16px;
            font-weight: 600;
            line-height: 21px;
            cursor: pointer;
            transition: background 0.3s ease;
            margin-top: 20px;
            display: inline-block;
            width: fit-content;
        }
        
        .denuncias-btn-responder:hover {
            background: #0B1A4E;
        }
        
        /* Formulario de respuesta (se despliega hacia arriba) */
        .denuncias-form-mensaje {
            margin-top: 20px;
            margin-bottom: 20px;
            display: flex;
            flex-direction: column;
            gap: 15px;
            min-width: 80%;
            align-self: self-end;
        }
        
        .denuncias-form-mensaje .denuncias-form-field {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .denuncias-form-mensaje .denuncias-form-field label {
            color: #233676;
            font-family: Montserrat;
            font-size: 15px;
            font-weight: 400;
            line-height: 20px;
        }
        
        .denuncias-form-mensaje .denuncias-form-field textarea {
            width: 100%;
            padding: 15px 20px;
            border-radius: 20px;
            border: 1px solid rgba(35, 54, 118, 0.20);
            background: #E9EBF2;
            font-family: Montserrat;
            font-size: 15px;
            font-weight: 400;
            line-height: 20px;
            resize: vertical;
            min-height: 100px;
        }
        
        .denuncias-form-mensaje .denuncias-form-field textarea:focus {
            outline: none;
            border-color: #233676;
        }
        
        .denuncias-form-mensaje .denuncias-form-field textarea::placeholder {
            color: #000;
            opacity: 1;
        }
        
        /* Campo Agregar documentos */
        .denuncias-form-mensaje .denuncias-form-field .denuncias-label-archivo {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 20px;
            border-radius: 20px;
            border: 1px solid rgba(35, 54, 118, 0.20);
            background: #E9EBF2;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .denuncias-form-mensaje .denuncias-form-field .denuncias-label-archivo span {
            color: #000;
            font-family: Montserrat;
            font-size: 15px;
            font-weight: 400;
            line-height: 20px;
        }
        
        .denuncias-form-mensaje .denuncias-form-field .denuncias-label-archivo input[type="file"] {
            display: none;
        }
        
        .denuncias-form-mensaje .denuncias-form-field .denuncias-label-archivo svg {
            width: 16px;
            height: 16px;
            color: #233676;
        }
        
        .denuncias-form-mensaje .denuncias-form-field .denuncias-label-archivo:hover {
            border-color: #233676;
            background: #D8DBE5;
        }
        
        /* Botón Guardar */
        .denuncias-form-mensaje .denuncias-btn-guardar {
            width: fit-content;
            padding: 12px 20px;
            background: #233676;
            color: #FFF;
            border: none;
            border-radius: 20px;
            font-family: Montserrat;
            font-size: 16px;
            font-weight: 600;
            line-height: 21px;
            cursor: pointer;
            transition: background 0.3s ease;
            margin-top: 10px;
        }
        
        .denuncias-form-mensaje .denuncias-btn-guardar:hover {
            background: #0B1A4E;
        }
        
        .denuncias-form-mensaje .denuncias-btn-guardar:disabled {
            background: #ccc;
            cursor: not-allowed;
        }
        
        .denuncias-form-mensaje #cliente-mensaje-status {
            font-family: Montserrat;
            font-size: 14px;
        }
        
        .denuncias-form-mensaje #cliente-mensaje-status .denuncias-success {
            color: #46b450;
        }
        
        .denuncias-form-mensaje #cliente-mensaje-status .denuncias-error {
            color: #dc3232;
        }
    }
    
    .denuncias-seguimiento-link-volver {
        display: inline-block;
        margin-top: 30px;
        padding: 8px 18px;
        justify-content: center;
        align-items: center;
        gap: 10px;
        border-radius: 20px;
        background: linear-gradient(180deg, #FFF 0%, #FFF 100%);
        color: #F3953E;
        font-family: Montserrat;
        font-size: 16px;
        font-style: normal;
        font-weight: 400;
        line-height: 21px;
        &:hover {
            background: linear-gradient(180deg, #FFF 0%, #E9EBF2 100%);
        }
    }
}

.denuncias-error {
    padding: 15px 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    color: #721c24;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    margin: 20px 0;
}

/* Archivos adjuntos */
.denuncias-archivo-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.denuncias-archivo-input-wrapper input[type="file"] {
    display: none;
}

.denuncias-btn-archivo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f0f0f0;
    color: #233676;
    border: 1px solid rgba(35, 54, 118, 0.20);
    border-radius: 6px;
    font-family: Montserrat;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
}

.denuncias-btn-archivo svg {
    width: 16px;
    height: 16px;
}

.denuncias-btn-archivo:hover {
    background: #e6e6e6;
    border-color: #233676;
}

#cliente-archivos-preview p,
#cliente-archivos-preview-2 p {
    margin: 0;
    font-family: Montserrat;
}

.denuncias-mensaje-archivos {
    margin-top: 15px;
}

.denuncias-mensaje-archivos h4 {
    font-family: Montserrat;
    font-size: 16px;
    font-weight: 700;
    color: #233676;
    margin: 0 0 12px 0;
}

.denuncias-archivos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 12px;
}

.denuncias-archivo-thumbnail {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.denuncias-archivo-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.denuncias-archivo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.denuncias-archivo-preview-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.denuncias-archivo-preview-container iframe,
.denuncias-archivo-preview-container embed,
.denuncias-archivo-preview-container object {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.denuncias-archivo-icon {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8edf2 100%);
    position: relative;
    padding: 10px;
}

.denuncias-archivo-icon svg {
    width: 45px;
    height: 45px;
    color: #233676;
    margin-bottom: 8px;
}

.denuncias-archivo-icon span {
    font-family: Montserrat;
    font-size: 11px;
    font-weight: 600;
    color: #233676;
    text-align: center;
    word-break: break-word;
}

/* Estilos para el modal de recuperación de contraseña (consultas) */
.denuncias-recuperar-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}
.denuncias-recuperar-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}
.denuncias-recuperar-modal__container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #FFF;
    border-radius: 20px;
    padding: 30px 25px;
    max-width: 520px;
    width: 90%;
    z-index: 1;
}
.denuncias-recuperar-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
}
.denuncias-recuperar-modal__content {
    text-align: center;
}
.denuncias-recuperar-modal__icon {
    margin: 0 auto 20px auto;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.denuncias-recuperar-modal__title {
    color: #233676;
    font-family: Montserrat;
    font-size: 20px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
    margin-bottom: 20px;
}
.denuncias-recuperar-modal__form .denuncias-recuperar-modal__field {
    text-align: left;
    margin-bottom: 15px;
}
.denuncias-recuperar-modal__label {
    display: block;
    margin-bottom: 6px;
    color: #233676;
    font-family: Montserrat;
    font-size: 14px;
    font-weight: 500;
}
.denuncias-recuperar-modal__field input {
    width: 100%;
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid rgba(35, 54, 118, 0.20);
    background: #E9EBF2;
    outline: none;
    transition: border-color 0.2s ease;
}
.denuncias-recuperar-modal__field input:focus{
    border-color: #F3953E;
}
.denuncias-recuperar-modal__field .denuncias-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.denuncias-recuperar-modal__field .denuncias-password-wrapper input[type="password"],
.denuncias-recuperar-modal__field .denuncias-password-wrapper input[type="text"] {
    width: 100%;
    padding-right: 50px;
}
.denuncias-recuperar-modal__field .denuncias-password-wrapper .denuncias-toggle-password {
    position: absolute;
    right: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.denuncias-password-wrapper{
    position: relative;
}
button.denuncias-toggle-password {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
}
.denuncias-recuperar-modal__field .denuncias-password-wrapper .denuncias-toggle-password svg {
    width: 19px;
    height: 15px;
}
.denuncias-recuperar-modal__field .denuncias-password-wrapper .denuncias-toggle-password:hover {
    opacity: 0.7;
}
.denuncias-recuperar-password-requisitos {
    margin-top: 10px;
    margin-bottom: 20px;
    text-align: left;
}
.denuncias-recuperar-password-requisitos__title {
    font-weight: 600;
    margin-bottom: 5px;
}
.denuncias-recuperar-password-requisitos ul {
    margin: 0;
    padding-left: 18px;
}
.denuncias-recuperar-password-requisitos li {
    margin-bottom: 3px;
}

