/* Overlay base */
#modal-documentos {
    position: fixed !important;
    inset: 0;
    z-index: 100000 !important;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 1rem;
}

/* Modal de documentos de Soporte Técnico */
#modal-card-documents {
    position: fixed !important;
    inset: 0;
    z-index: 100000 !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#modal-card-documents-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#modal-card-documents #modal-documentos-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 550px;
    margin: auto;
    padding: 1.5rem 0;
}

#modal-documentos-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 550px;
    margin: auto;
    padding: 1.5rem 0;
}

/* Backdrop */
#modal-documentos-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Panel */
#modal-documentos-panel {
    width: 100%;
    border-radius: 14px; /* Matches style="border-radius: 14px;" */
    background: #fff;
    box-shadow: 0 0 1rem rgba(0,0,0,0.15); /* Shadow from .shadow class in reference */
    position: relative;
    padding: 30px; /* General padding, refined below */
}

@media (max-width: 640px) {
    #modal-documentos {
        padding: 0.75rem;
    }

    #modal-documentos-wrapper {
        padding: 0.75rem 0;
    }

    #modal-documentos-panel {
        padding: 24px 18px;
    }

    #modal-card-documents {
        padding: 0.75rem;
    }

    #modal-card-documents #modal-documentos-wrapper {
        padding: 0.75rem 0;
    }

    .modal-title-custom {
        font-size: 28px;
    }
}

/* Minimal Close Button (Matches reference clean look) */
.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #9CA3AF;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 20;
    padding: 0;
}
.modal-close-btn:hover {
    color: #374151;
}
.modal-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Typography matching 'cl_gris_text' and sizes */
.modal-title-custom {
    font-size: 32px; /* fz-32 */
    color: #545454; /* best approximation for cl_gris_text */
    font-weight: 700; /* fw-700 */
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.modal-subtitle-custom {
    font-size: 15px; /* fz-15 */
    color: #545454; /* best approximation for cl_gris_text */
    font-weight: 400; /* fw-400 */
    margin-bottom: 1.5rem; /* mb-4 */
    line-height: 1.5;
}

/* Links matching 'font-rosado-oscuro' */
.modal-link-custom {
    font-size: 20px; /* fz-20 */
    color: #a51a3c; /* font-rosado-oscuro */
    font-weight: 700; /* fw-700 */
    text-decoration: none;
    display: block; /* d-block */
    margin-bottom: 0.25rem; /* mb-1 */
    transition: color 0.2s;
}
.modal-link-custom:hover {
    color: #c80045; /* Slightly lighter/different on hover maybe? */
    text-decoration: none;
}
.modal-link-custom:last-child {
    margin-bottom: 0;
}

/* Button "VOLVER" */
/* btn btn-radius btn-outline-danger text-uppercase fw-700 fz-14 py-2 px-4 */
.modal-btn-volver {
    display: inline-block;
    border: 2px solid #c80045; /* btn-outline-danger */
    color: #c80045;           /* btn-outline-danger */
    background: transparent;
    font-weight: 700;         /* fw-700 */
    font-size: 14px;          /* fz-14 */
    padding: 8px 24px;        /* py-2 px-4 */
    border-radius: 28px;      /* btn-radius */
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    /* margin-top: 25px; handled by utils now */
}
.modal-btn-volver:hover {
    background: #c80045;
    color: #fff;
}

/* Button "DESCARGAR" (Solid Red) */
.modal-btn-descargar {
    display: inline-block;
    border: 2px solid #c80045;
    background: #c80045;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 24px;
    border-radius: 28px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}
.modal-btn-descargar:hover {
    background: #a00037;
    border-color: #a00037;
}

/* Form Inputs for FDS */
.modal-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px; /* Slightly rounded */
    font-size: 14px;
    color: #545454;
    outline: none;
    transition: border-color 0.2s;
}
.modal-input:focus {
    border-color: #c80045;
}
.modal-input::placeholder {
    color: #999;
}

/* Language Selection Select */
#modal-lang-select {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.modal-select-custom {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 1rem;
    padding: 10px 14px;
    border: 1px solid #c80045;
    border-radius: 4px;
    color: #545454;
    background: #fff;
}

.modal-download-link,
.modal-back-link {
    display: inline-block;
    margin: 0.5rem auto;
    cursor: pointer;
}

.modal-documents-actions {
    gap: 0.75rem;
}

.modal-documents-actions .modal-download-link,
.modal-documents-actions .modal-back-link {
    margin: 0;
}

.modal-back-link {
    border: 0;
    color: #c80045;
    background: transparent;
    font-weight: 700;
}
