/* site.css - responsive and touch-friendly styles for PicMeals */
body {
    padding-top: 64px;
}

/* Brand logo font (ensure this is in a CSS file that is loaded) */
@font-face {
    font-family: 'Pacifico';
    src: url('/static/fonts/Pacifico-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Larger touch targets and comfortable spacing for mobile/tablet */
.navbar .nav-link {
    padding: .625rem 1rem;
    font-size: 1rem;
}

.navbar-brand img {
    max-height: 40px;
}

.btn {
    min-height: 44px;
}

input.form-control, .form-select, textarea.form-control {
    min-height: 44px;
    font-size: 1rem;
}

/* Content padding adjustments */
.content-wrapper {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
}

@media (min-width: 576px) {
    .content-wrapper {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }
}

/* Make cards take full width on small screens but remain centered with a max width */
.responsive-card {
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 576px) {
    .navbar-brand span {
        font-size: 1.05rem;
    }

    .responsive-card {
        max-width: 100%;
        padding-left: .5rem;
        padding-right: .5rem;
    }

    .container {
        padding-left: .5rem;
        padding-right: .5rem;
    }
}

/* Minor tweaks */
.navbar-toggler {
    border: none;
}

#topbar, .btn-danger, bg-danger {
    background-color: var(--primary-color) !important;
}

.text-danger {
    color: var(--primary-color) !important;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-danger {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

    .btn-outline-danger:hover {
        background-color: var(--primary-color) !important;
        color: white !important;
        border-color: var(--primary-color) !important;
    }

#menuOpenCloseBtn {
    font-size: xx-large;
    border: none;
    padding: 0px;
    color: white;
    background-color: transparent;
}

.btn-circle {
    aspect-ratio: 1 / 1; /* Ensures perfect circle always */
    width: 38px; /* Sets base size (you can use em/rem if preferred) */
    max-width: 100%; /* Prevents overflow in responsive layouts */
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: x-small;
    border: none;
    color: white;
    text-decoration: none;
    box-sizing: border-box; /* Ensures padding/border don’t break circle */
    flex-shrink: 0; /* Prevents flex containers from squashing it */
}

/* Ensure nav-link contents are vertically centered (icons, text, badges) */
.nav.nav-pills .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* small space between icon and text */
}

    /* Keep icon line-height predictable */
    .nav.nav-pills .nav-link .fa,
    .nav.nav-pills .nav-link .fas,
    .nav.nav-pills .nav-link .fa-solid {
        line-height: 1;
    }

    /* Ensure badges center their content vertically */
    .nav.nav-pills .nav-link .badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

/* Business image: fixed size, keep aspect, crop via object-fit */
.business-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: .375rem;
    flex: 0 0 64px; /* prevent flex from stretching the image */
    display: block;
}

/* Slightly smaller images on very small screens */
@media (max-width: 576px) {
    .business-img {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
    }
}

/* Horizontal card list for business search - one per row */
.business-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.business-card {
    display: flex;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.business-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.business-card-image-wrapper {
    position: relative;
    width: 120px;
    min-width: 120px;
    height: 120px;
    background: #f5f5f5;
    overflow: hidden;
    flex-shrink: 0;
}

@media (min-width: 576px) {
    .business-card-image-wrapper {
        width: 140px;
        min-width: 140px;
        height: 140px;
    }
}

.business-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.business-card-bookmark {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.business-card-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}

.business-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.business-card-cuisine {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.business-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.business-card-footer .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.business-card-address {
    font-size: 0.8rem;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Ensure text truncation works for long names */
.business-title {
    max-width: calc(100% - 48px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Small spacing adjustments */
.business-info {
    min-width: 0;
}
/* allow text truncation inside flex */

/* Desktop: show offcanvas as persistent left sidebar and hide the toggle button */
@media (min-width: 992px) {
    /* Position the offcanvas as a fixed sidebar */
    #offcanvasLeft {
        position: fixed;
        top: 64px; /* match navbar height / body padding-top */
        left: 0;
        width: 240px;
        height: calc(100vh - 64px);
        visibility: visible !important;
        transform: none !important;
        background: var(--bs-body-bg, #fcfcfd);
        border-right: 1px solid rgba(0,0,0,.05);
        padding-top: 1rem;
        display: block !important;
        z-index: 1020;
        overflow-y: auto;
        background-color: #fcfcfd !important;
        -webkit-box-shadow: 3px 0px 10px 0px rgba(155, 155, 155, 0.25);
    }

        /* Make the offcanvas body use normal padding */
        #offcanvasLeft .offcanvas-body {
            padding: .5rem 1rem;
        }

    /* Hide the menu toggle button in navbar on larger screens */
    .navbar .btn[data-bs-toggle="offcanvas"] {
        display: none !important;
    }

    /* Shift main content to the right to make room for the sidebar */
    .content-wrapper {
        margin-left: 260px;
    }

    /* Ensure navbar sits above the fixed sidebar */
    .navbar {
        z-index: 1030;
    }
}

/* start left menu*/
/* Sidebar look */
.sidebar-nav.offcanvas {
    --bs-offcanvas-width: 280px;
    border-right: 1px solid rgba(0,0,0,.05);
    background: linear-gradient(180deg, #ffffff 0%, #f7f7fb 100%);
}

.offcanvas-header {
    border-bottom: 1px solid rgba(0,0,0,.05);
}

.nav-section-title {
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6c757d;
    margin: .75rem 0 .25rem;
    padding-left: .5rem;
}

.nav-sep {
    height: 1px;
    background: rgba(0,0,0,.06);
    margin: .75rem 0;
}

.sidebar-footer {
    font-size: .85rem;
    color: #6c757d;
    border-top: 1px solid rgba(0,0,0,.05);
    padding-top: .75rem;
}

/* On lg+ the offcanvas becomes static sidebar; add left space for page content */
@media (min-width: 992px) {
    body {
        padding-left: 280px; /* equals --bs-offcanvas-width */
    }

    .sidebar-toggler {
        display: none; /* hide burger on desktop */
    }
}
/* end left menu*/

/* Scope to the sidebar nav to avoid global side effects */
.nav.nav-pills .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* space between icon, label, badge */
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

    /* Keep icons from increasing line-height */
    .nav.nav-pills .nav-link i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.1rem;
    }

    /* Hide badges by default; show only when element contains content */
    .nav.nav-pills .nav-link .badge {
        display: none;
        margin-left: auto; /* push badge to the far right if desired; remove if not wanted */
        align-items: center;
        justify-content: center;
        height: 1.5rem;
        min-width: 1.5rem;
        padding: 0 0.4rem;
        font-size: 0.75rem;
        line-height: 1;
        white-space: nowrap;
    }


        /* When badge has inner HTML/text, show it */
        .nav.nav-pills .nav-link .badge:not(:empty) {
            display: inline-flex;
        }

        /* Slight visual tweak for pill appearance */
        .nav.nav-pills .nav-link .badge.badge-pill {
            border-radius: 999px;
        }

    /* Ensure small buttons and forms in nav align with links */
    .nav.nav-pills .nav-link .btn,
    .nav.nav-pills .nav-link form {
        margin-left: 0.5rem;
    }

/* Top bell styling */
#notif-bell {
    position: relative;
}

#bell-count {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 0.65rem;
    line-height: 1;
}

/* Inbox simple panel */
#inbox {
    max-height: 50vh;
    overflow: auto;
}


/* Hover color: change both icon and text together to var(--primary-color) */
/* Target anchor links used across the UI: .lnk (generic) and .nav-link.lnk (nav items) */
a.nav-link {
    color: #4e4f4f;
}

.nav-link.lnk,
a.nav-link,
.navbar-brand.lnk {
    color: inherit;
    transition: color 0.15s ease-in-out;
}

    /* On hover or focus, set link color. Use specificity and !important to override Bootstrap defaults where needed. */
    a.nav-link:hover,
    .nav-link.lnk:hover {
        color: var(--primary-color) !important;
        text-decoration: none;
    }

    /* Ensure Font Awesome icons and inline <i> elements inside those links inherit the link color */
    .lnk .fa,
    .lnk .fa-solid,
    a.nav-link i,
    a.nav-link fa,
    a.nav-link .fa-solid,
    .nav-link.lnk i,
    .nav-link.lnk .fa,
    .nav-link.lnk .fa-solid {
        color: inherit !important;
        transition: color 0.15s ease-in-out;
    }

    /* Ensure spans inside links (text labels) also inherit color */
    a.nav-link span
    .nav-link.lnk span {
        color: inherit !important;
    }

    /* Avoid recoloring badges or important UI elements unintentionally:
           target only icon and immediate span/text inside the link; badges keep their own color. */

    a.nav-link .badge,
    .nav-link.lnk .badge {
        color: unset !important;
    }

    a.nav-link:focus, a.nav-link.lnk:focus {
        color: var(--primary-color) !important;
        text-decoration: none;
    }

/* Keep brand white and styled even on hover/focus, overriding generic .lnk rules */
#topbar .navbar-brand,
#topbar .navbar-brand span {
    font-family: 'Pacifico', cursive, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    text-decoration: none;
    font-size: xx-large;
    color: #fff !important;
}

    #topbar .navbar-brand:hover,
    #topbar .navbar-brand:focus,
    #topbar .navbar-brand:hover span,
    #topbar .navbar-brand:focus span {
        color: #fff !important;
        text-decoration: none;
    }

.transparent {
    background-color: transparent !important;
    border: none !important;
}

/* pure-css vertical bars */
.chart-weekday {
    align-items: stretch;
}

.chart-bar {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

    .chart-bar .bar-holder {
        flex: 1 1 auto;
        display: flex;
        align-items: flex-end;
    }

    .chart-bar .bar {
        background: linear-gradient(180deg,#ed9890,#ed7368);
        width: 100%;
        border-radius: 4px 4px 0 0;
    }

/* Menu item layout helpers */
.menu-item-row {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.menu-item-left {
    flex: 1 1 auto;
    min-width: 0;
}

.menu-item-right {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
}

.menu-item-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin: 0;
}

    .menu-item-title .badge {
        white-space: nowrap;
    }

    .menu-item-title .btn {
        padding: .125rem .35rem;
        line-height: 1;
    }

.menu-item-desc {
    margin-top: .25rem;
    color: #6c757d;
    word-wrap: break-word;
}

/* Prevent overflowing controls on small screens */
.menu-qty-group {
    width: 150px;
}

.min-w-0 {
    min-width: 0 !important;
}

/* Bell highlight animation when new paid order arrives */
#notif-bell.new {
    border-color: #ffc107 !important;
    color: #ffc107;
    animation: bellpulse 0.9s ease-in-out 2;
}

@keyframes bellpulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}

.notif-item {
    text-decoration: none;
    color: white;
    display: block;
}

/* Start Apply template colors to business dashboard */
#topbar {
    background-color: var(--primary-color) !important;
}

.btn-danger {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

    .btn-danger:hover {
        background-color: var(--primary-hover) !important;
        border-color: var(--primary-hover) !important;
    }

.btn-outline-danger {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

    .btn-outline-danger:hover {
        background-color: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
        color: white !important;
    }

.bg-danger {
    background-color: var(--primary-color) !important;
}

.badge.bg-danger {
    background-color: var(--primary-color) !important;
}

.text-danger {
    color: var(--primary-color) !important;
}

.border-danger {
    border-color: var(--primary-color) !important;
}

/* Navigation links hover */
.nav-link.lnk:hover,
a.lnk:hover {
    color: var(--primary-color) !important;
}
.nav-link.lnk:hover i,
a.lnk:hover i {
    color: var(--primary-color) !important;
}

a.btn-success, a.btn-success.lnk, a.btn-success :hover, a.btn-success {
    color: white !important;
}



/* Ensure outline-danger links (anchor buttons) show white text on hover */
a.btn.btn-outline-danger:hover,
.btn-outline-danger:hover {
    color: white !important;
}

/* Ensure btn-danger links (including btn-lg) have white text always, even on hover */
a.btn.btn-danger,
a.btn.btn-danger:hover,
a.btn.btn-danger:focus,
a.btn.btn-danger:active {
    color: white !important;
    text-decoration: none !important;
}

/* Cards and alerts */
.alert-danger {
    background-color: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary-color);
    color: var(--primary-hover);
}

/* Form controls focus */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25);
}

/* Sidebar active items */
.nav-link.active {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color) !important;
}

/* Links */
a:not(.btn):not(.nav-link) {
    color: var(--primary-color);
}

    a:not(.btn):not(.nav-link):hover {
        color: var(--primary-hover);
    }
/* End template colors to business dashboard */