/**
 * Frontend Editor Pro - Frontend Display & Legal Modal Styles
 * v2.1 - Estili legali e supporto visualizzazione visitatori
 */

/* ==========================================================================
   POPUP MODALE POLICY (PRIVACY POLICY / COOKIE POLICY)
   ========================================================================== */

.fep-legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    box-sizing: border-box;
}

.fep-legal-modal * {
    box-sizing: border-box;
}

.fep-legal-modal.show {
    opacity: 1;
    visibility: visible;
}

.fep-legal-modal-content {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 680px;
    max-height: 88vh;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(12px);
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
}

.fep-legal-modal.show .fep-legal-modal-content {
    transform: scale(1) translateY(0);
}

.fep-legal-modal-header {
    background: #0f172a;
    color: #ffffff;
    padding: 1.2rem 1.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.fep-legal-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.fep-legal-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
    padding: 0;
}

.fep-legal-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.fep-legal-modal-body {
    padding: 1.6rem 1.8rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    font-size: 0.94rem;
    line-height: 1.68;
    color: #334155;
}

.fep-legal-section {
    margin-bottom: 1.35rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #f1f5f9;
}

.fep-legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.fep-legal-section h4 {
    margin: 0 0 0.45rem 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
}

.fep-legal-section p {
    margin: 0;
    color: #475569;
}

.fep-legal-section strong {
    color: #0f172a;
}

.fep-legal-footer-note {
    background: #f8fafc;
    border-left: 4px solid #0284c7;
    padding: 0.85rem 1.1rem;
    border-radius: 6px;
    margin-top: 1.3rem;
    font-size: 0.83rem;
    color: #64748b;
    line-height: 1.55;
}

.fep-legal-footer-note p {
    margin: 0;
}

.fep-legal-modal-footer {
    padding: 1rem 1.6rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.fep-legal-btn-close {
    background: #0ea5e9;
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.fep-legal-btn-close:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

/* Responsività su mobile */
@media (max-width: 640px) {
    .fep-legal-modal {
        padding: 0.75rem;
    }
    .fep-legal-modal-content {
        max-height: 92vh;
        border-radius: 16px;
    }
    .fep-legal-modal-header {
        padding: 1rem 1.25rem;
    }
    .fep-legal-modal-header h3 {
        font-size: 1.05rem;
    }
    .fep-legal-modal-body {
        padding: 1.25rem;
        font-size: 0.89rem;
    }
    .fep-legal-modal-footer {
        padding: 0.85rem 1.25rem;
    }
    .fep-legal-btn-close {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1.5rem;
    }
}
