/* adcolima-widgets.php - Frontend styles v1.0.9 */

/* Widgets container */
.adw-widgets-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.adw-widget-item {
    width: 100%;
    margin-bottom: 16px;
    background: transparent;
    overflow: visible;
    position: relative;
    height: auto;
    min-height: auto;
}

/* Imágenes - deben ocupar TODO el ancho */
.adw-widgets-container img,
.adw-widget-item img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
}

.adw-widgets-container a {
    display: block;
    width: 100%;
    height: auto;
}

/* Bloques de código - contenedor base con altura automática */
.adw-code-wrapper {
    width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    display: block !important;
    text-align: center;
    overflow: visible !important;
    position: relative !important;
    background: transparent !important;
}

/* Divs internos de Google Ads - altura automática */
.adw-code-wrapper > div,
.adw-code-wrapper div[id^="div-gpt-ad"],
.adw-code-wrapper div[id*="google"] {
    width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
    position: relative !important;
    margin: 0 auto !important;
}

/* Imágenes dentro de bloques de código */
.adw-code-wrapper img,
.adw-code-wrapper a img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    max-height: none !important;
}

/* Enlaces dentro de bloques de código */
.adw-code-wrapper a {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    text-align: center !important;
    overflow: visible !important;
}

/* Scripts dentro del wrapper */
.adw-code-wrapper script {
    display: none !important;
}

/* Iframes de Google Ads */
.adw-code-wrapper iframe {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
}

/* Forzar que todos los contenedores padres respeten la altura */
.adw-widgets-container,
.adw-widgets-container > *,
.adw-widget-item,
.adw-widget-item > *,
.adw-code-wrapper,
.adw-code-wrapper > * {
    max-height: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .adw-widget-item {
        margin-bottom: 12px;
    }
}
