@import url('sharedStyles.css');

:root {
    --catalogue-card-bg: #f0f3ef;
    --bs-btn-border-radius: 0;
    --bs-card-border-radius: 0;
    --bs-border-radius: 0;
}

.btn {
    --bs-btn-border-radius: 0;
}

.main-content.container {
    margin-right: 0px;
}

/* Danger button */

span.bg-danger {
    background: #c91a2b !important;
}

.btn-danger {
    background: #b02a37;
    border-color: #b02a37;
    transition: background 160ms ease, box-shadow 160ms ease;
}

    .btn-danger:hover {
        background: #91212c;
        border-color: #91212c;
    }

    .btn-danger:disabled,
    .btn-danger[aria-disabled="true"] {
        background: #f1c2c6;
        color: #7a1e25;
        border-color: #e5aeb3;
        cursor: not-allowed;
        box-shadow: none;
        opacity: 1; /* avoid opacity for readability */
    }

#logoutBtn {
    text-align: left;
    margin-left: 0.2rem;
}

#navbarOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 1040; /* Just below Bootstrap's navbar z-index */
    display: none; /* Hidden by default */
    cursor: default;
    /*    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s;*/
}

    /* When active, this prevents clicking anything underneath */

    #navbarOverlay.active {
        display: block;
    }


    body.logged-in {
        background-color: var(--bs-body-bg);
        position: center center;
    }

        body.logged-in::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
/*            background-image: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)), url('../images/honey_im_subtle.png');*/
            background-repeat: repeat;
            z-index: -1;
        }

    body.logged-out {
        background-image: url('../images/classroom.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }


        body.logged-out .card {
            -webkit-backdrop-filter: blur(2px);
        }

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    /* background: var(--bs-mml-green);*/
    /*    background-color: var(--bs-mml-lavender) !important;*/
    background-color: var(--bs-light) !important;
    color: var(--bs-mml-indigo);
    flex-direction: column;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

    .sidebar .nav-link, .sidebar .btn-link, #expandMenuButton {
        color: var(--bs-mml-indigo);
        transition: all 0.25s ease;
        border-left: 3px solid transparent;
        padding-left: calc(1rem - 3px);
    }

        .sidebar .nav-link.active, .sidebar .nav-link:focus {
            background: rgba(255, 255, 255, 0.1);
            color: var(--bs-mml-indigo);
            border-left: 3px solid #D4A843;
        }

        .sidebar .nav-link:hover {
            background: var(--bs-mml-blue);
            color: var(--bs-mml-indigo);
            border-left: 3px solid #D4A843;
        }


#desktopSidebar.sidebar {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    height: 100vh;
    overflow: hidden;
    z-index: 1050;
    transition: width 0.4s ease-in-out, min-width 0.4s ease-in-out, max-width 0.4s ease-in-out;
}

    #desktopSidebar.sidebar.expanded {
        width: 250px !important;
        min-width: 250px !important;
        max-width: 250px !important;
    }

/* Expand/collapse mechanics - global, applies to both #mobileSidebar and #desktopSidebar */

/* The "Open" state - default (mobile) width; #desktopSidebar overrides this above via higher specificity */
.sidebar.expanded {
    width: 230px !important;
}

.sidebar-content {
    width: 230px; /* Must match the mobile expanded width above */
    white-space: nowrap; /* Prevents text from wrapping during animation */
}

#desktopSidebar .sidebar-content {
    width: 250px; /* Must match the desktop expanded width above */
}

.sidebar.expanded .nav-item,
.sidebar.expanded .user-info,
.sidebar.expanded #logoutBtnMobile,
.sidebar.expanded #logoutBtnDesktop {
    animation: slideIn 0.3s forwards;
    opacity: 0;
}
    /* Menu Button */
    .sidebar.expanded .nav-item:nth-child(1) {
        animation-delay: 0.05s;
    }
    /* Search */
    .sidebar.expanded .nav-item:nth-child(2) {
        animation-delay: 0.10s;
    }
    /* Fast Order */
    .sidebar.expanded .nav-item:nth-child(3) {
        animation-delay: 0.15s;
    }
    /* Catalogues */
    .sidebar.expanded .nav-item:nth-child(4) {
        animation-delay: 0.20s;
    }
    /* Orders */
    .sidebar.expanded .nav-item:nth-child(5) {
        animation-delay: 0.25s;
    }
    /* Back Orders */
    .sidebar.expanded .nav-item:nth-child(6) {
        animation-delay: 0.30s;
    }

    .sidebar.expanded .nav-item:nth-child(7) {
        animation-delay: 0.30s;
    }

    .sidebar.expanded .nav-item:nth-child(8) {
        animation-delay: 0.30s;
    }

    .sidebar.expanded .nav-item:nth-child(9) {
        animation-delay: 0.30s;
    }

    .sidebar.expanded .nav-item:nth-child(10) {
        animation-delay: 0.30s;
    }

    .sidebar.expanded .nav-item:nth-child(11) {
        animation-delay: 0.30s;
    }

    .sidebar.expanded .nav-item:nth-child(12) {
        animation-delay: 0.30s;
    }

    /* Handling items outside the <ul> */
.sidebar.expanded .user-info {
    animation-delay: 0.35s;
}


@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#desktopSidebar.sidebar-logo {
    padding: 1rem;
    margin-left: 1em;
}

#desktopSidebar.sidebar .user-info {
    margin-top: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.05);
}

.navbar-light-background {
    background-color: whitesmoke;
}

.navbar-blue-background {
    background-image: url('../images/alternative-styles-1/navimage2.png')
}

.navbar-icon-link {
    text-decoration: none; /* Removes the underline */
    color: white; /* Change to white if your navbar is dark */
    display: inline-flex; /* Helps center the icon */
    align-items: center;
}

    .navbar-icon-link:hover {
        color: #007bff; /* Change color on hover */
    }

    /* Ensure navbar items don't overlap with centered logo */

@media (min-width: 992px) {
    .navbar-nav.me-auto {
        max-width: 40%;
    }

    .navbar-nav.ms-auto {
        max-width: 40%;
        justify-content: flex-end;
    }
}

/* Mobile view adjustments */

@media (max-width: 991.8px) {
    .navbar-logo-container {
        position: static !important;
        transform: none !important;
        display: block;
        text-align: center;
    }

    .navbar-toggler {
        order: 0;
    }

    .navbar-collapse {
        order: 1;
        margin-top: 1rem;
    }

    .container-fluid {
        flex-wrap: wrap;
    }

    .logo-img-sizing {
        height: 40px;
    }

    #offCanvasToggleBtn {
        display: block;
        padding-left: 0.75rem;
        background: #2C3E2D;
    }

    #mobileSidebar.sidebar {
        width: 50px;
        transition: width 0.4s ease-in-out;
        overflow: hidden;
        display: block;
        z-index: 1050 !important;
        /*        max-height: 500px;*/
        /*        overflow: hidden;*/
    }

    #mobileSidebarLogo {
        max-height: 30px;
    }

    #desktopSidebar.sidebar {
        display: none;
    }

    body.logged-in .main-content {
        margin-left: 48px;
        max-width: calc(100vw - 48px);
        padding-top: 0;
    }
}

#logoutBtnMobile {
    text-decoration: none;
}

@media (min-width: 767.8px) and (max-width: 991.8px) {
    #mobileSidebar.sidebar {
        width: 70px;
    }

    body.logged-in .main-content {
        margin-left: 75px;
        max-width: calc(100vw - 75px);
    }
}

@media (min-width: 992px) {
    .navbar-logo-container {
        /* Reset positioning for centering within a relative parent */
        position: absolute;
        /* Apply centering logic */
        left: 50%;
        top: 0; /* Keep it at the top */
        /* Apply the horizontal centering transform */
        transform: translateX(-50%);
    }

    #mobileSidebar.sidebar {
        display: none;
    }

    #desktopSidebar.sidebar {
        display: block;
    }


    body.logged-in .main-content {
        margin-left: 70px;
        max-width: calc(100vw - 70px);
        padding-top: 0;
    }
}

@media(min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 767px;
    }
}

@media(min-width: 768px) and (max-width: 992px) {
    .container {
        max-width: 992px;
    }
}

/* Desktop - ensure logo doesn't get obscured */

@media (min-width: 992px) {
    .navbar .container-fluid {
        min-height: 80px;
    }
}

/* Navbar responsive adjustments */

@media (max-width: 991px) {
    .navbar-collapse {
        margin-top: 1rem;
    }

    .navbar-nav {
        text-align: left;
    }

        .navbar-nav .nav-item {
            margin-left: 0 !important;
            margin-right: 0 !important;
            padding: 0.25rem 0;
        }
}

/* Ensure table text inherits body color */

table,
table tbody,
table tbody tr,
table tbody tr td,
table thead,
table thead tr,
table thead tr th,
table tfoot tr,
table tfoot tr th {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg);
    white-space: nowrap;
}

/* Ensure Bootstrap table variants don't override */

.table,
.table > :not(caption) > * > * {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg);
}

/* Styling the Top Wrapper to look like a track */

#topScrollbarWrapper {
    background: #f1f1f1;
}

.main-content.container {
    padding: 0;
    overflow-x: hidden;
}

#layoutSwitcher {
    margin-left: 2em;
}

.card-container {
    display: flex;
}

.card {
    border: none;
    background-color: var(--bs-);
}

.card-footer {
    background-color: var(--bs-body-bg);
}

.footer-legal-links a {
    opacity: 0.7;
    transition: opacity 0.15s ease-in-out;
}

.footer-legal-links a:hover,
.footer-legal-links a:focus {
    opacity: 1;
}

.title-row {
    background-position: bottom right;
    color: var(--bs-mml-indigo);
    --bs-border-color: var(--bs-body-color);
    --bs-secondary-rgb: #e0e0e0;
    --bs-secondary-color: #e0e0e0;
    margin-bottom: 1rem;
    border-bottom: none;
    padding: 1em;
    align-items: center ;
    background-repeat: no-repeat;
    margin-bottom: 1rem;
}

/*    .title-row.home { background: var(--bs-mml-lavender); }*/

    .title-row.home {
        /*background: var(--bs-mml-indigo);*/
        background: linear-gradient(to top right, var(--bs-mml-indigo) 25%, rgba(255, 255, 255, 0.4) 100%), var(--bs-mml-indigo);
        color: white;
    }
    .title-row.products { background: var(--bs-mml-soft-green); }
    .title-row.orders, .title-row.invoices,  .title-row.back-orders { background: #8bc5d1; }
    .title-row.quick-order-entry { background: var(--bs-mml-soft-blue); }
    .title-row.cart {  background: var(--bs-mml-yellow); }
    .title-row.account { background: var(--bs-mml-yellow); }
    .title-row.catalogues {background: var(--bs-mml-yellow); }
    .title-row.help { background: var(--bs-mml-clay); }
    .title-row.contactus { background: var(--bs-mml-soft-green); }
    .title-row.checkout { background: var(--bs-mml-lavender)}
    .title-row.page-not-found { background: var(--bs-mml-lavender); }

    .title-row .card {
        color: inherit;
        padding-left: 0;
    }

    .title-row h2, .title-row h4 {
        font-size: clamp(2rem, 4.5vw, 2.4rem);
        font-weight: 300;
        letter-spacing: 0.05em;
        line-height: 1.1;
        margin: 0;
        text-transform: uppercase;
    }

    .title-row .table {
        overflow-y: auto;
    }


@media (max-width: 576px) {
    #searchProductsForm {
        width: 80%;
    }
}




@media(min-width: 576px) {
    .title-row .card, .sub-content-card {
        padding: 1rem;
    }

}

.title-row-images {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 0.5rem;
}

.title-row-images img.single-colour-logo {
    max-height: 50px;
    padding-right: 0rem;
}

    @media (min-width: 1200px){
        .title-row-images img.single-colour-logo {
            max-height: 65px;
        }
    }

.title-row-images img.illustration {
    height: 90px;
    padding-right: 1.2rem;
}

img.heading-illustration {
    height: 70px;
}

#backOrdersIllustration {
    height: 80px;
}

.title-row.orders .title-row-images img {
    max-height: 50px;
}

.title-row-images img.reversed-logo {
    max-height: 75px;
    padding-right: 0rem;
}

    @media(max-width: 768px) {
        .title-row-images img.reversed-logo {
            max-height: 40px;
            padding-right: 0rem;
        }
    }

    @media(max-width: 992px) {
        .title-row-images img.reversed-logo {
            max-height: 60px;
            padding-right: 0rem;
        }
    }

    .patternDiv {
        background-image: url('../images/patternTransparent.png');
        background-size: auto 70px;
        background-repeat: repeat-x;
        height: 75px;
        display: none;
    }

        .patternDiv.patternLavender {
            background-color: var(--bs-mml-lavender);
        }

        .patternDiv.patternGreen {
            background-color: var(--bs-mml-soft-green);
        }

        .patternDiv.patternYellow {
            background-color: var(--bs-mml-yellow);
        }

        .patternDiv.patternClay {
            background-color: var(--bs-mml-clay);
        }

        .patternDiv.patternBlue {
            background-color: var(--bs-mml-soft-blue);
        }

    .homePagePatternPadding {
        background-color: var(--bs-mml-lavender);
        height: 5px;
    }

    .catalogue-card {
        background-color: var(--catalogue-card-bg);
    }

        .catalogue-card:hover {
            background-color: #d9e1d5;
        }

    input, .form-select, .form-control {
        color: #444 !important;
        --bs-secondary-color: #6c757d;
        background-color: #FFF !important;
    }

    .input-label {
        color: var(--bs-body-color);
    }

    @media (min-width: 1400px) {
        .ps-xxl-6 {
            padding-left: 6rem !important;
        }

        .ps-xxl-7 {
            padding-left: 7rem !important;
        }

        .ps-xxl-9 {
            padding-left: 9rem !important;
        }

        .ps-xxl-12 {
            padding-left: 12rem !important;
        }

        /*    .w-xxl-50 {
        width: 50%;
    }

    .w-xxl-70{
        width: 70%;
    }*/
    }

    .desktop-logo, .mobile-logo {
        margin: 1em;
    }

    .desktop-logo {
        width: 75%;
        height: auto;
    }

    .desktop-logo-link {
        text-align: center;
        transition: transform 0.4s ease;
    }


        .desktop-logo-link:hover {
            transform: scale(1.1);
        }

    @media (max-width: 440px) {
        .mobile-logo {
            display: inline-block !important;
            height: 50px;
        }

        .desktop-logo {
            display: none !important;
        }
    }

    @media (min-width: 992px) {
        .desktop-logo {
            width: 75%;
        }
    }

    #emptyCartImage {
        height: 70px;
    }

    #darkModeToggle {
        display: none;
    }

    .lonely-title-text {
        display: none;
    }

    .fastOrderPartialCard .card-body {
        padding-left: 3em;
    }

    #fastOrderFormatBtn {
        margin-inline-start: 3rem;
    }

    @media(min-width: 576px) {
        .customMarginContainer {
            margin-inline: 1em;
        }
    }

    #changeAddressBtn {
        margin-left: 2em;
    }

    #cartItemsTable {
        text-align: right;
    }

    @media(max-width: 575.98px) {
        #cartItemsTable {
            margin-right: 2em;
        }
    }

    @media(max-width: 991.98px) {
        #cartTable {
            font-size: small;
        }
    }

    .sub-content-card #selectDeliveryAddressSubHeading {
        display: none;
    }

    .no-x-overflow {
        overflow-x: hidden;
    }

    /* Desktop sidebar menu hover effects for Layout 4 */

    #logoutBtnDesktop {
        /*    font-size: 1.2rem;*/
    }

    #desktopSidebar .nav-link {
        transition: all 0.25s ease;
        border-radius: 0;
        margin: 0.1rem 0;
        padding: 0.5rem 1rem;
        /*    font-size: 1.2rem;*/
    }

        #desktopSidebar .nav-link.selected, #mobileSidebar .nav-link.selected {
            font-weight: 600;
            background: rgba(255, 255, 255, 0.1);
            border-left: 3px solid #D4A843;
            /*        color: var(--bs-mml-clay);*/
        }


    #desktopSidebar .nav-item, #mobileSidebar .nav-item, .user-info, #logoutBtnMobile {
        font-size: 0.75em;
    }

    @media(min-height: 600px) and (max-height: 900px) {
        #desktopSidebar .nav-item, #mobileSidebar .nav-item, .user-info {
            font-size: 0.8em;
        }
    }

    @media(min-height: 901px) {
        #desktopSidebar .nav-item, #mobileSidebar .nav-item, .user-info, #logoutBtnMobile {
            font-size: 1em;
        }
    }

    /* Active/current page styling for desktop sidebar */

    #desktopSidebar .nav-link.active {
        color: #ffffff !important;
        font-weight: 700;
        background: rgba(255, 255, 255, 0.08);
        border-left: 3px solid #D4A843;
    }

    /* Icon styling for desktop sidebar */

    #desktopSidebar .nav-link i {
        transition: transform 0.25s ease, opacity 0.3s ease;
    }

    #desktopSidebar .nav-link:hover i {
        opacity: 1;
        transform: translateX(2px);
    }

    /* Logout button text styling for desktop sidebar */

    #desktopSidebar #logoutBtnDesktop {
        border-radius: 0;
        margin: 0.2rem 0;
        padding: 0.75rem 1rem;
        border: none;
        border-left: 3px solid transparent;
        text-align: left;
        width: 100%;
    }

        #desktopSidebar #logoutBtnDesktop:hover {
            color: #ffcccc !important;
            font-weight: 600;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
            background: var(--bs-mml-green);
            border-left: 3px solid #ff8888;
        }

    /* Dark mode toggle - no text changes needed since it's just an icon */

    #desktopSidebar #darkModeToggle {
        transition: opacity 0.3s ease;
        border-radius: 8px;
        margin: 0.2rem 1rem;
        width: calc(100% - 2rem);
    }

        #desktopSidebar #darkModeToggle:hover {
            opacity: 0.8;
        }

    /* Logo text styling (if any) */

    #desktopSidebar .sidebar-logo {
        transition: opacity 0.3s ease;
    }

        #desktopSidebar .sidebar-logo:hover {
            opacity: 0.9;
        }

    #deliveryOptionsSection, #collectionOptionsSection {
        padding-top: 1rem;
        padding-bottom: 1rem;
        padding-left: 2rem;
        padding-right: 2rem;
    }

    /* Search button spinner styling */
    #searchSpinner {
        display: inline-block;
        vertical-align: middle;
        border-color: rgba(255, 255, 255, 0.25);
        border-right-color: #fff;
    }

    #searchButton:disabled {
        opacity: 0.85;
        cursor: not-allowed;
    }

    .bg-success {
        color: var(--bs-mml-indigo);
    }

    .bg-blue {
        background-color: var(--bs-mml-blue);
        color: var(--bs-mml-indigo);
    }

    .bg-yellow {
        background-color: var(--bs-mml-yellow);
        color: var(--bs-mml-indigo);
    }

    .bg-clay {
        background-color: var(--bs-mml-clay);
        color: var(--bs-mml-indigo);
    }

    .indigo-button {
        color: var(--bs-mml-indigo);
    }

    .breadcrumb-item.active {
        color: var(--bs-body-color);
    }
}