/* General Styling */
body, button {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

body >.cookie-banner { 
    position: fixed!important; /* Use!important to ensure this rule overrides */
    bottom: 0!important;
}

/* Cookie Banner */
.cookie-banner {
    width: 100%;
    background-color: #f1f1f1;
    padding: 15px;
    display: flex;
    justify-content: left;
    align-items: left;
    z-index: 9999;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
    margin: auto;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 80%; /*1200px;*/
    margin: 0 auto;
    padding: 0 20px 0 20px;
}

/* Left Side: Cookie Icon and Text */
.cookie-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.cookie-info-icon{
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0.3rem;
    z-index: 100;
}

.cookie-banner p {
    margin: 0;
    flex: 1;
    padding: 0 10px;
}

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

.cookie-actions button {
    margin: 0;
    padding: 10px 20px;
}

.cookie-icon {
    font-size: 35px;
    z-index: 100;
}
.cookie-icon-container {
    background-color: #343a40;
    padding: 0.3rem; 
    border-radius: 50%;
    border: 1px;
    display: flex; /* Enable flexbox for centering */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    padding: 0.1rem;
}

.cookie-icon-container svg {
    color: #fff;
    width: 1.5rem; /* Increase the size of the SVG */
    height: auto; /* Maintain aspect ratio */
}

.cookie-banner a {
    color: #777777;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 600px;
    background-color: #fff;
    z-index: 9999;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-family: Arial, sans-serif;
    height: 80vh;          /* Make the modal occupy 80% of the viewport height*/
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
/* Ensure styles are scoped to the modal */
#cookiePreferencesModal .cookie-modal-content {
    text-align: left;
}

.cookie-modal-content {
    text-align: left;
}

/* Headings */
.cookie-modal-content h2, .cookie-modal-content h3 {
    color: #22262f;
    font-weight: bold;
    margin-bottom: 15px;
}

.cookie-modal-content h7 {
    color: #e1af58;
    font-weight: bold;
    font-size: 1rem;
}

/* Custom Switch Style for Checkboxes */
.cookie-modal-content .preference-category input[type="checkbox"] {
    position: relative;
    width: 50px;
    height: 25px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #ccc;
    border-radius: 25px;
    cursor: pointer;
    outline: none;
    transition: background-color 0.3s ease;
}

.cookie-modal-content .preference-category input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 21px;
    height: 21px;
    top: 2px;
    left: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.cookie-modal-content .preference-category input[type="checkbox"]:checked {
    background-color: #e1af58; /* Switch "on" color */
}

.cookie-modal-content .preference-category input[type="checkbox"]:checked::before {
    transform: translateX(25px); /* Move knob to the right when checked */
}

/* Optional: Style adjustments for disabled switches */
.cookie-modal-content .preference-category input[type="checkbox"]:disabled {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

.cookie-modal-content .preference-category input[type="checkbox"]:disabled::before {
    background-color: #bdbdbd;
}

/* End of Custom Switch Styling */

/* Preference Category Styling */
.preference-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.preference-category h7 {
    margin: 0;
}

.preference-category label {
    margin: 0;
}

.preference-category p {
    margin: 0;
    margin-left: 10px;
}

/* Action Buttons */
button {
    padding: 10px 20px;
    background-color: #e1af58;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#declineCookies {
    background-color: #787878;
    color: rgb(255, 255, 255);
    border: #d1954b;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#declineCookies:hover {
    background-color: #5b5b5b;
}

#cookiePreferences {
    background-color: #f1f1f1;
    color: rgb(0, 0, 0);
    font-size: 14px;
    text-decoration: underline;
}

#rejectAll {
    background-color: #787878;
    color: rgb(255, 255, 255); 
    border: #d1954b; 
    border-radius: 20px; 
    font-size: 16px; 
    cursor: pointer; 
    transition: background-color 0.3s ease; 
}

#rejectAll:hover {
    background-color: #5b5b5b; 
}

button:hover {
    background-color: #d1954b;
}

/* old Cookie Icon After Acceptance
#cookieIconAfterConsent {
    display: none;
    position: fixed;
    bottom: 10px;
    left: 10px;
    font-size: 40px;
    cursor: pointer;
}
*/

/* NEW Cookie Icon After Acceptance */
#cookieIconAfterConsent {
    display: none;
    position: fixed;
    bottom: 10px;
    left: 10px;
    font-size: 40px;
    cursor: pointer;
    transition: transform 0.3s ease; /* Add a transition for smoothness */
}

#cookieIconAfterConsent:hover {
    transform: scale(1.1); /* Scale up on hover */
}

/* Media Queries for Tablet and Mobile */
@media screen and (max-width: 768px) {
    /* Adjust the layout for smaller screens */
    .cookie-content {
        flex-direction: column;
        align-items: center; 
        text-align: center;
    }

    .cookie-info {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .cookie-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%; 
    }
    
    .cookie-banner p {
        font-size: 14px;
        padding: 10px 0;
    }

    .cookie-icon {
        font-size: 30px;
    }

    .cookie-banner button {
        width: 100%;
        text-align: center;
        font-size: 14px;
    }

    /* Add styles for the button layout in the modal */
    #cookiePreferencesModal .cookie-modal-content {
        display: flex;
        flex-direction: column;
        align-items: center; /* Align modal content to center */
    }

    #rejectAll, #allowAll {
        width: 100%; /* Full width buttons in modal on smaller screens */
        margin: 5px 0; /* Adjust margin for better spacing */
    }

    #confirmPreferences {
        width: 100%; 
    }
}

/* Media Queries for Tablet and Mobile */
@media screen and (max-width: 768px) {
    /* ... (previous styles for responsiveness) ... */

    /* Styles for the modal */
    #cookiePreferencesModal {
        max-height: 80vh; /* Limit the modal height to 80% of the viewport height */
        overflow-y: auto; /* Add vertical scroll */
    }

    #cookiePreferencesModal .cookie-modal-content {
        /* ... (other modal styles) ... */
        padding: 10px; /* Reduce padding for smaller screens */
    }
}

@media screen and (max-width: 480px) {
    /* Further adjustments for very small mobile screens */
    
    .cookie-info {
        flex-direction: column;
        align-items: center;
    }

    .cookie-icon {
        font-size: 28px;
    }

    .cookie-banner p {
        font-size: 12px;
    }

    .cookie-banner button {
        padding: 8px 16px;
        font-size: 14px;
    }    
}

.cookie-button-container {
    display: flex; /* Use flexbox for layout */
    justify-content: center; /* Center buttons horizontally */
    margin-top: 10px; /* Optional: space above buttons */
}

/* Ensure styles are scoped to the modal */
#cookiePreferencesModal #rejectAll,
#cookiePreferencesModal #allowAll {
    width: calc(50% - 2.5px); /* Maintain the desired width */
    margin: 5px 2.5px; /* Maintain the margin for spacing */
    display: flex; /* Use flexbox for alignment */
    align-items: center;
    justify-content: center; /* Center items horizontally */
    padding: 10px 20px; /* Add padding for button appearance */
    border: none; /* Remove any default borders */
    border-radius: 20px; /* Maintain your border radius */
    font-size: 16px; /* Ensure font size is as intended */
    cursor: pointer; /* Pointer on hover */
    transition: background-color 0.3s ease; /* Smooth transition */
}

/* Specific styles for Reject All */
#cookiePreferencesModal #rejectAll {
    background-color: #787878; /* Set background color */
    color: rgb(255, 255, 255); /* Set text color */
}

#cookiePreferencesModal #rejectAll:hover {
    background-color: #5b5b5b; /* Darken on hover */
}

/* Specific styles for Allow All */
#cookiePreferencesModal #allowAll {
    background-color: #e1af58; /* Set background color e1af58 */
    color: white; /* Set text color */
}

#cookiePreferencesModal #allowAll:hover {
    background-color: #d1954b; /* Darken on hover */
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    background-color: transparent; /* Remove background color */
    border: none;
    cursor: pointer;
    color: #5b5b5b; /* Set the desired color */
    z-index: 100; /* Ensure it's on top */
}

@media screen and (min-width: 768px) {
    /* Styles for the modal */
    #cookiePreferencesModal {
        max-height: calc(100vh - 40px); /* Limit the modal height to 100% of the viewport height minus 40px (20px top + 20px bottom) */
        overflow-y: auto; /* Add vertical scroll */
    }
}