:root {
    --primary-color: #A41E21; /* EPS Buildings Red */
    --secondary-color: #fff; /* White */
    --accent-color: #000; /* Black */
}

@font-face {
    font-family: bootstrapFont;
    src: url(/lib/bootstrap/dist/icons/font/fonts/bootstrap-icons.woff);
}

html {
    font-size: 14px;
    height: 100%;
    margin: 0;
    overflow-y: hidden; /* prevent scroll */
}

body {
    background: linear-gradient(to bottom, #A41E21, #791616);
    color: white;
    height: 100%;
    margin: 0;
    overflow-y: hidden; /* prevent scroll */
}


header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1030;
}

main {
    --header-height: 60px;
    --footer-height: 50px;

    position: absolute;
    top: 60px; /* height of navbar */
    bottom: 0px; /* height of footer */
    height: calc(100% - var(--header-height) - var(--footer-height));
    left: 0;
    right: 0;
    display: flex;
}

footer {
    bottom: 0;
    height: 50px;
    background-color: rgb(0, 0, 0, 0.85);
    color: white;
    position: fixed;
    left: 0;
    right: 0;
}


.editors-container {
    flex: 0;
    min-width: 400px;
    max-height: 100vh;
    margin-left: 16px;
}


#info {
    color: black;
    text-align: left;
}


.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--secondary-color), 0 0 0 0.25rem var(--primary-color);
}

#c {
    width: 100% !important;
    height: 100% !important;
}


.spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #f3f3f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    pointer-events: auto;
    border-top: 6px solid var(--primary-color);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


.row {
    margin-bottom: 20px;
}

.navbar {
    background-color: #111;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid var(--primary-color);
}

.navbar-nav {
    gap: 1rem; /* Adds spacing between nav items */
    align-items: center;
}

.navbar-nav .nav-item .nav-link {
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.25s ease-in-out;
}

.navbar-nav .nav-item .nav-link:hover,
.navbar-nav .nav-item .nav-link:focus {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-1px);
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
    .navbar-nav .nav-item .nav-link.flashing {
        background: #c42a2d;
        animation: flashRed 1.0s ease-in-out infinite;
    }

    @keyframes flashRed {
        0%, 100% {
            background: transparent;
        }

        50% {
            background: #c42a2d;
        }
    }


.navbar-nav .nav-item .nav-link:active {
    background-color: #791616;
    color: white;
    transform: scale(0.98);
}

.navbar-nav .nav-link i {
    margin-right: 6px;
    font-size: 1rem;
    vertical-align: middle;
}

/* Tab Container */
.nav-tabs {
    width: 100%;
    border-bottom: 2px solid var(--primary-color);
}

/* Individual Tab Links */
.nav-tabs .nav-link {
    color: var(--secondary-color);
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 12px 18px;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

    .nav-tabs .nav-link:hover {
        background: #c42a2d;
        border-color: #c42a2d;
        color: var(--secondary-color);
        transform: translateY(-2px);
    }

/* Active Tab */
.nav-tabs .nav-link.active {
    background: var(--secondary-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: bold;
}

/* Tab Content Panels */
.tab-content {
    width: 100%;
    background-color: #e6e6e6;
    border: 1px solid var(--primary-color);
    padding: 12px;
    border-radius: 0 0 8px 8px;
    color: #000;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    height: auto;
    overflow-y: auto;
}

.designer-container {
    display: flex;
    flex-direction: row;
}

/* Default layout (desktop) remains unchanged */
/* Mobile layout */
@media (max-width: 992px) {


    html {
        font-size: 16px;
        overflow-y: scroll;
    }

    main {
        display: block;
        margin-bottom: 0px;
    }

    .editors-container {
        margin-bottom: var(--footer-height);
        margin-left: 2px;
        margin-right: 4px;
        padding-top: 8px;
    }

    .designer-container {
        flex-direction: column;
    }

    #container {
        flex-direction: column; 
        height: auto;
        min-height: 100vh;
    }

    #c {
        width: 100%;
        height: 40vh;
        flex-grow: 0;
        border-radius: 0px;
        max-height: 600px;
    }

    #main-ui {
        width: 100%;
        max-height: none;
        padding: 10px;
        box-sizing: border-box;
    }

    /* Adjust tab content for mobile */
    .tab-content {
        padding: 10px;
        border-radius: 0;
    }

    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }

    .row {
        margin-bottom: 10px;
    }
}

#projects-select option {
    color: black;
}

#saveProjectForm {
    color: black;
}

#saveProjectModalLabel {
    color: black; 
}

#controlsGuideModal .modal-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto; /* Center the image */
}

#controlsGuideModal .modal-content {
    background-color: #fff;
    border-radius: 8px;
}

#controlsGuideModal .modal-backdrop {
    opacity: 0.8;
}

.nav-item .nav-link.btn {
    border: none;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 6px;
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    /* Limit transitions to specific properties */
    transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
}

/* On state (active) */
.nav-item .nav-link.btn.active {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

/* Off state */
.nav-item .nav-link.btn:not(.active) {
    background-color: #333;
    color: #ccc;
    box-shadow: none;
    transform: none;
}

/* Hover and focus */
.nav-item .nav-link.btn:hover,
.nav-item .nav-link.btn:focus {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    /* Ensure hover doesn’t delay state change */
    transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out, background-color 0.1s ease-in-out;
}

/* Active (clicked) state */
.nav-item .nav-link.btn:active {
    background-color: #791616;
    color: var(--secondary-color);
    transform: scale(0.98);
    transition: transform 0.1s ease-in-out;
}

.nav-item .nav-link.btn.btn-primary:not(.active) {
    background-color: #333 !important; /* Force off state */
    border-color: #333 !important;
    color: #ccc !important;
}

/*Prevent default zooming into inputs on focus in mobile*/
input,
textarea,
select {
    font-size: 16px;
}





/* Read Only Start */
[data-mode="read-only"] .hide-read-only {
    display: none;
}
/* Read Only End */