#cookie-consent-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.cookie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.cookie-main-box, .cookie-settings-panel {
    position: absolute;
    background-color: #ffffff;
    border-radius: 12px; /* Slightly random rounded corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05); /* Modern shadow */
    max-width: 500px;
    width: 90%;
    padding: 25px;
    box-sizing: border-box;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.cookie-header h3, .cookie-settings-header h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.8em;
    color: #2c3e50;
    font-weight: 600;
}

.cookie-content p {
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #555;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-button {
    padding: 12px 22px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: 500;
}

.cookie-accept-all {
    background-color: #4CAF50; /* Green */
    color: white;
}
.cookie-accept-all:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.cookie-reject-all {
    background-color: #f44336; /* Red */
    color: white;
}
.cookie-reject-all:hover {
    background-color: #da190b;
    transform: translateY(-1px);
}

.cookie-manage-preferences, .cookie-save-preferences {
    background-color: #007bff; /* Blue */
    color: white;
}
.cookie-manage-preferences:hover, .cookie-save-preferences:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.cookie-settings-panel {
    display: none;
    max-width: 600px;
    padding: 30px;
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.cookie-close-settings {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #888;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s ease;
}
.cookie-close-settings:hover {
    color: #333;
}

.cookie-settings-body {
    margin-bottom: 20px;
}

.cookie-category {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #f0f0f0; /* Subtle separator */
}
.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cookie-category h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.2em;
    color: #34495e;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
}

.cookie-category p {
    font-size: 0.85em;
    line-height: 1.5;
    color: #666;
    margin-top: 5px;
}

/* Toggle Switch Styles */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    vertical-align: middle;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 28px;
}

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

input:checked + .cookie-slider {
    background-color: #2196F3;
}

input:focus + .cookie-slider {
    box-shadow: 0 0 1px #2196F3;
}

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

input:disabled + .cookie-slider {
    background-color: #a0a0a0;
    cursor: not-allowed;
}
input:disabled + .cookie-slider:before {
    background-color: #e0e0e0;
}

.cookie-settings-footer {
    text-align: right;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cookie-main-box, .cookie-settings-panel {
        width: 95%;
        padding: 20px;
        border-radius: 8px;
    }
    .cookie-header h3, .cookie-settings-header h3 {
        font-size: 1.5em;
    }
    .cookie-button {
        width: 100%;
        padding: 10px 15px;
        font-size: 0.95em;
    }
    .cookie-actions {
        flex-direction: column;
    }
    .cookie-settings-panel {
        padding: 20px;
    }
    .cookie-category h4 {
        font-size: 1.1em;
    }
    .cookie-category p {
        font-size: 0.8em;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}