/* iFrame WP Frontend Styles */
.iframe-wp-container {
    position: relative;
    overflow: hidden;
    margin: 20px 0;
}

.iframe-wp-frame {
    display: block;
    max-width: 100%;
    border: none;
    transition: all 0.3s ease;
}

/* Responsive iFrame */
.iframe-wp-container.responsive {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 ratio */
}

.iframe-wp-container.responsive .iframe-wp-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Fullscreen iFrame */
.iframe-wp-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    background: #fff;
}

.iframe-wp-fullscreen {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
}

/* Loading spinner */
.iframe-wp-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: iframe-wp-spin 1s linear infinite;
}

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

/* Close button for fullscreen */
.iframe-wp-close {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    z-index: 1000000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.iframe-wp-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateX(-50%) scale(1.05);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .iframe-wp-container {
        margin: 10px 0;
    }
    
    .iframe-wp-frame {
        min-height: 300px;
    }
    
    .iframe-wp-container.responsive {
        padding-bottom: 75%; /* 4:3 ratio for mobile */
    }
}

/* Tablet responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .iframe-wp-container.responsive {
        padding-bottom: 60%; /* 16:10 ratio for tablet */
    }
}

/* Error message */
.iframe-wp-error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #c62828;
    margin: 20px 0;
}

/* Custom scrollbar for webkit browsers */
.iframe-wp-frame::-webkit-scrollbar {
    width: 8px;
}

.iframe-wp-frame::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.iframe-wp-frame::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.iframe-wp-frame::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}