/**
 * Cookie Consent Banner Styles
 */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-top: 3px solid #33691e;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-consent-banner.show {
    opacity: 1;
    transform: translateY(0);
}

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

.cookie-consent-text {
    flex: 1 1 auto;
    min-width: 300px;
}

.cookie-consent-text h5 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

.cookie-consent-text p {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: var(--bs-body-color);
    line-height: 1.5;
}

.cookie-consent-text p:last-child {
    margin-bottom: 0;
}

.cookie-consent-text a {
    color: #33691e;
    text-decoration: underline;
}

.cookie-consent-text a:hover {
    color: #1b5e20;
}

.cookie-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Button styling according to AgroForest house style */
.cookie-consent-buttons .btn-success {
    background-color: #33691e;
    border-color: #33691e;
    color: white;
}

.cookie-consent-buttons .btn-success:hover {
    background-color: #1b5e20;
    border-color: #1b5e20;
}

.cookie-consent-buttons .btn-outline-success {
    color: #33691e;
    border-color: #33691e;
}

.cookie-consent-buttons .btn-outline-success:hover {
    background-color: #33691e;
    border-color: #33691e;
    color: white;
}

/* Modal button styling */
#cookieSettingsModal .btn-success {
    background-color: #33691e;
    border-color: #33691e;
    color: white;
}

#cookieSettingsModal .btn-success:hover {
    background-color: #1b5e20;
    border-color: #1b5e20;
}

/* Dark mode support */
[data-bs-theme="dark"] .cookie-consent-banner {
    background-color: #2d3748;
    border-top-color: #a5d6a7;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .cookie-consent-text h5,
[data-bs-theme="dark"] .cookie-consent-text p {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .cookie-consent-text a {
    color: #a5d6a7;
}

[data-bs-theme="dark"] .cookie-consent-text a:hover {
    color: #c5e1a5;
}

/* Cookie settings modal */
#cookieSettingsModal {
    z-index: 10000;
}

#cookieSettingsModal .modal-backdrop {
    z-index: 9999;
}

.cookie-category {
    padding: 15px;
    border: 1px solid #c5e1a5;
    border-radius: 8px;
    background-color: #ffffff;
}

.cookie-category .form-check-input {
    cursor: pointer;
}

.cookie-category .form-check-input:disabled {
    cursor: not-allowed;
}

.cookie-category .form-check-label {
    cursor: pointer;
    user-select: none;
}

/* Dark mode support for modal */
[data-bs-theme="dark"] .cookie-category {
    background-color: #2d3748;
    border-color: #718096;
}

/* Responsive design */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-buttons {
        justify-content: center;
        width: 100%;
    }

    .cookie-consent-buttons .btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 576px) {
    .cookie-consent-banner {
        padding: 15px;
    }

    .cookie-consent-text h5 {
        font-size: 1rem;
    }

    .cookie-consent-text p {
        font-size: 0.85rem;
    }

    .cookie-consent-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .cookie-consent-buttons .btn {
        width: 100%;
    }
}
