/* Cookie Consent Styles for Sayiwe Microfinance */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--light-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 20px;
    border-top: 3px solid var(--primary-color);
    animation: slideUp 0.5s ease-out;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-text {
    flex: 1;
    padding-right: 20px;
}

.cookie-text h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--text-color);
    margin: 0;
}

.cookie-policy-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-buttons .btn {
    padding: 8px 15px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.cookie-accept {
    background-color: var(--primary-color);
    color: white;
}

.cookie-accept:hover {
    background-color: #900748;
}

.cookie-settings {
    background-color: #f1f1f1;
    color: var(--text-color);
}

.cookie-settings:hover {
    background-color: #e0e0e0;
}

/* Cookie Settings Modal */
.cookie-settings-modal,
.cookie-policy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.cookie-settings-content,
.cookie-policy-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    animation: scaleIn 0.3s ease-out;
}

.cookie-settings-header,
.cookie-policy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.cookie-settings-header h3,
.cookie-policy-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.close-settings,
.close-policy {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.cookie-settings-body,
.cookie-policy-body {
    padding: 20px;
}

.cookie-settings-body p,
.cookie-policy-body p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.cookie-option {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.cookie-option-header h4 {
    margin: 0;
    color: var(--text-color);
}

.cookie-option p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 5px 0 0 0;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    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: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.cookie-settings-footer,
.cookie-policy-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.save-preferences,
.close-policy-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.save-preferences:hover,
.close-policy-btn:hover {
    background-color: #900748;
}

/* Cookie Policy Modal */
.cookie-policy-body h4 {
    color: var(--primary-color);
    margin: 20px 0 10px;
}

.cookie-policy-body h4:first-child {
    margin-top: 0;
}

.cookie-policy-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.cookie-policy-body li {
    margin-bottom: 5px;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-text {
        padding-right: 0;
        margin-bottom: 15px;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .cookie-buttons .btn {
        flex: 1;
        text-align: center;
    }
}