/**
 * Iframe Shortcode Styles
 *
 * Minimal styling for the booking iframe.
 *
 * @package    Lgar_Any_Rent
 * @subpackage Lgar_Any_Rent/shortcodes/assets/css
 * @author     Logrise <info@logrise.com>
 * @license    GPL-2.0+
 */

/* ============================================
   Iframe Wrapper & Loader
   ============================================ */

.lgar-iframe-wrapper {
    position: relative;
    width: 100%;
    min-height: 600px;
}

.lgar-iframe-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.lgar-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #e5007e;
    border-radius: 50%;
    animation: lgar-spin 0.8s linear infinite;
}

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

.lgar-loader-text {
    margin-top: 20px;
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* ============================================
   Iframe Element
   ============================================ */

.lgar-booking-iframe {
    display: block;
    width: 100%;
    border: none;
    background: #fff;
    transition: opacity 0.3s ease;
}

/* ============================================
   Error State
   ============================================ */

.lgar-iframe-error-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
    margin: 20px 0;
}

.lgar-iframe-error {
    padding: 60px 40px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.lgar-iframe-error-icon {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lgar-iframe-error-icon svg {
    display: block;
    margin: 0 auto;
    opacity: 0.9;
}

.lgar-iframe-error-message {
    font-size: 18px;
    color: #333;
    margin: 0 0 30px;
    line-height: 1.6;
}

.lgar-iframe-settings-link {
    display: inline-block;
    background: #e5007e;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(217, 28, 92, 0.3);
}

.lgar-iframe-settings-link:hover {
    background: #c01850;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 28, 92, 0.4);
    color: #fff;
}

.lgar-iframe-settings-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(217, 28, 92, 0.3);
}

/* ============================================
   Responsive Design
   ============================================ */

/* Mobile (large) */
@media (max-width: 768px) {
    .lgar-iframe-error {
        padding: 30px 20px;
    }

    .lgar-iframe-error-icon svg {
        width: 48px;
        height: 48px;
    }

    .lgar-iframe-error-message {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .lgar-iframe-settings-link {
        padding: 12px 28px;
        font-size: 15px;
    }
}

/* Mobile (small) */
@media (max-width: 480px) {
    .lgar-iframe-error {
        padding: 24px 16px;
    }

    .lgar-iframe-error-icon svg {
        width: 40px;
        height: 40px;
    }

    .lgar-iframe-error-message {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .lgar-iframe-settings-link {
        width: 100%;
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* ============================================
   Accessibility
   ============================================ */

/* Focus states */
.lgar-iframe-settings-link:focus {
    outline: 3px solid #e5007e;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .lgar-booking-iframe,
    .lgar-iframe-settings-link {
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .lgar-iframe-error-container {
        border: 2px solid currentColor;
    }

    .lgar-iframe-error-message {
        color: #000;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .lgar-iframe-error-container {
        background: #1a1a1a;
    }

    .lgar-iframe-error-message {
        color: #ddd;
    }
}
