#privacy-consent-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: calc(100% - 40px);
    max-width: 380px;
    background: linear-gradient(135deg, #f0f4f8 0%, #e0e8f0 100%);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    padding: 25px;
    box-sizing: border-box;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}
#privacy-consent-popup.show {
    transform: translateY(0);
    opacity: 1;
}
.consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: none;
}
#privacy-consent-popup.show .consent-overlay {
    display: block;
}
.consent-main-box {
    position: relative;
}
.consent-title {
    font-size: 1.4em;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
}
.consent-description {
    font-size: 0.95em;
    line-height: 1.5;
    color: #555;
    margin-bottom: 20px;
}
.consent-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}
.consent-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}
.accept-all-btn {
    background: #007bff;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}
.accept-all-btn:hover {
    background: #0056b3;
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}
.manage-btn {
    background: #6c757d;
    color: #fff;
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.3);
}
.manage-btn:hover {
    background: #5a6268;
    box-shadow: 0 6px 15px rgba(108, 117, 125, 0.4);
}
.consent-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}
.policy-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.85em;
    transition: color 0.3s ease;
}
.policy-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

#privacy-consent-settings {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#privacy-consent-settings.show {
    opacity: 1;
    pointer-events: all;
}
.settings-box {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25), 0 6px 15px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
#privacy-consent-settings.show .settings-box {
    transform: translateY(0);
}
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}
.settings-title {
    font-size: 1.5em;
    color: #2c3e50;
    font-weight: 600;
}
.settings-close-btn {
    background: none;
    border: none;
    font-size: 1.8em;
    color: #666;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}
.settings-close-btn:hover {
    color: #333;
}
.settings-content {
    padding: 20px 25px;
    overflow-y: auto;
    flex-grow: 1;
}
.cookie-category {
    margin-bottom: 20px;
    background: #f9fbfd;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e9edf1;
}
.cookie-category:last-child {
    margin-bottom: 0;
}
.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding-bottom: 10px;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s ease;
}
.cookie-category.expanded .category-header {
    border-bottom: 1px solid #e0e8f0;
}
.category-name {
    font-weight: 600;
    color: #34495e;
    flex-grow: 1;
    margin-left: 10px;
    font-size: 1.05em;
}
.category-arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #666;
    transition: transform 0.3s ease;
}
.cookie-category.expanded .category-arrow {
    transform: rotate(180deg);
}
.category-description {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, margin-top 0.4s ease-out, padding-top 0.4s ease-out;
    padding-top: 0;
}
.cookie-category.expanded .category-description {
    max-height: 200px; /* Adjust as needed */
    margin-top: 10px;
    padding-top: 10px;
}
.settings-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}
.save-preferences-btn {
    background: #28a745;
    color: #fff;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}
.save-preferences-btn:hover {
    background: #218838;
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.4);
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.toggle-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: 0.4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #28a745;
}
input:focus + .slider {
    box-shadow: 0 0 1px #28a745;
}
input:checked + .slider:before {
    transform: translateX(20px);
}
input:disabled + .slider {
    background-color: #a0a0a0;
    cursor: not-allowed;
}
input:disabled + .slider:before {
    background-color: #e0e0e0;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    #privacy-consent-popup {
        bottom: 10px;
        right: 10px;
        width: calc(100% - 20px);
        max-width: none;
        padding: 20px;
    }
    .consent-title {
        font-size: 1.3em;
    }
    .consent-description {
        font-size: 0.9em;
    }
    .consent-btn {
        padding: 10px 15px;
        font-size: 0.95em;
    }
    .consent-links {
        flex-direction: column;
        gap: 8px;
    }
    .policy-link {
        font-size: 0.8em;
    }

    .settings-box {
        width: 95%;
        margin: 10px;
    }
    .settings-header {
        padding: 15px 20px;
    }
    .settings-title {
        font-size: 1.3em;
    }
    .settings-close-btn {
        font-size: 1.5em;
    }
    .settings-content {
        padding: 15px 20px;
    }
    .cookie-category {
        padding: 12px;
    }
    .category-name {
        font-size: 1em;
    }
    .category-description {
        font-size: 0.85em;
    }
    .settings-footer {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    #privacy-consent-popup {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    }
    .consent-actions {
        flex-direction: column;
    }
    .consent-links {
        flex-direction: column;
        align-items: flex-start;
    }
    .settings-box {
        border-radius: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
    }
}