/**
 * Cookie Consent Banner - Exactly Matching AppStomic Theme
 * GDPR & Italian Privacy Code Compliant
 */

/* Main Banner - Matches your theme background */
.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 999999;
    background: #0a0f1c;
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(91, 160, 147, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 500px;
    margin: 0 auto;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s ease-out;
}

.cookie-consent-banner.show {
    transform: translateY(0);
    opacity: 1;
}

/* Container */
.cookie-consent-container {
    padding: 24px;
}

/* Header - Matches your badge style */
.cookie-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.cookie-header i {
    font-size: 1.2rem;
    color: #5ba093;
}

.cookie-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0;
    letter-spacing: -0.3px;
}

/* Content Text - Matches your hero-desc */
.cookie-content p {
    color: #a7c5c0;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.cookie-link {
    color: #5ba093;
    text-decoration: none;
    transition: color 0.3s;
}

.cookie-link:hover {
    color: #fbbf24;
    text-decoration: underline;
}

/* Cookie Preferences Panel - Matches your service cards */
.cookie-preferences {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 16px;
    margin: 16px 0;
    border: 1px solid rgba(91, 160, 147, 0.15);
    display: none;
}

.cookie-preferences.show {
    display: block;
}

/* Cookie Category - Matches your contact items */
.cookie-category {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(91, 160, 147, 0.1);
}

.cookie-category:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info strong {
    display: block;
    color: white;
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.cookie-category-info p {
    margin: 0;
    font-size: 0.75rem;
    color: #a7c5c0;
    line-height: 1.4;
}

/* Toggle Switch - Custom for theme */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 34px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #5ba093;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Buttons - Exactly matching your theme buttons */
.cookie-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-family: inherit;
}

/* Primary button - matches your btn-outline */
.cookie-btn-primary {
    background: transparent;
    border: 1px solid #5ba093;
    color: #5ba093;
}

.cookie-btn-primary:hover {
    background: rgba(91, 160, 147, 0.1);
    transform: translateY(-2px);
}

/* Secondary button */
.cookie-btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #a7c5c0;
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Success button - matches your btn-primary */
.cookie-btn-success {
    background: #5ba093;
    color: white;
}

.cookie-btn-success:hover {
    background: #fbbf24;
    color: #0a0f1c;
    transform: translateY(-2px);
}

/* Link button */
.cookie-btn-link {
    background: transparent;
    color: #a7c5c0;
    text-decoration: underline;
    padding: 8px 12px;
}

.cookie-btn-link:hover {
    color: #5ba093;
}

/* Floating Settings Button - Bottom right corner */
.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0a0f1c;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(91, 160, 147, 0.3);
    border-radius: 50px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a7c5c0;
    font-size: 0.75rem;
    cursor: pointer;
    z-index: 99999;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.cookie-settings-btn:hover {
    background: #5ba093;
    color: white;
    border-color: #5ba093;
}

.cookie-settings-btn i {
    font-size: 0.8rem;
    color: #5ba093;
}

.cookie-settings-btn:hover i {
    color: white;
}

/* Responsive */
@media (max-width: 640px) {
    .cookie-consent-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .cookie-consent-container {
        padding: 18px;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
    
    .cookie-category {
        flex-wrap: wrap;
    }
    
    .cookie-toggle {
        order: 1;
    }
    
    .cookie-category-info {
        order: 2;
        width: 100%;
    }
    
    .cookie-settings-btn {
        bottom: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.7rem;
    }
}