/* ==========================================
   BUSINESS BUDDY – FULLY RESPONSIVE THEME
   ========================================== */

:root {
  --primary: #F7931E;        /* Vibrant Orange */
  --secondary: #0074B7;      /* Deep Blue */
  --secondary-light: #5BC0EB;
  --accent: #FFE156;         /* Highlight Yellow */
  --text: #2C2C2C;
  --text-light: #DDDDDD;
  --background: #F9F9F9;
  --dark: #111;
  --light-gray: #E6E6E6;
}

/* --- RESET & BASE --- */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: 'Catamaran', Arial, sans-serif;
  background-color: var(--background);
  color: var(--text);
}

/* Keep footer at bottom */
main {
  flex: 1;
  width: 100%;
  overflow-x: hidden;
}

/* ==========================================
   HEADER
   ========================================== */

.site-header {
  width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
  margin: 0 auto;
  padding: 2% 4%;
}

/* --- Logo & Title --- */
.logo-section {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3%;
}

.logo-img {
  width: 8vw;
  max-width: 100px;
  height: auto;
}

.site-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* --- Navigation Pills --- */
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.main-nav li {
  list-style: none;
}

/* Pill Style */
.main-nav a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px; /* pill shape */
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-weight: 500;
  text-transform: capitalize;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.25);
}

/* Hover */
.main-nav a:hover {
  background: #fff;
  color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Active (optional enhancement) */
.main-nav a:active {
  transform: translateY(0);
  box-shadow: none;
}


/* ==========================================
   SUB NAV – GLASS PILL STYLE
   ========================================== */

.sub-nav {
  width: 100%;
  background: var(--secondary);
  text-align: center;
  padding: 10px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.sub-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.sub-nav li {
  list-style: none;
}

/* Glass Pills */
.sub-nav a {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-weight: 500;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.25);
}

/* Hover */
.sub-nav a:hover {
  background: #fff;
  color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Active */
.sub-nav a:active {
  transform: translateY(0);
  box-shadow: none;
}


/* ==========================================
   MOBILE HEADER & NAVIGATION
   ========================================== */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4%;
  }

  .logo-section {
    justify-content: center;
    width: 100%;
    margin-bottom: 2%;
  }

  .logo-img {
    width: 14vw;
    max-width: 80px;
  }

  .site-title {
    font-size: 1rem;
  }

  .main-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4%;
    row-gap: 10px;
    width: 100%;
  }

  .main-nav li {
    flex: 1 1 auto;
    min-width: 30%;
    text-align: center;
  }

  .main-nav a {
    display: block;
    font-size: 0.85rem;
    padding: 6px 0;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
  }

  .main-nav a:hover {
    background: rgba(255,255,255,0.25);
    color: var(--accent);
  }

  /* Sub-nav wrapping */
  .sub-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4%;
    row-gap: 8px;
    padding: 2% 0;
  }

  .sub-nav a {
    display: block;
    padding: 6px 0;
    font-size: 0.8rem;
  }
}

/* ==========================================
   TABLE STYLING – RESPONSIVE CENTERED
   ========================================== */

.page-section {
  width: 100%;
  overflow-x: auto;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 2% 3%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.data-table th, .data-table td {
  padding: 1em 0.5em;
  text-align: center;
  border-bottom: 1px solid var(--light-gray);
  font-size: clamp(0.8rem, 2vw, 1rem);
}

.data-table th {
  background: var(--secondary);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
}

/* Fix hover color readability */
.data-table tr:nth-child(even) {
  background-color: #f3f8fc;
}

.data-table tr:hover {
  background-color: var(--primary);
  color: #fff;
  transition: background 0.3s ease;
}

/* --- Mobile: Stack Table Columns --- */
@media (max-width: 768px) {
  .data-table, .data-table thead, .data-table tbody, .data-table th, .data-table td, .data-table tr {
    display: block;
    width: 100%;
  }

  .data-table tr {
    margin-bottom: 10px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    padding: 1%;
    background: #fff;
  }

  .data-table th {
    display: none;
  }

  .data-table td {
    text-align: left;
    padding: 3% 5%;
    position: relative;
  }

  .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
    color: var(--secondary);
  }
}

/* ==========================================
   VIDEO BANNER
   ========================================== */
.video-banner {
  background: var(--accent);
  text-align: center;
  padding: 1%;
  font-weight: 600;
}

.video-banner a {
  color: var(--dark);
}

/* ==========================================
   FOOTER – STICKY & CLEAN
   ========================================== */

footer {
  background: var(--secondary);
  color: #fff;
  padding: 2% 2%;
  text-align: center;
  width: 100%;
  margin-top: auto;
}

footer .footer-content {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin-top: 10px;
  padding: 0;
}

.footer-nav a {
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.footer-nav a:hover {
  color: var(--accent);
}

/* ==========================================
   FOOTER SOCIAL ICONS
   ========================================== */

.footer-social {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 12px 0 6px;
}

.social-icon {
  width: 34px;
  height: 34px;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* --- Facebook --- */
.social-icon.facebook {
  background-image: url('../img/uploads/facebook-reg.png');
}

.social-icon.facebook:hover {
  background-image: url('../img/uploads/facebook-hover.png');
  transform: scale(1.08);
}

.social-icon.facebook:active {
  background-image: url('../img/uploads/facebook-clicked.png');
}

/* --- Instagram --- */
.social-icon.instagram {
  background-image: url('../img/uploads/instagram-reg.png');
}

.social-icon.instagram:hover {
  background-image: url('../img/uploads/instagram-hover.png');
  transform: scale(1.08);
}

.social-icon.instagram:active {
  background-image: url('../img/uploads/instagram-clicked.png');
}

/* Slight opacity for subtlety */
.social-icon {
  opacity: 0.9;
}

.social-icon:hover {
  opacity: 1;
}


/* ==========================================
   SEARCH BAR STYLING
   ========================================== */

.search-container {
  text-align: center;
  margin: 1.5% 0 2%;
}

#itemSearch {
  width: 60%;
  max-width: 400px;
  padding: 10px 15px;
  border: 2px solid var(--secondary);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

#itemSearch:focus {
  border-color: var(--primary);
  box-shadow: 0 0 5px rgba(247, 147, 30, 0.4);
}

@media (max-width: 768px) {
  #itemSearch {
    width: 85%;
    font-size: 0.9rem;
    padding: 8px 10px;
  }
}

/* ==========================================
   HEADINGS
   ========================================== */

h2, h3, h4 {
  font-family: 'Catamaran', sans-serif;
  color: var(--secondary);
}

h2 {
  font-size: 1.8rem;
  text-align: center;
  font-weight: 700;
  margin: 2% 0;
}

h3 {
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 1%;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* --- Button Styles --- */
.btn-primary,
.btn-save,
.btn-remove,
.btn-edit,
.btn-invite {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

/* Core Button Colors */
.btn-primary, .btn-save { background: var(--primary); color: #fff; }
.btn-remove { background: #b3261e; color: #fff; }
.btn-edit { background: var(--secondary); color: #fff; }
.btn-invite { background: var(--accent); color: var(--dark); }

.btn-primary:hover,
.btn-save:hover,
.btn-remove:hover,
.btn-edit:hover,
.btn-invite:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

/* Center Add Employee Link */
.center-link {
  text-align: center;
  margin: 2% 0;
}

/* ==========================================
   FORM STYLING – MODERN DASHBOARD LOOK
   ========================================== */
.form-modern {
  background: #fff;
  border-radius: 8px;
  padding: 2%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  max-width: 900px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em 2em;
  margin-bottom: 1em;
}

.form-grid label {
  font-weight: 600;
  color: var(--secondary);
  display: block;
}

.form-grid input,
.form-grid select {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--light-gray);
  font-size: 1rem;
  outline: none;
  transition: 0.3s;
}

.form-grid input:focus,
.form-grid select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 4px rgba(247,147,30,0.4);
}

.cert-section {
  text-align: center;
  margin: 1.5em 0;
}

.cert-img {
  max-width: 250px;
  border-radius: 6px;
  margin-bottom: 1em;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* Responsive form layout */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   PRINT VISIBILITY HELPERS
   ========================================== */

/* Elements visible only on screen */
.screen-only {
  display: block !important;
}

/* Elements visible only in print */
.print-only {
  display: none !important;
}

/* When printing, reverse visibility */
@media print {
  .screen-only {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  body, html {
    background: #fff !important;
    color: #000 !important;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
  }

  table {
    page-break-inside: avoid;
  }

  thead {
    display: table-header-group;
  }

  tfoot {
    display: table-footer-group;
  }

  @page {
    margin: 0.5in;
  }
}

/* ==========================================
   BUSINESS BUDDY – BUTTONS + INVENTORY HELPERS
   ========================================== */

/* General Button */
.bb-btn {
    background: var(--primary);
    padding: 10px 20px;
    border-radius: 8px;
    color: #fff !important;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.bb-btn:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

/* Small Button Variant */
.bb-small-btn {
    padding: 6px 14px;
    font-size: 0.9rem;
}

/* Container */
.bb-container {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Table Styling */
.bb-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #fff;
}

.bb-table th {
    background: var(--secondary);
    color: #fff;
    padding: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.bb-table td {
    border: 1px solid var(--light-gray);
    text-align: center;
    padding: 8px;
}

/* Status labels */
.inv-empty {
    color: #0a0;
    font-weight: bold;
}

.inv-not-empty {
    color: #d00;
    font-weight: bold;
}

/* ==========================================
   INVENTORY — LOCATION PAGE STYLING
   ========================================== */

.locations-container {
    max-width: 900px;
    margin: 40px auto;
    background: var(--card-bg, #fff);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow, 0 2px 8px rgba(0,0,0,0.12));
}

.locations-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--secondary);
    margin-bottom: 20px;
    font-weight: 700;
}

.location-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg, #fff);
}

.location-table th,
.location-table td {
    border: 1px solid var(--border, #ccc);
    padding: 12px;
    text-align: center;
    font-size: 1rem;
}

.location-table tr:nth-child(even) {
    background: var(--table-alt, #f3f8fc);
}

.location-table tr:hover {
    background: var(--hover, rgba(0,0,0,0.05));
}

.location-btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary);
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: 0.2s ease;
}

.location-btn:hover {
    opacity: 0.85;
}

.location-name {
    font-weight: 600;
    color: var(--secondary);
}

/* ==========================================================
   INVENTORY ROW PAGE
   ========================================================== */

.bb-center {
    text-align: center;
    margin: 20px auto;
}

.bb-img {
    width: 30%;
    max-width: 260px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.bb-status-success {
    color: #0a0;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.bb-table-inventory {
    width: 90%;
    margin: 20px auto;
    border-collapse: collapse;
    background: #fff;
    box-shadow: var(--shadow);
}

.bb-table-inventory th,
.bb-table-inventory td {
    border: 1px solid var(--light-gray);
    padding: 10px;
    text-align: center;
}

.bb-table-inventory th {
    background: var(--secondary);
    color: #fff;
    font-weight: 600;
}

.bb-nav-btn {
    width: 45%;
    display: inline-block;
    padding: 14px;
    border-radius: 8px;
    font-size: 1.1rem;
    text-decoration: none;
    font-weight: 600;
    color: #fff !important;
}

.bb-nav-prev {
    background: #AF7F7F;
    color: #000 !important;
}

.bb-nav-next {
    background: #799E67;
    color: #000 !important;
}

.bb-nav-change {
    background: #FF0004;
    width: 80%;
    margin: 20px auto;
    color: #fff !important;
    display: block;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2rem;
}

.bb-form-btn {
    padding: 12px 22px;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    margin-top: 15px;
}

.bb-form-btn:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

/* ==========================================================
   BARCODE SCANNER (Quagga.js)
   ========================================================== */

#scanner-container {
    text-align: center;
    margin-top: 20px;
}

#interactive.viewport {
    width: 80%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

#result {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 15px;
    color: var(--secondary);
}

#upc-code {
    color: var(--primary);
    font-weight: 700;
}

/* ==========================================================
   CASHOUT REPORT LAYOUT + RESPONSIVE + PRINT-FRIENDLY
   ========================================================== */

/* Centered container */
.print-area {
    width: 100%;
    max-width: 1000px;   /* Give it more room to breathe */
    margin: 0 auto;
    padding: 20px;
}

/* Let tables scroll instead of squish */
.print-area table {
    width: 100%;
    border-collapse: collapse;
}

/* Better spacing for readability */
.print-area th,
.print-area td {
    padding: 10px 6px;
    word-wrap: normal;
    white-space: nowrap;   /* Keep rows readable */
}

/* Wrap table in scrollable div on small screens */
.print-scroll {
    width: 100%;
    overflow-x: auto;
}

/* Print Mode */
@media print {

    /* Hide everything except print area AND background */
    body *:not(.background-image):not(.background-image *):not(.print-area):not(.print-area *) {
        visibility: hidden !important;
    }

    /* Background image */
    .background-image {
        visibility: visible !important;
        display: block !important;
        position: fixed;
        inset: 0;
        z-index: -1;
    }

    /* Keep print content visible */
    .print-area,
    .print-area * {
        visibility: visible !important;
    }

    /* Fit 100% on printed page */
    .print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0;
    }

    /* Reduce font slightly instead of compressing layout */
    .print-area table {
        font-size: 0.9rem;
        white-space: normal !important;
    }

    /* Hide all no-print buttons */
    .no-print {
        display: none !important;
    }

    /* Remove scrollbars in print */
    .print-scroll {
        overflow: visible !important;
    }
}


.bb-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.bb-card-title {
    font-size: 1.3rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.bb-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bb-field {
    font-size: 0.95rem;
}

.pairing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.pairing-tag {
    background: var(--secondary-light);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* --- Centered Card Stack Layout --- */
.card-stack-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* centers all cards horizontally */
    margin-top: 20px;
}

.bb-card {
    width: 100%;
    max-width: 700px;
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
    text-align: center; /* centers text/content */
}

.bb-card h3 {
    margin-top: 0;
    color: var(--secondary);
    font-size: 1.4rem;
    text-align: center;
}

.bb-card .field-label {
    font-weight: 600;
    color: var(--secondary);
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
    text-align: center;
}

.bb-card input[type="text"],
.bb-card textarea,
.bb-card select {
    width: 90%;
    max-width: 450px;
    margin: 0 auto;
    padding: 10px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid var(--light-gray);
    display: block;
}

.bb-slider-wrapper {
    width: 80%;
    max-width: 400px;
    margin: 0 auto;
}

.bb-slider-output {
    font-weight: bold;
    display: block;
    margin-top: 5px;
}

.center-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.center-actions .btn {
    min-width: 160px;
}

/* --- Buddy Button Variants --- */
.bb-btn-secondary {
    background: var(--secondary);
}

.bb-btn-warning {
    background: var(--accent);
    color: var(--dark) !important;
}

.bb-btn-print {
    background: var(--secondary-light);
}

.bb-btn-secondary:hover,
.bb-btn-warning:hover,
.bb-btn-print:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

.bb-action-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.bb-action-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-left: 6px solid var(--primary);
    transition: all 0.2s ease;
}

.bb-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.bb-action-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    flex-shrink: 0;
}

.bb-action-text {
    text-align: left;
}

.bb-action-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 4px;
}

.bb-action-desc {
    font-size: 0.9rem;
    color: #666;
}

.bb-btn-disabled-danger {
    background: #b3261e !important;
    color: #fff;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.7;
}

