/**
 * Public Styles - Privacy & Cookie Manager
 * Stili per le pagine pubbliche Privacy e Cookie Policy
 */

:root {
    --pcm-primary: #667eea;
    --pcm-secondary: #764ba2;
    --pcm-accent: #3498db;
    --pcm-success: #27ae60;
    --pcm-warning: #f39c12;
    --pcm-danger: #e74c3c;
    --pcm-text-dark: #2c3e50;
    --pcm-text-light: #7f8c8d;
    --pcm-bg-main: #ffffff;
    --pcm-bg-light: #f8f9fa;
    --pcm-bg-highlight: #e8f6f3;
    --pcm-border: #e9ecef;
    --pcm-shadow-light: rgba(0, 0, 0, 0.1);
    --pcm-shadow-medium: rgba(0, 0, 0, 0.15);
}

/* Container principale */
.pcm-privacy-container,
.pcm-cookie-container {
    max-width: 1000px;
    margin: 20px auto;
    background: var(--pcm-bg-main);
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--pcm-shadow-light);
    overflow: hidden;
    border: 1px solid var(--pcm-border);
}

/* Header */
.pcm-header {
    background: linear-gradient(135deg, var(--pcm-primary) 0%, var(--pcm-secondary) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pcm-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pcmFloat 6s ease-in-out infinite;
}

@keyframes pcmFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.pcm-header h1 {
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.pcm-header p {
    font-size: 1.2em;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* Content */
.pcm-content {
    padding: 40px 30px;
}

/* Table of Contents */
.pcm-toc {
    background: var(--pcm-bg-light);
    border: 2px solid var(--pcm-border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 35px;
}

.pcm-toc h2 {
    color: var(--pcm-primary);
    font-size: 1.4em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    border: none;
    padding: 0;
}

.pcm-toc h2::before {
    content: "📋";
    margin-right: 10px;
    font-size: 1.2em;
}

.pcm-toc ul {
    list-style: none;
    columns: 2;
    column-gap: 30px;
    margin: 0;
    padding: 0;
}

.pcm-toc li {
    margin-bottom: 8px;
    break-inside: avoid;
}

.pcm-toc a {
    color: var(--pcm-accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    padding: 5px 10px;
    border-radius: 5px;
}

.pcm-toc a:hover {
    background-color: var(--pcm-bg-highlight);
    transform: translateX(5px);
}

/* Sections */
.pcm-section {
    margin-bottom: 35px;
    scroll-margin-top: 100px;
}

.pcm-section h2 {
    color: var(--pcm-primary);
    font-size: 1.9em;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--pcm-border);
    display: flex;
    align-items: center;
}

.pcm-section h2::before {
    content: "🔒";
    margin-right: 12px;
    font-size: 0.8em;
}

.pcm-cookie-container .pcm-section h2::before {
    content: "🍪";
}

.pcm-section h3 {
    color: var(--pcm-text-dark);
    font-size: 1.4em;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.pcm-section p {
    margin-bottom: 18px;
    line-height: 1.8;
    text-align: justify;
}

.pcm-section ul,
.pcm-section ol {
    margin: 15px 0 20px 25px;
}

.pcm-section li {
    margin-bottom: 10px;
    line-height: 1.7;
}

/* Highlight Boxes */
.pcm-highlight-box {
    background: var(--pcm-bg-highlight);
    border-left: 5px solid var(--pcm-success);
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    position: relative;
}

.pcm-highlight-box::before {
    content: "💡";
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.2em;
}

.pcm-highlight-box p {
    margin-left: 30px;
    margin-bottom: 0;
    font-weight: 500;
}

/* Warning Box */
.pcm-warning-box {
    background: #fff3cd;
    border-left: 5px solid var(--pcm-warning);
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    position: relative;
}

.pcm-warning-box::before {
    content: "⚠️";
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.2em;
}

.pcm-warning-box p {
    margin-left: 30px;
    margin-bottom: 0;
}

/* Info Box */
.pcm-info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid var(--pcm-accent);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.pcm-info-box h3 {
    color: var(--pcm-accent);
    margin-bottom: 15px;
    margin-top: 0;
}

.pcm-info-box p {
    margin-bottom: 10px;
}

.pcm-info-box p:last-child {
    margin-bottom: 0;
}

/* Contact Box */
.pcm-contact-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid var(--pcm-accent);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.pcm-contact-box h3 {
    color: var(--pcm-accent);
    margin-bottom: 15px;
    margin-top: 0;
}

.pcm-contact-box p {
    margin-bottom: 10px;
}

.pcm-contact-box a {
    color: var(--pcm-primary);
    text-decoration: none;
}

.pcm-contact-box a:hover {
    text-decoration: underline;
}

/* Quick Summary */
.pcm-quick-summary {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid var(--pcm-warning);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 35px;
    position: relative;
}

.pcm-quick-summary::before {
    content: '⚡';
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 1.5em;
}

.pcm-quick-summary h2 {
    color: var(--pcm-warning);
    margin-left: 40px;
    margin-bottom: 15px;
    font-size: 1.4em;
    border: none;
    padding: 0;
}

.pcm-quick-summary p {
    margin-left: 40px;
    font-weight: 500;
    margin-bottom: 0;
}

/* Data Tables */
.pcm-data-table,
.pcm-cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--pcm-bg-main);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--pcm-shadow-light);
}

.pcm-data-table th,
.pcm-cookie-table th {
    background: var(--pcm-primary);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.pcm-data-table td,
.pcm-cookie-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--pcm-border);
    vertical-align: top;
}

.pcm-data-table tr:hover,
.pcm-cookie-table tr:hover {
    background-color: var(--pcm-bg-light);
}

.pcm-cookie-name {
    font-weight: 600;
    color: var(--pcm-primary);
    font-family: 'Courier New', monospace;
}

/* Cookie Categories */
.pcm-cookie-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.pcm-cookie-category.pcm-essential {
    background: var(--pcm-success);
    color: white;
}

.pcm-cookie-category.pcm-analytics {
    background: var(--pcm-accent);
    color: white;
}

.pcm-cookie-category.pcm-marketing {
    background: var(--pcm-warning);
    color: white;
}

.pcm-cookie-category.pcm-functional {
    background: var(--pcm-secondary);
    color: white;
}

/* Rights Grid */
.pcm-rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.pcm-right-card {
    background: var(--pcm-bg-light);
    border: 2px solid var(--pcm-border);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.pcm-right-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--pcm-shadow-medium);
    border-color: var(--pcm-accent);
}

.pcm-right-card h4 {
    color: var(--pcm-primary);
    margin-bottom: 10px;
    font-size: 1.2em;
    margin-top: 0;
}

.pcm-right-card p {
    margin: 0;
}

/* Browser Grid */
.pcm-browser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.pcm-browser-card {
    background: var(--pcm-bg-light);
    border: 2px solid var(--pcm-border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.pcm-browser-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--pcm-shadow-medium);
    border-color: var(--pcm-accent);
}

.pcm-browser-card h4 {
    color: var(--pcm-primary);
    margin-bottom: 15px;
    font-size: 1.1em;
    margin-top: 0;
}

.pcm-browser-card .pcm-browser-icon {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
}

.pcm-browser-card a {
    color: var(--pcm-accent);
    text-decoration: none;
    font-weight: 500;
}

.pcm-browser-card a:hover {
    text-decoration: underline;
}

.pcm-browser-card p {
    margin: 0;
}

/* Consent Panel */
.pcm-consent-panel {
    background: var(--pcm-bg-light);
    border: 2px solid var(--pcm-border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 35px;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.pcm-consent-panel h2 {
    color: var(--pcm-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    border: none;
    padding: 0;
    font-size: 1.4em;
}

.pcm-consent-panel h2::before {
    content: '⚙️';
    margin-right: 10px;
}

/* Consent Controls */
.pcm-consent-controls {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.pcm-consent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--pcm-border);
    transition: all 0.3s ease;
    animation: pcmSlideIn 0.5s ease forwards;
    opacity: 0;
    transform: translateX(-20px);
}

.pcm-consent-item:nth-child(1) { animation-delay: 0.1s; }
.pcm-consent-item:nth-child(2) { animation-delay: 0.2s; }
.pcm-consent-item:nth-child(3) { animation-delay: 0.3s; }
.pcm-consent-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes pcmSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.pcm-consent-item:hover {
    box-shadow: 0 4px 12px var(--pcm-shadow-light);
}

.pcm-consent-item.pcm-required {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    border-color: var(--pcm-success);
}

.pcm-consent-info {
    flex: 1;
}

.pcm-consent-info h4 {
    color: var(--pcm-text-dark);
    margin-bottom: 5px;
    font-size: 1.1em;
    margin-top: 0;
}

.pcm-consent-info p {
    color: var(--pcm-text-light);
    font-size: 0.9em;
    margin: 0;
}

/* Toggle Switch */
.pcm-consent-toggle {
    position: relative;
    width: 60px;
    height: 34px;
}

.pcm-consent-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pcm-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.pcm-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .pcm-slider {
    background-color: var(--pcm-success);
}

input:checked + .pcm-slider:before {
    transform: translateX(26px);
}

input:disabled + .pcm-slider {
    background-color: var(--pcm-success);
    opacity: 0.7;
    cursor: not-allowed;
}

/* Consent Buttons */
.pcm-consent-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.pcm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pcm-btn-primary {
    background: var(--pcm-primary);
    color: white;
}

.pcm-btn-primary:hover {
    background: var(--pcm-secondary);
    transform: translateY(-2px);
}

.pcm-btn-success {
    background: var(--pcm-success);
    color: white;
}

.pcm-btn-success:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.pcm-btn-outline {
    background: transparent;
    color: var(--pcm-primary);
    border: 2px solid var(--pcm-primary);
}

.pcm-btn-outline:hover {
    background: var(--pcm-primary);
    color: white;
}

/* Consent Status Box */
.pcm-consent-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--pcm-bg-main);
    border: 2px solid var(--pcm-border);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 15px var(--pcm-shadow-medium);
    z-index: 1000;
    max-width: 300px;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateX(0);
}

.pcm-consent-status.pcm-hidden {
    opacity: 0;
    transform: translateX(400px);
    pointer-events: none;
}

.pcm-consent-status-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.pcm-consent-status h4 {
    margin: 0;
    color: var(--pcm-primary);
    flex: 1;
    font-size: 1.1em;
}

.pcm-consent-status-close {
    background: none;
    border: none;
    font-size: 1.4em;
    color: var(--pcm-text-light);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 10px;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcm-consent-status-close:hover {
    background: var(--pcm-danger);
    color: white;
    transform: scale(1.1);
}

.pcm-consent-status p {
    margin: 0;
    font-size: 0.9em;
}

.pcm-manage-cookies-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: var(--pcm-primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pcm-manage-cookies-link:hover {
    background: var(--pcm-secondary);
    transform: translateY(-2px);
}

/* Notification */
.pcm-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--pcm-success);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10000;
    font-weight: 600;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.pcm-notification.pcm-show {
    transform: translateX(0);
}

.pcm-notification.pcm-info {
    background: var(--pcm-accent);
}

.pcm-notification.pcm-warning {
    background: var(--pcm-warning);
}

.pcm-notification.pcm-error {
    background: var(--pcm-danger);
}

/* Footer */
.pcm-footer {
    background: var(--pcm-text-dark);
    color: white;
    padding: 30px;
    text-align: center;
}

.pcm-footer p {
    margin: 10px 0;
}

.pcm-footer a {
    color: var(--pcm-accent);
    text-decoration: none;
}

.pcm-footer a:hover {
    text-decoration: underline;
}

/* Last Update */
.pcm-last-update {
    text-align: center;
    font-style: italic;
    color: var(--pcm-text-light);
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid var(--pcm-border);
}

.pcm-last-update p {
    margin: 5px 0;
}

/* Scroll to Top Button */
.pcm-scroll-top {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: var(--pcm-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.pcm-scroll-top.pcm-visible {
    opacity: 1;
    visibility: visible;
}

.pcm-scroll-top:hover {
    background: var(--pcm-secondary);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .pcm-privacy-container,
    .pcm-cookie-container {
        margin: 10px;
        border-radius: 10px;
    }

    .pcm-header {
        padding: 30px 20px;
    }

    .pcm-header h1 {
        font-size: 2.2em;
    }

    .pcm-content {
        padding: 25px 20px;
    }

    .pcm-toc ul {
        columns: 1;
    }

    .pcm-consent-buttons {
        flex-direction: column;
    }

    .pcm-browser-grid,
    .pcm-rights-grid {
        grid-template-columns: 1fr;
    }

    .pcm-section h2 {
        font-size: 1.6em;
    }

    .pcm-consent-status {
        position: static;
        margin: 20px 0;
        max-width: none;
    }

    .pcm-consent-status.pcm-hidden {
        display: none;
    }

    .pcm-consent-panel {
        position: relative;
        top: 0;
    }

    .pcm-data-table,
    .pcm-cookie-table {
        font-size: 0.9em;
    }

    .pcm-data-table th,
    .pcm-data-table td,
    .pcm-cookie-table th,
    .pcm-cookie-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .pcm-header h1 {
        font-size: 1.8em;
    }

    .pcm-data-table,
    .pcm-cookie-table {
        font-size: 0.8em;
        display: block;
        overflow-x: auto;
    }
}

/* Print Styles */
@media print {
    .pcm-scroll-top,
    .pcm-toc,
    .pcm-consent-panel,
    .pcm-consent-status {
        display: none;
    }

    .pcm-privacy-container,
    .pcm-cookie-container {
        box-shadow: none;
        border: none;
    }

    .pcm-header {
        background: white !important;
        color: black !important;
    }
}

/* Accessibilità */
.keyboard-navigation .pcm-consent-status-close:focus,
.keyboard-navigation .pcm-btn:focus,
.keyboard-navigation .pcm-toc a:focus {
    outline: 2px solid var(--pcm-accent);
    outline-offset: 2px;
}
/* SOVRAPPOSIZIONE: Stili aggiuntivi per garantire visibilità consent box */

/* Consent Status Box - Stili di fallback per garantire sempre la visibilità */
.pcm-consent-status {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    background: #ffffff !important;
    border: 2px solid #e9ecef !important;
    border-radius: 10px !important;
    padding: 15px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
    z-index: 10000 !important;
    max-width: 300px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #2c3e50 !important;
}

.pcm-consent-status * {
    box-sizing: border-box !important;
}

.pcm-consent-status h4 {
    margin: 0 0 8px 0 !important;
    color: #667eea !important;
    font-size: 1.1em !important;
    font-weight: 600 !important;
}

.pcm-consent-status p {
    margin: 0 0 10px 0 !important;
    font-size: 0.9em !important;
    color: #2c3e50 !important;
}

.pcm-consent-status-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 8px !important;
}

.pcm-consent-status-close {
    background: none !important;
    border: 1px solid #ddd !important;
    font-size: 1.2em !important;
    color: #7f8c8d !important;
    cursor: pointer !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
    margin-left: 8px !important;
}

.pcm-consent-status-close:hover {
    background: #e74c3c !important;
    color: white !important;
    border-color: #e74c3c !important;
}

.pcm-manage-cookies-link {
    display: inline-block !important;
    padding: 8px 12px !important;
    background: #667eea !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    font-size: 0.9em !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.pcm-manage-cookies-link:hover {
    background: #764ba2 !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
}

.pcm-consent-status.pcm-hidden {
    opacity: 0 !important;
    transform: translateX(400px) !important;
    pointer-events: none !important;
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .pcm-consent-status {
        position: fixed !important;
        bottom: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
    }
}

/* FINE SOVRAPPOSIZIONE */
