#cookie-consent-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f8f9fa;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 90vh;
    overflow-y: auto;
}

#cookie-consent-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    padding: 15px;
}

#cookie-consent-message {
    color: #333;
    max-width: 100%;
}

.consent-btn {
    flex-grow: 1;
    padding: 12px 15px;
    margin: 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    max-width: 200px;
    font-size: 14px;
}

#accept-all-cookies {
    background-color: #28a745;
    color: white;
}

#manage-preferences {
    background-color: #007bff;
    color: white;
}

#reject-non-essential {
    background-color: #dc3545;
    color: white;
}

#cookie-preferences-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

#preferences-content {
    background-color: white;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    margin: 15px;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    position: relative;
}

.cookie-category {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.cookie-category-info {
    flex-grow: 1;
    text-align: left;
}

.cookie-toggle {
    display: flex;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    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: .4s;
    border-radius: 34px;
}

.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: #2196F3;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

#preferences-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-start;
}

#preferences-actions button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

#close-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    font-size: 24px;
    background: none;
    border: none;
}

#cookie-consent-actions button:not(:last-child) {
    margin-right: 16px;
}

/* Responsive Breakpoints */
@media screen and (max-width: 768px) {
    #cookie-consent-container {
        flex-direction: column;
        text-align: center;
    }

    #cookie-consent-actions {
        flex-direction: column;
        align-items: stretch;
    }

    #cookie-consent-actions button:not(:last-child) {
        margin-right: auto;
    }

    .consent-btn {
        width: 100%;
        max-width: none;
        margin-bottom: 16px;
    }
}

@media screen and (min-width: 769px) {
    #cookie-consent-container {
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }

    #cookie-consent-message {
        text-align: left;
        margin-right: 15px;
    }

    #cookie-consent-actions {
        flex-direction: row;
        width: auto;
        flex-shrink: 0;
    }

    .consent-btn {
        flex-grow: 0;
        width: auto;
    }
}

/* Ensure full width usage and flexibility */
@media screen and (min-width: 1200px) {
    #cookie-consent-container {
        flex-direction: row;
        max-width: 1200px;
        margin: 0 auto;
    }
}