/**
 * Granatello - Fullscreen Iframe Styles
 * Stili per iframe a schermo intero con header mantenuto
 */

/* Container principale per iframe fullscreen */
.fullscreen-iframe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: none;
    flex-direction: column;
}

.fullscreen-iframe-container.active {
    display: flex;
}

/* Header del fullscreen iframe */
.fullscreen-iframe-header {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 10000;
}

/* Navbar nel fullscreen */
.fullscreen-navbar {
    display: flex;
    align-items: center;
    justify-content: between;
    max-width: 7xl;
    margin: 0 auto;
    padding: 0 1rem;
    height: 80px;
}

/* Logo nel fullscreen */
.fullscreen-logo {
    flex-shrink: 0;
    margin-right: 2rem;
}

.fullscreen-logo img {
    height: 48px;
    width: auto;
}

/* Menu nel fullscreen */
.fullscreen-menu {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 2rem;
}

.fullscreen-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fullscreen-menu a:hover {
    color: #D4AF37;
}

.fullscreen-menu a.active {
    color: #D4AF37;
    font-weight: 600;
}

/* Controls nel fullscreen */
.fullscreen-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* Info sito corrente */
.fullscreen-site-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-size: 12px;
    background: rgba(212, 175, 55, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.fullscreen-site-info .site-icon {
    width: 16px;
    height: 16px;
    background: #D4AF37;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-site-info .site-icon i {
    font-size: 8px;
    color: #000;
}

.fullscreen-site-name {
    font-weight: 500;
    color: #D4AF37;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Pulsante chiudi */
.fullscreen-close-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.fullscreen-close-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    transform: scale(1.1);
}

/* Contenuto iframe */
.fullscreen-iframe-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.fullscreen-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* Loading state */
.fullscreen-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #D4AF37;
    font-size: 1.2rem;
    font-weight: 600;
}

.fullscreen-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(212, 175, 55, 0.3);
    border-top: 4px solid #D4AF37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive per mobile */
@media (max-width: 1024px) {
    .fullscreen-navbar {
        padding: 0 0.5rem;
        height: 70px;
    }
    
    .fullscreen-menu {
        display: none; /* Nasconde menu su mobile per più spazio */
    }
    
    .fullscreen-site-info {
        font-size: 11px;
        padding: 0.2rem 0.5rem;
    }
    
    .fullscreen-site-name {
        max-width: 100px;
    }
}

@media (max-width: 768px) {
    .fullscreen-navbar {
        height: 60px;
        gap: 1rem;
    }
    
    .fullscreen-logo img {
        height: 32px;
    }
    
    .fullscreen-close-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .fullscreen-site-info {
        font-size: 10px;
        max-width: 120px;
    }
    
    .fullscreen-site-name {
        max-width: 80px;
    }
}

/* Animazioni di entrata/uscita */
.fullscreen-iframe-container.entering {
    animation: fadeInScale 0.3s ease-out;
}

.fullscreen-iframe-container.exiting {
    animation: fadeOutScale 0.3s ease-in;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutScale {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Stato di errore */
.fullscreen-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
}

.fullscreen-error h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.fullscreen-error p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.fullscreen-error button {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.fullscreen-error button:hover {
    background: #dc2626;
}

/* Overlay di sicurezza */
.fullscreen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    display: none;
}

.fullscreen-overlay.active {
    display: block;
}