/* Global CSS Variables for Theming and Consistency */
:root {
    --primary-font: 'Inter', sans-serif;
    --dark-bg: #111827;
    --card-bg: #1F2937;
    --orange-highlight: #F97316;
    --green-accent: #39fb80;
    --phone-accent: #b9ff2e;
    --transition-duration: 0.3s;
    --modal-transition-duration: 0.5s;
}

/* Global Styles */
html {
    scroll-behavior: smooth;
}

/* Prevent text and image selection on the page */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    font-family: var(--primary-font);
    background-color: var(--dark-bg); /* Use variable for background color */
}

/* Mobile Menu Button Animation */
#mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 3px;
    background-color: white;
    margin: 2px 0;
    transition: transform var(--transition-duration) ease, opacity var(--transition-duration) ease;
}

#mobile-menu-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Modal Overlay and Content Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--modal-transition-duration) ease-in-out, visibility var(--modal-transition-duration) ease-in-out;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    width: 700px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform var(--modal-transition-duration) ease-in-out, opacity var(--modal-transition-duration) ease-in-out;
    
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.uppercase {
    text-transform: uppercase;
}

/* ---------------------------------------------------------------------------------- */

/* Tablet & Mobile Styles (Max-width 768px) */
@media (max-width: 768px) {
    /* Main container for the floating buttons */
    #floating-buttons-wrapper {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        height: 60px;
        top: auto;
        transform: none;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        padding: 0;
        margin: 0;
        background-color: transparent;
        z-index: 50;
        overflow: hidden;
    }

    /* Arrow button for toggling */
    #toggle-buttons {
        position: relative;
        left: 0;
        top: auto;
        width: 60px;
        height: 100%;
        border-radius: 0;
        background-color: var(--card-bg);
        box-shadow: none;
        z-index: 60;
        display: flex;
        align-items: center;
        justify-content: center;
        order: 1;
        flex-shrink: 0;
        transition: transform var(--transition-duration) ease; /* Add transition for rotation */
    }

    #toggle-buttons.rotate-180 {
        transform: rotate(180deg);
    }

    #toggle-buttons svg {
        color: white;
    }

    /* Container for WhatsApp and Phone buttons */
    #contact-buttons-container {
        flex-direction: row;
        width: 100%;
        height: 100%;
        gap: 0;
        order: 2;
        flex-grow: 1;
        display: flex;
        padding: 0;
        margin: 0;
        transform: translateX(0);
        transition: transform var(--modal-transition-duration) ease-in-out;
    }

    #contact-buttons-container.translate-x-full {
        transform: translateX(-100%);
    }

    /* Individual button wrappers and links */
    #floating-buttons-wrapper > div,
    #floating-buttons-wrapper a {
        flex: 1 1 0%;
        min-width: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Specific button colors */
    #floating-buttons-wrapper a.bg-green-500 {
        background-color: var(--green-accent);
        color: white;
    }

    #floating-buttons-wrapper a.bg-red-500 {
        background-color: var(--dark-bg);
        color: var(--phone-accent);
    }

    #floating-buttons-wrapper a.bg-red-500 svg {
        color: var(--phone-accent);
    }

    /* Hide button text on mobile */
    #floating-buttons-wrapper a span {
        display: none;
    }

    /* Remove hover-based width expansion on mobile */
    .hover\:w-40:hover {
        width: inherit; /* Reset to the inherited width */
    }
}


    /* floating button tablet view css */

    @media (max-width: 768px) {

        /* Main container for the floating buttons */
        #floating-buttons-wrapper {
            position: fixed !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            top: auto !important;
            width: 100vw !important;
            height: 60px !important;
            transform: none !important;
            display: flex !important;
            flex-direction: row !important;
            justify-content: flex-start !important;
            align-items: center !important;
            padding: 0 !important;
            margin: 0 !important;
            background-color: transparent !important;
            z-index: 50 !important;
            overflow: hidden !important;
        }

        /* Arrow button for toggling */
        #toggle-buttons {
            position: relative !important;
            left: 0 !important;
            top: auto !important;
            width: 60px !important;
            height: 100% !important;
            border-radius: 0 !important;
            background-color: #1F2937 !important;
            color: #1F2937 !important;
            box-shadow: none !important;
            z-index: 60 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            order: 1 !important;
            flex-shrink: 0 !important;
            transform: rotate(0deg) !important;
        }

        #toggle-buttons.rotate-180 {
            transform: rotate(180deg) !important;
        }

        #toggle-buttons svg {
            color: white !important;
        }

        /* Container for WhatsApp and Phone buttons */
        #contact-buttons-container {
            flex-direction: row !important;
            width: 100% !important;
            height: 100% !important;
            gap: 0 !important;
            order: 2 !important;
            flex-grow: 1 !important;
            display: flex !important;
            padding: 0 !important;
            margin: 0 !important;
            transform: translateX(0) !important;
            transition: transform 0.5s ease-in-out;
        }

        #contact-buttons-container.translate-x-full {
            transform: translateX(-100%) !important;
        }

        /* Individual button wrappers */
        #floating-buttons-wrapper>div {
            flex: 1 1 0% !important;
            /* Make each button fill available width */
            min-width: 0 !important;
            height: 100% !important;
            display: flex !important;
            padding: 0 !important;
            margin: 0 !important;
            justify-content: center !important;
        }

        /* Remove Tailwind width utilities from wrappers on mobile */
        #floating-buttons-wrapper .w-40,
        #floating-buttons-wrapper .w-12 {
            width: 100% !important;
            min-width: 0 !important;
        }

        /* Individual button (the <a> tag) */
        #floating-buttons-wrapper a {
            flex: 1 1 0% !important;
            width: 100% !important;
            min-width: 0 !important;
            height: 100% !important;
            border-radius: 0 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }

        /* Specific button colors */
        #floating-buttons-wrapper a.bg-green-500 {
            background-color: #39fb80 !important;
            color: white !important;
        }

        #floating-buttons-wrapper a.bg-red-500 {
            background-color: #000 !important;
            color: #b9ff2e !important;
        }

        #floating-buttons-wrapper a.bg-red-500 svg {
            color: #b9ff2e !important;
        }

        /* Hide button text and prevent hover expansion for mobile */
        #floating-buttons-wrapper a span {
            display: none !important;
        }

        .hover\:w-40:hover {
            width: 100% !important;
        }
    }

    /* floating button end css */