/**
 * Pikio iFrame Auto-Resizer Styles
 * Estilos para mejorar la presentación del iframe
 */

/* Contenedor del iframe */
.pikio-iframe-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 20px 0;
}

/* Iframe responsivo */
.pikio-responsive-iframe {
    width: 100% !important;
    border: none !important;
    display: block;
    overflow: hidden;
    transition: height 0.3s ease;
}

/* Loading state */
.pikio-iframe-container.loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
}

.pikio-iframe-container.loading::after {
    content: "Cargando...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: #666;
    z-index: 11;
}

/* Spinner de carga (opcional) */
@keyframes pikio-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.pikio-iframe-container.loading-spinner::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: pikio-spin 1s linear infinite;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .pikio-iframe-container {
        margin: 15px 0;
    }
}

@media screen and (max-width: 480px) {
    .pikio-iframe-container {
        margin: 10px 0;
    }
}

/* Error state */
.pikio-iframe-error {
    background: #fee;
    border: 1px solid #fcc;
    padding: 20px;
    border-radius: 4px;
    color: #c33;
}

/* Success indicator (debug mode) */
.pikio-iframe-debug {
    position: relative;
}

.pikio-iframe-debug::after {
    content: "🔍 Debug mode activo";
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    z-index: 100;
    pointer-events: none;
}
