/*
Theme Name: Impuestos WP
Theme URI: https://imputscolombia.com
Description: Tema WordPress para consulta y pago de impuestos predial y vehicular Colombia. Tailwind CSS + API api-sdh.krakenlabs.sbs
Version: 2.2.0
Author: KrakenLabs
*/

html { scroll-behavior: smooth; }

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e8f0fb;
    border-top: 4px solid #3366cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gradient-hero {
    background: linear-gradient(135deg, #023e7d 0%, #004884 40%, #3366cc 100%);
}

.glass-card {
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.12);
}

/* ── Responsive overrides for SDH CSS ── */

/* Fix 7: Prevent horizontal scroll from .row negative margins */
.account-section {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}
.account-section-content {
    width: 100% !important;
}
.descarga-factura-form {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}
.container_new_page {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
}

@media (max-width: 1023px) {
    /* Fix 1: Form centered at max 500px on mobile/tablet */
    .descarga-factura-form {
        width: 100% !important;
        max-width: 500px !important;
        margin: 0 auto !important;
        padding: 0 15px !important;
    }
    .account-section {
        padding: 0 10px !important;
    }

    /* Fix 6: Main 3 columns stack vertically (direct child selector only) */
    .descarga-factura-form > .row > div {
        float: none !important;
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* Fix 2: .divRevisar boxes full width, not fixed 258px */
    .divRevisar {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 10px 0 !important;
        box-sizing: border-box !important;
    }

    /* Fix 3: .textosDerecha remove extra margin */
    .textosDerecha {
        margin: 5px 0 !important;
    }

    /* Fix 5: Only result panel buttons are full-width, not form buttons */
    .descarga-factura-respuesta-mobile .btnRedPrimario,
    .descarga-factura-respuesta-mobile .btnRedSecundario {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    .descarga-factura-respuesta-mobile .infoResultado {
        width: 100% !important;
        max-width: 100% !important;
    }
    .descarga-factura-respuesta-mobile .seccion-botones-con-factura .infoResultado {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* Fix 4: Form buttons side by side, centered */
    .descarga-factura-form .col-md-4 .row:last-child {
        display: flex !important;
        justify-content: center !important;
        gap: 10px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .descarga-factura-form .col-md-4 .row:last-child > div {
        float: none !important;
        width: auto !important;
        margin-left: 0 !important;
    }
    .descarga-factura-form .col-md-4 .row:last-child > div > button {
        margin: 5px 0 !important;
    }

    /* Fix inputs full width */
    .controlesRed {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Fix info box margins */
    .cajaTenEnCuenta {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* ── Neutralize ALL SDH fixed dimensions in mobile result panel ── */
    .descarga-factura-respuesta-mobile .factura-botones-pago,
    .descarga-factura-respuesta-mobile .factura-botones-pago .factura-botones-pago-detail,
    .descarga-factura-respuesta-mobile .facturaEncontradaItemObj,
    .descarga-factura-respuesta-mobile .descarga-factura-boton,
    .descarga-factura-respuesta-mobile .seccion-botones-con-factura,
    .descarga-factura-respuesta-mobile .seccion-botones-con-factura .mensajesFacturaTitulo,
    .descarga-factura-respuesta-mobile .seccion-botones-con-factura .infoResultado,
    .descarga-factura-respuesta-mobile .global-alerts,
    .descarga-factura-respuesta-mobile .info-resultado-detail,
    .descarga-factura-respuesta-mobile .info-resultado-detail-pago {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin-left: 0 !important;
        margin-top: 0 !important;
    }

    .descarga-factura-respuesta-mobile .facturaEncontradaItem,
    .descarga-factura-respuesta-mobile .facturaEncontradaItemTitulo,
    .descarga-factura-respuesta-mobile .mensajesFactura,
    .descarga-factura-respuesta-mobile .mensajesFacturaTitulo {
        font-size: inherit !important;
        width: auto !important;
        height: auto !important;
        line-height: normal !important;
    }

    .descarga-factura-respuesta-mobile .descarga-factura-boton .btnRedPrimario,
    .descarga-factura-respuesta-mobile .descarga-factura-boton-certificado .btnRedPrimario {
        width: 100% !important;
        height: auto !important;
        padding: 10px 16px !important;
    }

    .descarga-factura-respuesta-mobile .descarga-factura-boton-pago .btnRedSecundario {
        width: 100% !important;
        height: auto !important;
    }

    /* Mobile result container: no fixed dimensions from SDH */
    #table-download-mobile {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
    #table-download-mobile > div {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}
