/* public/css/pqr.css */

/* --- Estructura General --- */
.FormGrid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.FullWidth { 
    width: 100%; 
}

/* Se removieron los estilos de Labels Flotantes para coincidir con V2 */

.PqrForm textarea.FormuInput {
    padding-top: 1.5rem;
    resize: none;
    height: 120px;
}

.PqrForm select.FormuInput {
    cursor: pointer;
    appearance: none;
}

/* --- Contenedor de Carga de Archivos --- */
.FileCargaContainer {
    margin-top: 1.5rem;
    border: 2px dashed #cbd5e0;
    border-radius: 1.2rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Evita que los hijos deformen el contenedor */
}

.FileCargaContainer:hover {
    border-color: var(--first-color);
    background: rgba(255, 255, 255, 0.05);
}

.FileCargaContainer.dragover {
    border-color: var(--first-color);
    background: rgba(var(--first-color-rgb), 0.1);
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-style: solid;
}

.FileCargaLabel { 
    cursor: pointer; 
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.UploadIcon i {
    font-size: 4rem;
    color: var(--first-color);
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.UploadText span {
    display: block;
    font-size: 1.2rem;
    color: var(--title-color);
    font-weight: 600;
}

.UploadText p {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 0.5rem;
}

/* --- Rejilla de Archivos (BLOQUEO DE EXPANSIÓN) --- */
.FileGridPqr {
    display: grid;
    /* min-width: 0 es vital en el grid para que el ellipsis funcione */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
    width: 100%;
}

.FileCard {
    background: var(--container-color);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: 1.2rem;
    position: relative;
    animation: fadeIn 0.5s ease forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    
    /* SOLUCIÓN AL PROBLEMA: */
    width: 100%;
    min-width: 0; /* Permite que el flex-item se encoja más allá del contenido */
    box-sizing: border-box;
}

.RemoveFileBtn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

.RemoveFileBtn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.FileCard .RemoveFileBtn i {
    font-size: 1.2rem;
    color: #ffffff;
    margin: 0;
}

.FileCard i {
    font-size: 2.5rem;
    color: var(--first-color);
    margin-bottom: 0.8rem;
    flex-shrink: 0;
}

.FileCard span {
    font-size: 0.8rem;
    color: var(--text-color);
    font-weight: 500;
    
    /* CONTROL DE TEXTO LARGO: */
    width: 100%;
    max-width: 100%;
    display: block;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Pone los ... al final */
}

/* --- Footer de la Zona de Carga --- */
.FooterCarga {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    width: 100%;
}

.CounterPill {
    background: var(--first-color);
    color: #fff;
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.BtnLimpiar {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.BtnLimpiar:hover {
    background: #ef4444;
    color: #fff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}