/* public/css/pqr.css */

/* --- PREMIUM PQR DESIGN --- */
.FormularioInfo {
    background: var(--container-color);
    border-radius: 24px;
    padding: 3rem 4rem;
    box-shadow: 0 30px 60px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    max-width: 900px;
    margin: 0 auto;
}
.dark .FormularioInfo {
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

.TitleFormulario {
    font-size: 2.8rem;
    text-align: center;
    background: var(--gradient-color);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.FormGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
    margin-top: 2rem;
}

@media screen and (max-width: 768px) {
    .FormGrid {
        grid-template-columns: 1fr;
    }
    .FormularioInfo {
        padding: 2rem;
    }
}

.FullWidth { 
    grid-column: 1 / -1;
}

/* Formularios y Inputs Premium */
.FormuLabel {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--title-color);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.FormuLabel i {
    color: var(--first-color);
    font-size: 1.2rem;
}

.FormuInput {
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,0.1);
    background: rgba(0,0,0,0.02);
    font-size: 1rem;
    color: var(--title-color);
    font-family: var(--body-font);
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.dark .FormuInput {
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    color: var(--title-color);
}

.FormuInput:focus {
    border-color: var(--first-color);
    background: transparent;
    box-shadow: 0 0 0 5px rgba(53, 187, 20, 0.15);
}

.dark .FormuInput:focus {
    background: rgba(255,255,255,0.02);
}

.ButtonSolicitar {
    background: var(--gradient-color);
    color: var(--white-color);
    padding: 18px 50px;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(53, 187, 20, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ButtonSolicitar:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(53, 187, 20, 0.4);
}

/* 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;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}
.dark .PqrForm select.FormuInput {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* --- Contenedor de Carga de Archivos --- */
.FileCargaContainer {
    margin-top: 1.5rem;
    border: 2px dashed rgba(0,0,0,0.2);
    border-radius: 1.2rem;
    padding: 2.5rem;
    background: rgba(0, 0, 0, 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;
}

.dark .FileCargaContainer {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.02);
}

.FileCargaContainer:hover {
    border-color: var(--first-color);
    background: rgba(53, 187, 20, 0.05);
}

.dark .FileCargaContainer:hover {
    border-color: var(--first-color);
    background: rgba(53, 187, 20, 0.1);
}

.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); }
}