.wpmkt-zone {
    position: relative;
    margin: 1em 0;
    text-align: center;
}

.wpmkt-banner {
    position: relative;
    display: block;
    margin: 0 auto;
    overflow: hidden;
}

.wpmkt-banner img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.wpmkt-banner a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.wpmkt-banner a:hover {
    text-decoration: none;
}

/* Etiqueta de publicidad */
.wpmkt-ad-label {
    position: absolute;
    top: 1px;
    right: 1px;
    background-color: rgba(255, 255, 255, 0.6);
    color: #6a6a6a;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 0 0 0 3px;
    z-index: 20;
    font-weight: normal;
    line-height: 1.2;
    white-space: nowrap;
}

.wpmkt-banner-content {
    position: relative;
    width: 100%;
    height: 100%;
    border: 1px solid #f2f2f2;
    background-color: #f2f2f2;
    overflow: hidden; 
    display: none;
}

.wpmkt-banner-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 14px;
    border: 1px dashed #dee2e6;
    border-radius: 4px;
}

.wpmkt-banner-zone {
    position: relative;
    min-height: 50px;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.wpmkt-banner-zone:empty::before {
    content: "Zona de banner - " attr(data-type);
    color: #6c757d;
    font-style: italic;
}

.wpmkt-banner-zone[data-loaded="true"] {
    border: none;
    background: transparent;
    padding: 0;
}

.wpmkt-banner-zone[data-loaded="true"]::before {
    display: none;
}

/* Estilos para diferentes tipos de banner */
.wpmkt-banner.wpmkt-banner-fixed[data-type="leaderboard"] {
    max-width: 728px;
    height: 90px;
}

.wpmkt-banner.wpmkt-banner-fixed[data-type="leaderboard_mobile"] {
    max-width: 320px;
    height: 90px;
}

.wpmkt-banner.wpmkt-banner-fixed[data-type="rectangle"] {
    max-width: 300px;
    height: 250px;
}

.wpmkt-banner.wpmkt-banner-fixed[data-type="halfpage"] {
    max-width: 300px;
    height: 600px;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .wpmkt-banner.wpmkt-banner-fixed[data-type="leaderboard"] {
    max-width: 100%;
    height: auto;
    }
    
    .wpmkt-banner.wpmkt-banner-fixed[data-type="halfpage"] {
        display: none; /* Ocultar media página en móvil */
    }
}

/* Estilos para el admin */
.wpmkt-admin-banner-preview {
    border: 2px solid #007cba;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    background: #fff;
}

.wpmkt-admin-banner-preview h4 {
    margin: 0 0 10px 0;
    color: #007cba;
}

.wpmkt-admin-banner-stats {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

.wpmkt-admin-banner-stats .stat-item {
    display: inline-block;
    margin-right: 20px;
    font-size: 14px;
}

.wpmkt-admin-banner-stats .stat-label {
    font-weight: bold;
    color: #495057;
}

.wpmkt-admin-banner-stats .stat-value {
    color: #007cba;
}

/* Estilos para mensajes de error */
.wpmkt-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-size: 14px;
}

.wpmkt-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-size: 14px;
}

.wpmkt-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-size: 14px;
}

/* Estilos para el loading */
.wpmkt-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: wpmkt-spin 1s linear infinite;
}

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

/* Estilos para el debug (solo en desarrollo) */
.wpmkt-debug {
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    font-family: monospace;
    font-size: 12px;
    color: #495057;
}

.wpmkt-debug .debug-item {
    margin: 5px 0;
}

.wpmkt-debug .debug-label {
    font-weight: bold;
    color: #007cba;
}

/* Estilos para el contador de impresiones */
.wpmkt-impression-counter {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 2px;
    opacity: 0.8;
}

/* Estilos para el hover en banners */
.wpmkt-banner:hover .wpmkt-impression-counter {
    opacity: 1;
}

/* Estilos para banners deshabilitados */
.wpmkt-banner-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.wpmkt-banner-disabled::after {
    content: "Deshabilitado";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Estilos para diferentes formatos */
.wpmkt-banner[data-format="image"] {
    /* Estilos específicos para banners de imagen */
}

.wpmkt-banner[data-format="html"] {
    /* Estilos específicos para banners HTML */
}

.wpmkt-banner[data-format="video"] {
    /* Estilos específicos para banners de video */
}

/* Estilos para diferentes dispositivos */
.wpmkt-banner[data-device="desktop"] {
    display: none;
}

.wpmkt-banner[data-device="mobile"] {
    display: none;
}

@media screen and (min-width: 769px) {
    .wpmkt-banner[data-device="desktop"] {
        display: block;
    }
}

@media screen and (max-width: 768px) {
    .wpmkt-banner[data-device="mobile"] {
        display: block;
    }
}

/* Estilos para diferentes zonas */
.wpmkt-zone[data-zone="header"] {
    /* Estilos específicos para la zona de encabezado */
}

.wpmkt-zone[data-zone="sidebar"] {
    /* Estilos específicos para la zona de barra lateral */
}

.wpmkt-zone[data-zone="content"] {
    /* Estilos específicos para la zona de contenido */
}

.wpmkt-zone[data-zone="footer"] {
    /* Estilos específicos para la zona de pie de página */
}

/* Estilos para estados de carga */
.wpmkt-zone.loading {
    min-height: 100px;
    background: #f5f5f5;
    position: relative;
}

.wpmkt-zone.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #ddd;
    border-top-color: #666;
    border-radius: 50%;
    animation: wpmkt-spin 1s linear infinite;
}

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

/* Estilos para mensajes de información */
.wpmkt-info {
    padding: 1em;
    margin: 1em 0;
    background: #fff;
    border-left: 4px solid #00a0d2;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.wpmkt-banner-image {
    display: block;
    text-decoration: none;
    color: inherit;
}

.wpmkt-banner-image:hover {
    text-decoration: none;
}

.wpmkt-banner-script {
    display: block;
    position: relative;
}

/* Loading state */
.ad-slot {
    min-height: 50px;
    position: relative;
}

.ad-slot:empty::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: wpmkt-spin 1s linear infinite;
}

@keyframes wpmkt-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

