/* ============================================================
   SOS Document Gate – Estilos del bloque de descarga
   ============================================================ */

.sos-doc-gate {
    margin: 40px 0 20px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Corrige conflicto entre display:flex y el atributo HTML hidden */
.sos-doc-gate .sdg-state[hidden] {
    display: none !important;
}

/* Tarjeta contenedora */
.sdg-state {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-left: 5px solid #C8102E;
    border-radius: 10px;
    padding: 28px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    transition: box-shadow 0.2s ease;
}

.sdg-state:hover {
    box-shadow: 0 6px 28px rgba(0,0,0,0.11);
}

.sdg-state--success {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

/* Icono */
.sdg-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C8102E;
}

.sdg-icon svg {
    width: 26px;
    height: 26px;
}

.sdg-icon--success {
    background: #dcfce7;
    color: #16a34a;
}

/* Cuerpo */
.sdg-body {
    flex: 1;
    min-width: 0;
}

.sdg-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    border: none !important;
}

.sdg-state--success .sdg-title {
    color: #15803d !important;
}

.sdg-desc {
    font-size: 14px !important;
    color: #555 !important;
    margin: 0 0 18px !important;
    line-height: 1.6 !important;
}

.sdg-desc--success {
    color: #166534 !important;
}

/* Formulario */
.sdg-form {
    margin: 0;
}

.sdg-input-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sdg-email {
    flex: 1;
    min-width: 220px;
    height: 46px;
    padding: 0 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.sdg-email:focus {
    border-color: #C8102E;
    box-shadow: 0 0 0 3px rgba(200,16,46,0.1);
}

.sdg-email::placeholder {
    color: #aaa;
}

/* Botón principal */
.sdg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 24px;
    background: #C8102E;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 8px rgba(200,16,46,0.25);
}

.sdg-btn:hover {
    background: #9e0c24;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200,16,46,0.35);
}

.sdg-btn:active {
    transform: translateY(0);
}

.sdg-btn:disabled,
.sdg-btn.is-loading {
    background: #e57988;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading spinner dentro del botón */
.sdg-btn-loading {
    display: none;
}

.sdg-btn.is-loading .sdg-btn-text {
    display: none;
}

.sdg-btn.is-loading .sdg-btn-loading {
    display: flex;
}

.sdg-spinner {
    width: 20px;
    height: 20px;
    animation: sdg-spin 0.8s linear infinite;
}

@keyframes sdg-spin {
    to { transform: rotate(360deg); }
}

/* Mensaje de error */
.sdg-error {
    font-size: 13px !important;
    color: #dc2626 !important;
    margin: 8px 0 0 !important;
    display: none;
}

.sdg-error.is-visible {
    display: block;
}

/* Autorización tratamiento de datos */
.sdg-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 6px;
}

.sdg-consent-check {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #C8102E;
    cursor: pointer;
}

.sdg-consent-label {
    font-size: 12px !important;
    color: #555 !important;
    line-height: 1.5 !important;
    cursor: pointer;
}

.sdg-consent-label a {
    color: #C8102E !important;
    text-decoration: underline !important;
}

.sdg-consent-label a:hover {
    color: #9e0c24 !important;
}

/* Privacidad */
.sdg-privacy {
    font-size: 11px !important;
    color: #999 !important;
    margin: 10px 0 0 !important;
    line-height: 1.5 !important;
}

/* Enlace de descarga */
.sdg-dl-link {
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 600px) {
    .sdg-state {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .sdg-icon {
        width: 44px;
        height: 44px;
    }

    .sdg-title {
        font-size: 16px !important;
    }

    .sdg-input-row {
        flex-direction: column;
    }

    .sdg-email,
    .sdg-btn {
        width: 100%;
    }
}
