/* ============================================
   COOKIE CONSENT - La Cassaforte Digitale
   Prefisso: lcd- (isolato da altri CSS)
   Font forzati in px per evitare override
   ============================================ */

/* Reset e font isolato per il cookie banner */
.lcd-cookie-overlay,
.lcd-cookie-overlay *,
.lcd-cookie-banner,
.lcd-cookie-banner *,
.lcd-cookie-trigger,
.lcd-cookie-trigger * {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    line-height: 1.5 !important;
    font-size: 16px !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 400 !important;
    font-style: normal !important;
}

/* Overlay sfondo */
.lcd-cookie-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 99998 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
}

.lcd-cookie-overlay.lcd-active {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Banner principale */
.lcd-cookie-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border-top: 3px solid #14BC84 !important;
    box-shadow: 0 -10px 60px rgba(0, 0, 0, 0.15) !important;
    z-index: 99999 !important;
    transform: translateY(100%) !important;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 0 !important;
}

.lcd-cookie-banner.lcd-active {
    transform: translateY(0) !important;
}

.lcd-cookie-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 28px 24px !important;
    background: transparent !important;
    border: none !important;
}

/* Header del banner */
.lcd-cookie-header {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.lcd-cookie-icon {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    background: linear-gradient(135deg, #14BC84 0%, #10b981 100%) !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 28px !important;
    box-shadow: 0 4px 16px rgba(20, 188, 132, 0.3) !important;
    flex-shrink: 0 !important;
    border: none !important;
}

.lcd-cookie-title {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.3 !important;
}

.lcd-cookie-subtitle {
    font-size: 15px !important;
    color: #64748b !important;
    margin: 6px 0 0 0 !important;
    padding: 0 !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}

/* Contenuto principale */
.lcd-cookie-content {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 32px !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

.lcd-cookie-text {
    font-size: 16px !important;
    color: #475569 !important;
    line-height: 1.7 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 400 !important;
}

.lcd-cookie-text a {
    color: #14BC84 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.lcd-cookie-text a:hover {
    color: #0d9668 !important;
    text-decoration: underline !important;
}

/* Bottoni */
.lcd-cookie-buttons {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

.lcd-cookie-btn {
    padding: 14px 28px !important;
    border-radius: 50px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: none !important;
    white-space: nowrap !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.4 !important;
    min-height: 48px !important;
    margin: 0 !important;
}

.lcd-cookie-btn-accept {
    background: linear-gradient(135deg, #14BC84 0%, #10b981 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(20, 188, 132, 0.4) !important;
}

.lcd-cookie-btn-accept:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 24px rgba(20, 188, 132, 0.5) !important;
}

.lcd-cookie-btn-reject {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 2px solid #e2e8f0 !important;
}

.lcd-cookie-btn-reject:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}

.lcd-cookie-btn-settings {
    background: transparent !important;
    color: #3b82f6 !important;
    padding: 14px 20px !important;
    text-decoration: underline !important;
    font-size: 16px !important;
}

.lcd-cookie-btn-settings:hover {
    color: #1d4ed8 !important;
}

/* Pannello impostazioni */
.lcd-cookie-settings-panel {
    display: none !important;
    margin-top: 24px !important;
    padding-top: 24px !important;
    border-top: 2px solid #e2e8f0 !important;
    background: transparent !important;
}

.lcd-cookie-settings-panel.lcd-active {
    display: block !important;
    animation: lcdSlideDown 0.3s ease !important;
}

@keyframes lcdSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Categorie cookie */
.lcd-cookie-category {
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 20px 24px !important;
    margin: 0 0 16px 0 !important;
    transition: border-color 0.3s ease !important;
}

.lcd-cookie-category:hover {
    border-color: #14BC84 !important;
}

.lcd-cookie-category:last-of-type {
    margin-bottom: 0 !important;
}

.lcd-cookie-category-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

.lcd-cookie-category-info {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.lcd-cookie-category-icon {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.lcd-cookie-category-icon.lcd-necessary {
    background: linear-gradient(135deg, #14BC84 0%, #10b981 100%) !important;
}

.lcd-cookie-category-icon.lcd-analytics {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.lcd-cookie-category-icon.lcd-marketing {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.lcd-cookie-category-icon.lcd-preferences {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

.lcd-cookie-category-icon i {
    color: #ffffff !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

.lcd-cookie-category-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    line-height: 1.3 !important;
}

.lcd-cookie-category-desc {
    font-size: 14px !important;
    color: #64748b !important;
    margin: 4px 0 0 0 !important;
    padding: 0 !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

/* Toggle switch */
.lcd-cookie-toggle {
    position: relative !important;
    width: 56px !important;
    height: 30px !important;
    min-width: 56px !important;
    min-height: 30px !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}

.lcd-cookie-toggle input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
}

.lcd-cookie-toggle-slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 56px !important;
    height: 30px !important;
    background: #cbd5e1 !important;
    border-radius: 30px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.lcd-cookie-toggle-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 22px !important;
    width: 22px !important;
    left: 4px !important;
    bottom: 4px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.lcd-cookie-toggle input:checked + .lcd-cookie-toggle-slider {
    background: linear-gradient(135deg, #14BC84 0%, #10b981 100%) !important;
}

.lcd-cookie-toggle input:checked + .lcd-cookie-toggle-slider:before {
    transform: translateX(26px) !important;
}

.lcd-cookie-toggle input:disabled + .lcd-cookie-toggle-slider {
    background: #14BC84 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* Badge "Sempre attivo" */
.lcd-cookie-badge-required {
    background: #ecfdf5 !important;
    color: #047857 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    border: 1px solid #a7f3d0 !important;
    display: inline-block !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

/* Bottoni impostazioni */
.lcd-cookie-settings-buttons {
    display: flex !important;
    gap: 12px !important;
    margin: 24px 0 0 0 !important;
    padding: 0 !important;
    justify-content: flex-end !important;
    border: none !important;
    background: transparent !important;
}

/* ============================================
   BOTTONE FISSO "GESTISCI COOKIE"
   ============================================ */

.lcd-cookie-trigger {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 24px !important;
    border-radius: 50px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    display: none !important;
    align-items: center !important;
    gap: 10px !important;
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.4) !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    min-height: 48px !important;
}

.lcd-cookie-trigger:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 32px rgba(30, 58, 95, 0.5) !important;
    background: linear-gradient(135deg, #2c5282 0%, #3b82f6 100%) !important;
    color: #ffffff !important;
}

.lcd-cookie-trigger i {
    font-size: 18px !important;
    color: #ffffff !important;
    line-height: 1 !important;
}

.lcd-cookie-trigger span {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

.lcd-cookie-trigger.lcd-visible {
    display: flex !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .lcd-cookie-content {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    
    .lcd-cookie-buttons {
        justify-content: center !important;
    }
}

@media (max-width: 600px) {
    .lcd-cookie-container {
        padding: 20px 16px !important;
    }
    
    .lcd-cookie-header {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .lcd-cookie-title {
        font-size: 20px !important;
    }
    
    .lcd-cookie-subtitle {
        font-size: 14px !important;
    }
    
    .lcd-cookie-text {
        font-size: 14px !important;
        text-align: center !important;
    }
    
    .lcd-cookie-text a {
        font-size: 14px !important;
    }
    
    .lcd-cookie-buttons {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .lcd-cookie-btn {
        width: 100% !important;
        text-align: center !important;
        font-size: 15px !important;
        padding: 12px 20px !important;
    }
    
    .lcd-cookie-category {
        padding: 16px !important;
    }
    
    .lcd-cookie-category-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    .lcd-cookie-category-title {
        font-size: 16px !important;
    }
    
    .lcd-cookie-category-desc {
        font-size: 13px !important;
    }
    
    .lcd-cookie-toggle {
        align-self: flex-end !important;
    }
    
    .lcd-cookie-settings-buttons {
        flex-direction: column !important;
    }
    
    .lcd-cookie-settings-buttons .lcd-cookie-btn {
        width: 100% !important;
    }
    
    /* Bottone fisso compatto su mobile */
    .lcd-cookie-trigger {
        padding: 12px 16px !important;
        bottom: 16px !important;
        left: 16px !important;
        font-size: 14px !important;
        min-height: 44px !important;
    }
    
    .lcd-cookie-trigger span {
        display: none !important;
    }
    
    .lcd-cookie-trigger i {
        font-size: 20px !important;
    }
}

/* ============================================
   OVERRIDE WHMCS SPECIFICI
   ============================================ */

/* Reset per elementi dentro il banner */
.lcd-cookie-banner h1,
.lcd-cookie-banner h2,
.lcd-cookie-banner h3,
.lcd-cookie-banner h4,
.lcd-cookie-banner h5,
.lcd-cookie-banner h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    border: none !important;
    background: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.lcd-cookie-banner p {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    font-size: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.lcd-cookie-banner a {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
}

.lcd-cookie-banner button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
}

.lcd-cookie-banner label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
}

.lcd-cookie-banner span {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
}

.lcd-cookie-banner div {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
}

/* Forza i colori del testo */
.lcd-cookie-banner,
.lcd-cookie-banner * {
    color: inherit;
}