/* Cookie Consent Stylesheet - Pace Noleggio & Vendita */

:root {
    --cookie-banner-bg: rgba(10, 31, 68, 0.92);
    --cookie-modal-bg: rgba(255, 255, 255, 0.98);
    --cookie-border: rgba(255, 255, 255, 0.15);
    --cookie-btn-primary: #4a6bff;
    --cookie-btn-primary-hover: #3b5bdb;
    --cookie-btn-secondary: rgba(255, 255, 255, 0.1);
    --cookie-btn-secondary-hover: rgba(255, 255, 255, 0.2);
    --cookie-text: #ffffff;
    --cookie-text-dark: #0a1f44;
    --cookie-text-muted: rgba(255, 255, 255, 0.7);
    --cookie-text-muted-dark: #4a5568;
    --cookie-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

/* 1. Floating Cookie Trigger */
.pace-cookie-trigger {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--cookie-text-dark);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(10, 31, 68, 0.3);
    z-index: 9990;
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    animation: cookiePulse 3s infinite;
}

.pace-cookie-trigger:hover {
    transform: scale(1.1) translateY(-3px);
    background-color: var(--cookie-btn-primary);
    box-shadow: 0 12px 30px rgba(74, 107, 255, 0.4);
}

@keyframes cookiePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(10, 31, 68, 0.4);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(10, 31, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(10, 31, 68, 0);
    }
}

/* 2. Consent Banner Container */
.pace-cookie-banner {
    position: fixed;
    bottom: 25px;
    left: 25px;
    right: 25px;
    max-width: 900px;
    margin: 0 auto;
    background: var(--cookie-banner-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--cookie-border);
    border-radius: 20px;
    padding: 24px;
    color: var(--cookie-text);
    box-shadow: var(--cookie-shadow);
    z-index: 9999;
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
    display: none;
}

.pace-cookie-banner.show {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pace-cookie-banner-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.pace-cookie-content {
    flex: 1;
}

.pace-cookie-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pace-cookie-title i {
    color: #f59e0b;
}

.pace-cookie-desc {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--cookie-text-muted);
    margin-bottom: 0;
}

.pace-cookie-desc a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.pace-cookie-desc a:hover {
    color: var(--cookie-btn-primary);
}

.pace-cookie-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    flex-shrink: 0;
}

/* 3. Button Styles */
.pace-cookie-btn {
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    border: none;
    outline: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.pace-cookie-btn-accept {
    background-color: var(--cookie-btn-primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(74, 107, 255, 0.3);
}

.pace-cookie-btn-accept:hover {
    background-color: var(--cookie-btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 107, 255, 0.45);
}

.pace-cookie-btn-reject {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.pace-cookie-btn-reject:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.pace-cookie-btn-settings {
    background-color: transparent;
    color: var(--cookie-text-muted);
    text-decoration: underline;
    padding: 10px 12px;
}

.pace-cookie-btn-settings:hover {
    color: #ffffff;
}

/* 4. Preferences Modal Styles */
.pace-cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 31, 68, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pace-cookie-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.pace-cookie-modal {
    background-color: var(--cookie-modal-bg);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pace-cookie-modal-overlay.show .pace-cookie-modal {
    transform: translateY(0) scale(1);
}

.pace-cookie-modal-header {
    background: linear-gradient(135deg, #0a1f44 0%, #1a3a8f 100%);
    color: #ffffff;
    padding: 24px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pace-cookie-modal-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pace-cookie-modal-close {
    font-size: 24px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.pace-cookie-modal-close:hover {
    color: #ffffff;
}

.pace-cookie-modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.pace-cookie-modal-intro {
    font-size: 0.95rem;
    color: var(--cookie-text-muted-dark);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Category Items */
.pace-cookie-cat-item {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    transition: all 0.2s ease;
}

.pace-cookie-cat-item:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
}

.pace-cookie-cat-info {
    flex: 1;
}

.pace-cookie-cat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.pace-cookie-cat-name {
    font-weight: 700;
    color: var(--cookie-text-dark);
    font-size: 1.05rem;
}

.pace-cookie-cat-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.pace-cookie-cat-badge.necessary {
    background-color: #fee2e2;
    color: #ef4444;
}

.pace-cookie-cat-badge.optional {
    background-color: #e0f2fe;
    color: #0284c7;
}

.pace-cookie-cat-desc {
    font-size: 0.88rem;
    color: var(--cookie-text-muted-dark);
    line-height: 1.5;
    margin-bottom: 0;
}

/* Switch Styles */
.pace-cookie-switch-label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
    margin-top: 4px;
}

.pace-cookie-switch-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pace-cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 34px;
}

.pace-cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pace-cookie-switch-label input:checked + .pace-cookie-slider {
    background-color: var(--cookie-btn-primary);
}

.pace-cookie-switch-label input:focus + .pace-cookie-slider {
    box-shadow: 0 0 1px var(--cookie-btn-primary);
}

.pace-cookie-switch-label input:checked + .pace-cookie-slider:before {
    transform: translateX(22px);
}

.pace-cookie-switch-label input:disabled + .pace-cookie-slider {
    background-color: #94a3b8;
    cursor: not-allowed;
}

.pace-cookie-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.pace-cookie-modal-btn-save {
    background-color: var(--cookie-text-dark);
    color: #ffffff;
}

.pace-cookie-modal-btn-save:hover {
    background-color: #1a3a8f;
    transform: translateY(-2px);
}

/* 5. Responsive Styles */
@media (max-width: 991px) {
    .pace-cookie-banner {
        bottom: 20px;
        left: 20px;
        right: 20px;
        padding: 20px;
    }
    
    .pace-cookie-banner-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .pace-cookie-buttons {
        justify-content: flex-end;
    }
}

@media (max-width: 576px) {
    .pace-cookie-trigger {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .pace-cookie-banner {
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
    
    .pace-cookie-buttons {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .pace-cookie-btn {
        width: 100%;
        padding: 12px;
    }
    
    .pace-cookie-btn-settings {
        order: 3;
    }
    
    .pace-cookie-modal-body {
        padding: 20px;
    }
    
    .pace-cookie-modal-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }
    
    .pace-cookie-modal-footer .pace-cookie-btn {
        width: 100%;
    }
}
