/* ===== Cookie Consent Bar - Image Replica ===== */
.cookie-consent-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    transition: transform 0.4s ease-in-out;
    transform: translateY(100%);
    visibility: hidden;
}

.cookie-consent-wrapper.show {
    transform: translateY(0);
    visibility: visible;
}

.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-info-group {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    flex-grow: 1;
}

.cookie-brand-icon {
    width: 42px;
    height: 42px;
    background: #217346;
    border-radius: 8px;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.cookie-brand-icon i {
    color: #ffffff !important;
    --fa-primary-color: #ffffff;
    --fa-secondary-color: #ffffff;
    --fa-secondary-opacity: 0.6;
}

.cookie-text-content h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
}

.cookie-text-content p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #666;
}

.cookie-text-content a {
    color: #217346;
    text-decoration: underline;
    font-weight: 600;
}

.cookie-button-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-cookie-secondary,
.btn-cookie-primary {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #217346;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-cookie-secondary:hover,
.btn-cookie-primary:hover {
    background: #f8fffb;
    border-color: #217346;
}

.btn-cookie-primary i {
    font-size: 0.9rem;
}

/* ===== Cookie Settings Modal ===== */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.cookie-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal {
    background: #ffffff;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

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

.cookie-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-modal-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-modal-close:hover {
    color: #333;
}

.cookie-modal-body {
    padding: 1.5rem;
}

.cookie-modal-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.cookie-option-item {
    background: #fcfcfc;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.cookie-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cookie-option-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-badge {
    background: rgba(33, 115, 70, 0.1);
    color: #217346;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Toggle Switch Style */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #217346;
}

input:disabled+.slider {
    background-color: rgba(33, 115, 70, 0.5);
    cursor: not-allowed;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.cookie-option-desc {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.4;
    margin: 0;
}

.cookie-modal-footer {
    padding: 1.25rem 1.5rem;
    background: #fcfcfc;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-modal-cancel {
    background: transparent;
    border: none;
    color: #217346;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-modal-save {
    background: #ffffff;
    border: 2px solid #217346;
    color: #217346;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-modal-save:hover {
    background: #217346;
    color: #fff;
}

/* Dark Mode support for Modal */
html.dark .cookie-modal {
    background: #1a1a1a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

html.dark .cookie-modal-header {
    border-bottom-color: #333;
}

html.dark .cookie-modal-header h3 {
    color: #eee;
}

html.dark .cookie-option-item {
    background: #222;
    border-color: #333;
}

html.dark .cookie-option-title {
    color: #eee;
}

html.dark .cookie-option-desc {
    color: #aaa;
}

html.dark .cookie-modal-desc {
    color: #aaa;
}

html.dark .cookie-modal-footer {
    background: #1a1a1a;
    border-top-color: #333;
}

/* responsive */
@media (max-width: 991px) {
    .cookie-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }

    .cookie-button-group {
        width: 100%;
    }

    .btn-cookie-secondary,
    .btn-cookie-primary {
        flex: 1;
        justify-content: center;
    }
}