/* Cookie Banner and Modal Styles for IdroGreen */

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    z-index: 9999;
    border-top: 3px solid #27ae60;
    display: none; /* Hidden by default */
}

.cookie-banner.show {
    transform: translateY(0);
    display: block; /* Show when needed */
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.cookie-text i {
    font-size: 1.5rem;
    color: #f39c12;
}

.cookie-message {
    font-size: 14px;
    line-height: 1.4;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-cookie {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-cookie.primary {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.btn-cookie.primary:hover {
    background: linear-gradient(45deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-cookie.secondary {
    background: transparent;
    color: #bdc3c7;
    border: 2px solid #7f8c8d;
}

.btn-cookie.secondary:hover {
    background: #7f8c8d;
    color: white;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-modal.show {
    display: flex; /* Show as flex when needed */
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    padding: 25px 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ecf0f1;
    margin-bottom: 20px;
}

.cookie-modal-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-modal-header i {
    color: #27ae60;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #ecf0f1;
    color: #e74c3c;
}

.cookie-modal-body {
    padding: 0 25px;
}

.cookie-modal-body > p {
    color: #7f8c8d;
    margin-bottom: 25px;
    line-height: 1.6;
}

.cookie-category {
    margin-bottom: 20px;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.3s ease;
}

.cookie-category:hover {
    border-color: #27ae60;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.cookie-category h4 {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.cookie-category p {
    color: #7f8c8d;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: #27ae60;
}

input:disabled + .slider {
    background-color: #95a5a6;
    cursor: not-allowed;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.cookie-modal-footer {
    padding: 25px;
    border-top: 1px solid #ecf0f1;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-links {
    text-align: center;
    padding: 0 25px 25px;
    font-size: 12px;
}

.cookie-links a {
    color: #27ae60;
    text-decoration: none;
}

.cookie-links a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        gap: 15px;
    }

    .cookie-text {
        text-align: center;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-cookie {
        width: 100%;
        padding: 12px 20px;
    }

    .cookie-modal-content {
        width: 95%;
        margin: 10px;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 20px;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-category-header {
        flex-direction: column;
        gap: 10px;
    }

    .cookie-switch {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 15px;
    }
    
    .cookie-message {
        font-size: 13px;
    }
    
    .btn-cookie {
        font-size: 13px;
        padding: 10px 16px;
    }
}

/* Cookie Preferences Floating Icon */
.cookie-preferences-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

.cookie-preferences-icon:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.cookie-preferences-icon.hidden {
    display: none;
}

/* Hide on mobile to avoid conflicts */
@media (max-width: 768px) {
    .cookie-preferences-icon {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}