/* Modal Iframe Plugin Styles */

/* Iframe Container Styles */
.iframe-container {
    position: relative;
    width: 100%;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.iframe-container iframe {
    display: block;
    width: 100%;
    border: none;
    border-radius: 8px;
}

.iframe-embedded {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Modal Styles */
.mip-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.mip-modal-content {
    position: relative;
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    max-height: 800px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mip-close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: #666;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mip-close:hover,
.mip-close:focus {
    color: #000;
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.mip-modal-header {
    padding: 20px 30px 10px;
    border-bottom: 1px solid #e5e7eb;
}

.mip-modal-header h3 {
    margin: 0;
    color: #374151;
    font-size: 18px;
    font-weight: 600;
}

.mip-modal-body {
    height: calc(100% - 80px);
    padding: 0;
}

.mip-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 12px 12px;
}

/* Button Styles */
.mip-button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.mip-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.mip-button:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mip-modal-content {
        width: 95%;
        height: 95%;
        margin: 2.5% auto;
    }

    .mip-modal-header {
        padding: 15px 20px 10px;
    }

    .mip-modal-header h3 {
        font-size: 16px;
    }

    .mip-close {
        right: 10px;
        top: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }

    .iframe-container {
        margin: 15px 0;
    }
}

/* Loading State */
.iframe-container.loading {
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.iframe-container.loading::after {
    content: "Loading...";
    color: #6b7280;
    font-size: 14px;
}

/* Error State */
.iframe-container.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 20px;
    text-align: center;
    color: #dc2626;
}

/* Accessibility */
.mip-modal:focus {
    outline: none;
}

.mip-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .mip-modal {
        display: none !important;
    }

    .mip-button {
        display: none !important;
    }
}

/* Default Button Styles */
.mip-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

.mip-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.mip-button:active {
    transform: translateY(0);
}

/* Loading State */
.mip-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #f8f9fa;
}

.mip-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e1e5e9;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: mipSpin 1s linear infinite;
}

/* Animations */
@keyframes mipSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mip-modal {
        background-color: rgba(0, 0, 0, 0.9);
    }

    .mip-modal-content {
        border: 2px solid #000;
    }

    .mip-button {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .mip-modal,
    .mip-modal-content,
    .mip-close,
    .mip-button {
        animation: none;
        transition: none;
    }
}