/* 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.woff2') format('woff2'),
       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: #c04c42 !important;
}

.text-danger {
    color: #c04c42 !important;
}

.form-check-input:checked {
    background-color: #c04c42;
    border-color: #c04c42;
}

.btn-outline-danger {
    color: #c04c42 !important;
    border-color: #c04c42 !important;
}

.btn-outline-danger:hover {
    background-color: #c04c42 !important;
    color: white !important;
    border-color: #c04c42 !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;
    }
}

/* 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 #c04c42 */
/* 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: #c04c42 !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: #c04c42 !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;
}