/* cookie popup styling */

/* The Modal (background) */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top */
    top: auto;
    bottom: 0;
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0) !important; /* Black w/ opacity */
    text-align: left !important;
    width: 100%;
}

.text-sm {
    font-size: .875rem;
}

.custom-consent-container {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    width: 75%;
}

.custom-consent-content {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    padding: 20px;
    width: 100%;
    gap: 30px;
}

.consent-logo img {
    height: 16vh;
    object-fit: contain;
    margin-right: 20px;
}

.custom-consent-info {
    flex-grow: 1;
}

    .custom-consent-info h2 {
        font-size: 18px;
        color: #333;
        font-weight: 600;
    }

    .custom-consent-info p {
        margin: 10px 0;
        color: #666;
        font-size: 14px;
    }

.custom-consent-options {
    display: flex;
    gap: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
}

    .custom-consent-options label {
        display: flex;
        align-items: center;
        font-size: 14px;
        color: #6B7280;
    }

    .custom-consent-options input[type="checkbox"] {
        margin-left: 10px;
        width: 20px;
        height: 20px;
    }

/* Button alignment - vertical */
.consent-actions {
    display: flex;
    flex-direction: column; /* Change flow direction to column */
    gap: 5px; /* Space between buttons */
}

    .consent-actions .btn {
        padding: 13px 65px !important;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
    }

        .consent-actions .btn.accept {
            background-color: #00234a;
            color: #fff;
        }

        .consent-actions .btn.decline {
            background-color: #f9f9f9;
            color: #333;
            border: 1px solid #ccc;
        }


/*Switches*/

.switch {
    --secondary-container: #00234a;
    --primary: #fff;
    font-size: 17px;
    position: relative;
    display: inline-block;
    width: 3.4em;
    height: 1.4em;
}

    .switch input {
        display: none;
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .2s;
    border-radius: 30px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 1em;
        width: 1em;
        border-radius: 20px;
        left: 0.2em;
        bottom: 0.2em;
        background-color: #fff;
        transition: .4s;
    }

input:checked + .slider::before {
    background-color: var(--primary);
}

input:checked + .slider {
    background-color: var(--secondary-container);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--secondary-container);
}

input:checked + .slider:before {
    transform: translateX(1.9em);
}



/* View on medium-sized screens (tablets) */
@media (max-width: 1400px) {
    .custom-consent-container {
        width: 80%;
    }

    .consent-logo img {
        height: 0;
        display: none;
    }

    .custom-consent-content {
        flex-direction: column; /* Maintain horizontal direction for tablets */
        align-items: center; /* Center elements on the hortizonal axis */
        gap: 20px;
    }

    .consent-logo,
    .cookie-info,
    .consent-actions {
        flex: 1 1 100%; /* Allows each element to occupy 100% of the available width */
        text-align: left !important; /* Align content to improve readability */
    }

        .cookie-info h2 {
            font-size: 16px;
        }

        .cookie-info p {
            font-size: 12px;
        }

    .custom-consent-options {
        justify-content: center; /* Center cookie options */
        flex-direction: row;
    }

    .consent-actions .btn {
        padding: 10px 50px !important; /* Adjust button padding */
    }

    .consent-actions {
        flex-direction: row;
    }
}

/* Make responsive*/
@media (max-width: 768px) {

    .consent-logo img {
        height: 8vh;
    }

    .consent-logo {
        margin-bottom: 10px; /* Add a bottom margin to separate the logo from the other elements */
    }

    .cookie-info {
        text-align: left !important; /* Center text on small screens */
    }

    .custom-consent-options {
        flex-direction: row; /* Change options to rows on small screens */
        align-items: center; /* Center options on the horizontal axis */
        gap: 10px; /* Adjust the space between options */
    }

    .consent-actions {
        width: 100%;
        align-items: center; /* Center elements on the horizontal axis*/
    }

        .consent-actions .btn {
            width: 80% !important; /* Adjust the width of the buttons*/
        }
}

@media (max-width: 480px) {
    .consent-logo img {
        height: 7vh;
    }

    .custom-consent-container {
        width: 90%;
        padding: 10px;
    }

    .custom-consent-content {
        padding: 10px;
        gap: 10px;
    }

    .consent-actions .btn {
        padding: 10px 40px !important;
    }

    .custom-consent-options {
        flex-direction: row; /* Change options to rows on small screens*/
    }

    .consent-actions {
        flex-direction: row;
    }
}

@media (max-width: 360px) {
    .custom-consent-options {
        flex-direction: column;
    }
}
