/* Icona Cookie Floating */
.avcc-cookie-icon {
    position: fixed;
    bottom: 20px;
    z-index: 999998;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: avcc-pulse 2s infinite;
}

.avcc-cookie-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.avcc-cookie-icon:active {
    transform: scale(0.95);
}

.avcc-icon-left {
    left: 20px;
}

.avcc-icon-right {
    right: 20px;
}

@keyframes avcc-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 8px rgba(39, 174, 96, 0.1);
    }
}

.avcc-cookie-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Banner Cookie */
.avcc-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    animation: avcc-slideIn 0.5s ease-out;
}

.avcc-banner-top {
    top: 0;
}

.avcc-banner-bottom {
    bottom: 0;
}

@keyframes avcc-slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.avcc-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.avcc-banner-text {
    flex: 1;
    min-width: 300px;
}

.avcc-banner-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.avcc-banner-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.avcc-banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.avcc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.avcc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.avcc-btn:active {
    transform: translateY(0);
}

/* Popup Overlay */
.avcc-popup-overlay {
    display: none;
    position: fixed;
    z-index: 9999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    overflow-y: auto;
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.avcc-popup-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear;
}

/* Popup Container */
.avcc-popup-container {
    background-color: #ffffff;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.avcc-popup-overlay.active .avcc-popup-container {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Header */
.avcc-popup-header {
    padding: 24px 30px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.avcc-popup-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.avcc-popup-close {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
}

.avcc-popup-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* Body */
.avcc-popup-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.avcc-popup-intro {
    margin: 0 0 24px 0;
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
}

/* Cookie Categories */
.avcc-cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.avcc-cookie-item {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.avcc-cookie-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.avcc-cookie-item-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.avcc-cookie-item-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.avcc-cookie-item-info h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.avcc-cookie-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.avcc-badge-required {
    background: #dbeafe;
    color: #1e40af;
}

.avcc-badge-optional {
    background: #fef3c7;
    color: #92400e;
}

.avcc-cookie-item-content {
    padding: 20px;
}

.avcc-cookie-item-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

/* Toggle Switch */
.avcc-toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
}

.avcc-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.avcc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 30px;
}

.avcc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.avcc-toggle-switch input:checked + .avcc-toggle-slider {
    background-color: #667eea;
}

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

.avcc-toggle-switch.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.avcc-toggle-switch.disabled .avcc-toggle-slider {
    cursor: not-allowed;
}

/* Details Button */
.avcc-cookie-details-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 8px;
    transition: color 0.3s;
}

.avcc-cookie-details-btn:hover {
    color: #764ba2;
}

.avcc-cookie-details {
    margin-top: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    animation: avcc-expandDown 0.3s ease;
}

@keyframes avcc-expandDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.avcc-cookie-details ul {
    margin: 0;
    padding-left: 20px;
}

.avcc-cookie-details li {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Footer */
.avcc-popup-footer {
    padding: 20px 30px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.avcc-popup-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.avcc-btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.avcc-btn-secondary:hover {
    background: #d1d5db;
}

.avcc-btn-primary {
    background: #667eea;
    color: white;
}

.avcc-btn-primary:hover {
    background: #5568d3;
}

.avcc-btn-success {
    background: #10b981;
    color: white;
}

.avcc-btn-success:hover {
    background: #059669;
}

/* Responsive */
@media (max-width: 768px) {
    .avcc-cookie-icon {
        width: 50px;
        height: 50px;
        bottom: 15px;
    }
    
    .avcc-icon-left {
        left: 15px;
    }
    
    .avcc-icon-right {
        right: 15px;
    }
    
    .avcc-cookie-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .avcc-banner-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .avcc-banner-buttons {
        flex-direction: column;
    }
    
    .avcc-btn {
        width: 100%;
        text-align: center;
    }
    
    .avcc-popup-overlay {
        padding: 10px;
    }
    
    .avcc-popup-container {
        max-height: 95vh;
    }
    
    .avcc-popup-header {
        padding: 20px;
    }
    
    .avcc-popup-header h2 {
        font-size: 20px;
    }
    
    .avcc-popup-body {
        padding: 20px;
    }
    
    .avcc-popup-footer {
        padding: 16px 20px;
    }
    
    .avcc-popup-actions {
        flex-direction: column;
    }
    
    .avcc-popup-actions .avcc-btn {
        width: 100%;
    }
    
    .avcc-cookie-item-header {
        padding: 16px;
    }
    
    .avcc-cookie-item-content {
        padding: 16px;
    }
    
    .avcc-cookie-item-info {
        gap: 12px;
    }
    
    .avcc-cookie-icon {
        font-size: 28px;
    }
}

/* Scrollbar per popup */
.avcc-popup-body::-webkit-scrollbar {
    width: 8px;
}

.avcc-popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.avcc-popup-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.avcc-popup-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Google Maps Placeholder (blocco prima del consenso) */
.avcc-gmaps-placeholder {
    background: linear-gradient(135deg, #60B85F 0%, #4a9449 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 40px 20px;
    border-radius: 8px;
    min-height: 450px;
}

.avcc-gmaps-placeholder svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.avcc-gmaps-placeholder h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.avcc-gmaps-placeholder p {
    font-size: 16px;
    margin: 0 0 24px 0;
    opacity: 0.9;
    max-width: 500px;
}

.avcc-gmaps-placeholder button {
    background: white;
    color: #60B85F;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avcc-gmaps-placeholder button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
