.cookie-consent-modal, .privacy-settings-modal {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 90%;
    max-width: 400px;
    background-color: #f0f8ff; /* AliceBlue */
    border: 1px solid #cceeff; /* Light blue border */
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 25px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    z-index: 10001; /* High z-index */
    animation: fadeIn 0.5s ease-out;
    box-sizing: border-box;
}
.cookie-consent-modal h3, .privacy-settings-modal h3 {
    margin-top: 0;
    color: #2c3e50; /* Darker blue-grey */
    font-size: 1.3em;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.cookie-consent-modal p, .privacy-settings-modal p {
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 20px;
}
.cookie-consent-modal .button-group, .privacy-settings-modal .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.cookie-consent-modal button, .privacy-settings-modal button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    flex-grow: 1;
    min-width: 120px;
    box-sizing: border-box;
}
.cookie-consent-modal button.accept-all, .privacy-settings-modal button.accept-all-settings {
    background-color: #4CAF50; /* Green */
    color: white;
}
.cookie-consent-modal button.accept-all:hover, .privacy-settings-modal button.accept-all-settings:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}
.cookie-consent-modal button.reject-all {
    background-color: #f44336; /* Red */
    color: white;
}
.cookie-consent-modal button.reject-all:hover {
    background-color: #da190b;
    transform: translateY(-1px);
}
.cookie-consent-modal button.manage-preferences, .privacy-settings-modal button.save-preferences, .privacy-settings-modal button.back-to-main {
    background-color: #007bff; /* Blue */
    color: white;
}
.cookie-consent-modal button.manage-preferences:hover, .privacy-settings-modal button.save-preferences:hover, .privacy-settings-modal button.back-to-main:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.privacy-settings-modal .cookie-category {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e0e0e0;
}
.privacy-settings-modal .cookie-category:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.privacy-settings-modal .cookie-category h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
}
.privacy-settings-modal .cookie-category p {
    font-size: 0.85em;
    color: #555;
    margin-bottom: 15px;
}
.privacy-settings-modal .switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 25px;
}
.privacy-settings-modal .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.privacy-settings-modal .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 25px;
}
.privacy-settings-modal .slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
.privacy-settings-modal input:checked + .slider {
    background-color: #4CAF50;
}
.privacy-settings-modal input:focus + .slider {
    box-shadow: 0 0 1px #4CAF50;
}
.privacy-settings-modal input:checked + .slider:before {
    transform: translateX(20px);
}
.privacy-settings-modal input:disabled + .slider {
    opacity: 0.6;
    cursor: not-allowed;
}
.privacy-settings-modal .policy-link {
    display: block;
    margin-top: 20px;
    text-align: center;
    font-size: 0.85em;
}
.privacy-settings-modal .policy-link a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}
.privacy-settings-modal .policy-link a:hover {
    color: #0056b3;
    text-decoration: underline;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cookie-consent-modal, .privacy-settings-modal {
        width: 95%;
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    .cookie-consent-modal .button-group, .privacy-settings-modal .button-group {
        flex-direction: column;
        gap: 8px;
    }
    .cookie-consent-modal button, .privacy-settings-modal button {
        width: 100%;
        min-width: unset;
    }
}
@media (max-width: 480px) {
    .cookie-consent-modal, .privacy-settings-modal {
        padding: 15px;
        border-radius: 8px;
    }
    .cookie-consent-modal h3, .privacy-settings-modal h3 {
        font-size: 1.2em;
    }
    .cookie-consent-modal p, .privacy-settings-modal p {
        font-size: 0.9em;
    }
    .cookie-consent-modal button, .privacy-settings-modal button {
        padding: 10px 15px;
        font-size: 0.85em;
    }
}