/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    max-height: 100dvh;
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar-dark .navbar-nav .nav-link {
    width: max-content;
    color: #026473;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.navbar-dark .navbar-nav .nav-link:hover {
    color: rgb(124, 186, 73);
}

/* Link reset */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

h1 {
    width: 100%;
    text-align: center;
    color: #026473;
    font-size: 1.5rem;
}

.navbar {
    background-color:white !important;
    position: absolute;
    z-index: 5;
    width: 100%;
}
.navbar>.container-fluid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}
.navbar-head {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}
.navbar .navbar-toggler {
    border: none;
    outline: none;
    color: #026473;
}

.navbar .navbar-toggler .fa-bars:before {
    content: "\f00d";
}
.navbar .navbar-toggler.collapsed .fa-bars:before {
    content: "\f0c9";
}

#navContent.collapse {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

/* Main content */
.main-content.tools_home {
    position: relative;
    overflow: hidden;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
}

.main-content.tools_home .container.wrapper {
    height: 100%;
    overflow: auto;
    padding-top:90px;
}

/* Grid layouts */
.top-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.bottom-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

/* Card base styles */
.tools_home .card {
    width: 100%;
    max-width: 422px;
    min-height: 227px;
    background-color: #026473;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.tools_home .card-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    /*justify-content: space-between;*/
    align-items: center;
    padding: 20px;
}

.tools_home .card h2 {
    width: 100%;
    font-size: 24px;
    font-weight: 700;
    color: white;
    z-index: 2;
}

.tools_home .card p {
    margin-left: 10px;
    font-size: 20px;
    font-weight: 400;
    color: white;
    z-index: 2;
}

/* Access buttons */
.access-btn {
    position: absolute;
    bottom: 20px;
    width: 250px;
    height: 56px;
    background-color: white;
    color: black;
    border: none;
    border-radius: 40px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 2;
    justify-self: end;
}

.access-btn:hover {
    background-color: transparent;
    color: white;
}
.support-btn:hover, .link-btn:hover {
    background-color: #026473;
    color: white;
}

.access-btn:hover .arrow-icon i, .support-btn:hover i, .link-btn:hover .arrow-icon i {
    color:white;
}

.access-btn .arrow-icon, .link-btn .arrow-icon {
    position: absolute;
    right: 10px;
    width: 36px;
    height: 36px;
}

.access-btn .arrow-icon i, .link-btn .arrow-icon i {
    font-size: 36px;
    color: #026473;
}

/* Delivery Planning specific */
.delivery-planning .calendar-icon {
    position: absolute;
    top: 10%;
    left: -10%;
    font-size: 260px;
    color: rgba(0, 0, 0, .1);
    line-height: 1;
    z-index: 1;
}

/* Stock Overview specific */
.stock-overview .boxes-icon {
    position: absolute;
    top: 10%;
    left: 10%;
    font-size: 260px;
    color: rgba(0, 0, 0, 0.1);
    line-height: 1;
    z-index: 1;
}

/* Delivery Info specific */
.delivery-info .truck-icon {
    position: absolute;
    top: 10%;
    right: -15%;
    font-size: 225px;
    color: rgba(0, 0, 0, 0.1);
    line-height: 1;
    z-index: 1;
}

/* Support section */
.support-section {
    width: 100%;
    max-width: 868px;

}

.support-card {
    min-height: 142px;
    background-color: #dc3545;
    border-radius: 20px;
    color: white;
    overflow: hidden;
    position: relative;
}

.support-content {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.support-card:hover .support-categories {
    max-height: 800px;
}

.support-card h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 2rem;
    position: static;
    color: white;
}

.question-icon {
    position: absolute;
    top: -50px;
    right: -55%;
    font-size: 100dvh;
    color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
    z-index: 1;
    line-height: 1;
}

.support-categories {
    max-height: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: hidden;
    transition: max-height .2s ease-in-out;
}

.support-category h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.support-category p {
    font-size: 12px;
    margin-bottom: 0.75rem;
    color: white;
    position: static;
    width: auto;
    left: auto;
    top: auto;
}

.support-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.support-btn {
    background-color: white;
    color: black;
    border-radius: 40px;
    height: 33px;
    padding: 0 1rem;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
    transition: background-color 0.3s ease;
}


.support-btn span {
    margin-right: 1.5rem;
}

.support-btn i {
    position: absolute;
    right: 12px;
    font-size: 16px;
    color: #026473;
}

/* Useful links section */
.useful-links {
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    height: fit-content;
}

.links-card {
    background-color: #f5f2ee;
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    height: fit-content;
}
.links-card:hover .links-list{
    max-height: 800px;
}

.link-background {
    position: absolute;
    top: -35px;
    right: -10%;
    font-size: 260px;
    color: rgba(0, 0, 0, .05);
    line-height: 1;
    transform: rotateY(180deg);
}

.links-card h2 {
    font-size: 32px;
    text-align: start;
    font-weight: 600;
    color: #026473;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

.links-list {
    max-height: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    z-index: 2;
    overflow-y: hidden;
    transition: max-height .2s ease-in-out;
}

.link-btn {
    width: 100%;
    height: 56px;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 40px;
    font-size: 20px;
    font-weight: 600;
    color: black;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 0.3s ease;
}

.tools_home .form-container {
    position: absolute;
    bottom: -100%;
    margin-left:15px;
    padding-top: 15px;
    transition: bottom 0.2s ease-in-out;
    background: #f5f2ee;
    z-index: 4;
    border-radius: 20px 20px 0 0 ;
    box-shadow: 0 -2px 7px rgba(0, 0, 0, .4);
}
.tools_home .form-container.open {
    bottom: 0;
}
.tools_home .card.form-card {
    background-color: transparent;
    max-width: none;
    border: solid 2px white;
    border-radius: 20px 20px 0 0 ;
}
.fa-circle-xmark {
    display: none;
}
.main-content.tools_home .fa-circle-xmark {
    display: block;
    position: absolute;
    top: 15px;
    right: 15px;
    color: #026473;
    font-size: 32px;
    font-weight: 400;
    cursor: pointer;
}

.mobile-controls {
    display: none;
}

.desktop-hidden {
    display: none !important;
}

.login-container div.form-wrapper div.form-group {
    padding: 5px;
    background-color: white;
    border-radius:100px;
    margin-bottom:1rem;
}

.login-container div.form-wrapper input.form-control {
    background-color: transparent;
    color: #026473;
    padding:.5rem;
    border: 1px solid #026473;
    border-radius: 100px;
    font-size: 1rem;
    text-align: center;
    outline: none;
    margin-bottom:0;
}
.login-container div.form-wrapper input.form-control::placeholder {
    color: #026473;
    font-size:1rem;
}
.login-container div.form-wrapper input.form-control:focus,
.login-container div.form-wrapper input.form-control:active,
.login-container div.form-wrapper input.form-control:hover,
.login-container div.form-wrapper input.form-control:target,
.login-container div.form-wrapper input.form-control:focus-within {
    outline:none;
    border:1px solid #8AB859;
    box-shadow: none;
    color:#8AB859;
}
.login-container div.form-wrapper input.form-control:focus::placeholder ,
.login-container div.form-wrapper input.form-control:active::placeholder ,
.login-container div.form-wrapper input.form-control:hover::placeholder ,
.login-container div.form-wrapper input.form-control:target::placeholder ,
.login-container div.form-wrapper input.form-control:focus-within::placeholder {
    color:#8AB859;
}
div.login-logo h3,
.login-container div.bg-success.form-wrapper form button.btn.btn-primary,
.login-container div.bg-success.form-wrapper form a {
    color: white;
    font-family: 'Inter', sans-serif;
}
.login-container div.bg-success.form-wrapper form button.btn.btn-primary {
    color: black;
    height: 56px;
    background-color: white;
    border: none;
    border-radius: 40px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 2;
    justify-self: end;
    position: relative;
}
.login-container div.bg-success.form-wrapper form button.btn.btn-primary:hover {
    background-color: transparent;
    color: white;
}
.login-container div.bg-success.form-wrapper form button.btn.btn-primary:hover div.arrow-icon i {
    color: white;
}

.login-container div.bg-success.form-wrapper form button.btn.btn-primary div.arrow-icon {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    right: 15px;
}
.login-container div.bg-success.form-wrapper form button.btn.btn-primary div.arrow-icon i {
    color: #026473;
    font-size: 32px;
}
.login-container div.bg-success.form-wrapper {
    border-radius: 20px;
}



/* Responsive design */
@media (max-width: 768px) {


    .top-row {
        grid-template-columns: 1fr;
        height: 80%;
    }

    .bottom-row {
        grid-template-columns: 1fr;
    }

    .tools_home .card {
        max-width: 100%;
        min-height: 125px;
    }

    .tools_home .card h2 {
        font-size: 20px;
    }

    .tools_home .card p {
        font-size: 16px;
        width: 280px;
    }

    .access-btn {
        width: 200px;
    }

    .support-card h2 {
        font-size: 28px;
        text-align: left;
    }


    .links-card h2 {
        font-size: 28px;
    }
    .mobile-hidden {
        display: none !important;
    }
    .desktop-hidden {
        display: flex !important;
    }

    .main-content.tools_home .container.wrapper {
        padding-top:60px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .navbar.navbar-dark {
        padding: .5rem 1rem 1.5rem;
    }
    .navbar>.container-fluid {
        flex-direction: column;
    }

    #navContent.collapse {
        flex-direction: column;
        width: 100%;
        height: 0;
        flex-basis: unset;
        justify-content: space-between;
        transition: height .2s ease-in-out;
        overflow: hidden;
    }
    #navContent.show {
        height: calc(100dvh - (44px + 2rem));
    }

    ul.navbar-nav {
        margin: 0;
        gap: 10px;
        width: 100%;
        align-items: center;
        padding: 4dvh 0 0;
    }
    ul.navbar-nav .nav-item {
        width: 90%;
    }
    .navbar-dark .navbar-nav .nav-link {
        position: relative;
        justify-content: center;
        width: 100%;
        padding: 10px;
        border-radius: 100px;
        border: 1px solid #026473;
        gap: 0;
        font-weight: 600;
    }
    .navbar-dark .navbar-nav .nav-link:hover {
        border: 1px solid rgb(124, 186, 73);
    }
    .navbar-dark .navbar-nav .nav-link i{
        position: absolute;
        font-size: 16px;
        right: 15px;
    }

    .btn.btn-danger.desktop-hidden {
        width:75%;
    }

    .main-content {
        padding: 0.5rem;
    }

    h1 {
        font-weight: 600;
    }

    .support-section {
        height: 100%;
        position: absolute;
        transition: left 0.2s ease-in-out;
        z-index: 3;
    }
    .support-card {
        height: 100%;
        border-radius: 0;
    }

    .support-content {
        height: 100%;
        padding: 1.5rem;
    }

    .question-icon {
        top: -1%;
        left: -18%;
        font-size: 96dvh;
    }
    .support-categories {
        max-height: 85%;
        width: 100%;
        overflow-y: auto;
    }

    .support-category {
        width: 100%;
    }
    .support-buttons {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .support-btn {
        justify-content: center;
        align-items: center;
        min-width: 0;
        font-size: 11px;
    }
    .support-btn i {
        position: relative;
        right: initial;
    }



    .navbar-brand {
        margin-right: 0;
    }
    h1 {
        font-size: 1rem;
        width: max-content;
    }
    .support-card h2 {
        margin-bottom: 1.5rem;
    }

    #usefulSection.useful-links{
        position: absolute;
        transition: right 0.2s ease-out;
        z-index: 3;
        max-width: none;
    }

    .links-card {
        border-radius: 0;
        height: 100%;
        padding: 1.5rem;
    }
    .links-card .links-list{
        max-height: 800px;
    }

    .mobile-controls {
        display: flex;
        width: 100%;
        height: 50px;
        justify-content: space-between;
        gap: 10px;
        position: relative;
        z-index: 4;
    }
    .mobile-controls button {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        font-weight: 600;
        font-size: 18px;
        width: 100%;
        padding: 5px;
        border-radius: 10px;
        border: none;
        outline: none;
        overflow: hidden;
        gap: 8%;
    }
    .mobile-controls button.support-button {
        background-color: #dc3545;
        color: white;
    }
    .mobile-controls .links-button {
        background-color:#f5f2ee;
        color: #026473;
    }
    .mobile-controls .links-button::after {
        position: absolute;
        content: "\f0c1";
        font-size: 63px;
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        color: rgba(0, 0, 0, .05);
        transform: rotateY(180deg);
        top: -15%;
        right: -5%;
        line-height: normal;
    }
    .mobile-controls .links-button i {
        content: "\f0c1";
        transform: rotateY(180deg);
        font-size: 1.6rem;
    }
    .mobile-controls .support-button::after {
        position: absolute;
        content: "\f059";
        font-size: 60px;
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        color: rgba(255, 255, 255, 0.2);
        top: -13%;
        right: -8%;
        line-height: normal;
    }

    .support-section.open ~ .mobile-controls .links-button, .useful-links.open ~ .mobile-controls .support-button{
        opacity: 0;
        pointer-events: none;
    }
    .support-section.open ~ .mobile-controls .support-button {
        border-radius: 10px;
        border: 1px solid white;
        background-color: transparent;
    }

    .useful-links.open ~ .mobile-controls .links-button{
        border-radius: 10px;
        border: 1px solid #026473;
        background-color: transparent;
    }
    .useful-links.open ~ .mobile-controls .links-button::after,  .support-section.open ~ .mobile-controls .support-button::after{
        content:'';
    }

    .support-btn span {
        margin-right: 1rem;
    }

    .tools_home .form-container {
        margin-left:0;
        background: #f5f2ee;
        box-shadow: none;
        height: 100%;
        border-radius: 0;
    }

    .from-left   { left: -100%; top: 0; height: 100%; }
    .from-right  { right: -100%; top: 0; height: 100%; }
    .from-top    { top: -100%; left: 0; width: 100%; }
    .from-bottom { bottom: -100%; left: 0; width: 100%; }
    .from-left.open   { left: 0; }
    .from-right.open  { right: 0; }
    .from-top.open    { top: 0; }
    .from-bottom.open { bottom: 0; }

    .mobile-hidden {
        display: none;
    }

    @media (max-height: 790px) {
        .access-btn {
            width: 57px;
            right: 20px;
        }
        .access-btn span{
            display: none;
        }
    }
    .login-container div.bg-success.form-wrapper {
        padding: 10px;
        flex: 0 0 90%;
        max-width: 90%;
    }

}
