/* css/custom.css */
/* Mobile Responsive & Clean Layout Rules */
html, body {
  overflow-x: clip;
  max-width: 100%;
}

/* Sticky Cart Sidebar */
#cart-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 125px;
  align-self: flex-start;
}

/* Glass panel background */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04);
}

/* Glow Cards hover animations */
.glow-card {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.glow-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -15px rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
}

/* Glowing buttons (Purple/Indigo Theme) */
.glow-button {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  box-shadow: 0 4px 18px 0 rgba(124, 58, 237, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(124, 58, 237, 0.45);
  opacity: 0.95;
}

/* Secondary Button (Pink/Magenta accent) */
.accent-button {
  background: linear-gradient(135deg, #ec4899 0%, #d946ef 100%);
  box-shadow: 0 4px 18px 0 rgba(236, 72, 153, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accent-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(236, 72, 153, 0.45);
  opacity: 0.95;
}

/* Indigo buttons for super admin theme */
.indigo-glow-button {
  background: linear-gradient(135deg, #6610f2 0%, #e83e8c 100%);
  box-shadow: 0 4px 18px 0 rgba(102, 16, 242, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.indigo-glow-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(102, 16, 242, 0.45);
  opacity: 0.95;
}

/* Brand gradient text */
.brand-text-gradient {
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Custom fade animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom pulsing glow */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.9; }
}

.animate-pulse-glow {
  animation: pulseGlow 3s infinite ease-in-out;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #2E134E;
}
::-webkit-scrollbar-thumb {
  background: #7c3aed;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a855f7;
}

/* Floating Sidebar styles */
.floating-sidebar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(46,19,78,0.85);
  padding: 12px 8px;
  border-radius: 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(124,58,237,0.4);
  backdrop-filter: blur(12px);
}
.floating-sidebar.left {
  left: 15px;
}
.floating-sidebar.right {
  right: 15px;
}
.floating-sidebar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all 0.2s ease-in-out;
}
.floating-sidebar-icon:hover {
  transform: scale(1.1);
}

/* Auto hide placeholder on focus globally across the entire project */
input:focus::placeholder,
textarea:focus::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

/* ════════════════════════════════════════════════════════
   INVOICE STYLING (CLEAN WHITE BACKGROUND & BLACK FONT & TABLE BORDERS)
   ════════════════════════════════════════════════════════ */
.inv-card {
  background: #ffffff;
  overflow: visible !important;
  border: 1px solid #000000 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #000000;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Tamil", "Mukta Malar", Arial, sans-serif;
}
.inv-head {
  background: #ffffff;
  color: #000000;
  padding: 16px 22px 14px;
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 16px;
  position: relative;
  border-bottom: 1px solid #000000;
}
.inv-head .co-name {
  font-size: 20px; font-weight: 900;
  letter-spacing: -.02em; margin: 0 0 3px; line-height: 1.1;
  color: #000000;
}
.inv-head .co-sub {
  font-size: 10.5px; font-weight: 800; color: #1e293b;
  text-transform: uppercase; letter-spacing: .08em;
}
.inv-head .co-detail {
  margin-top: 6px; font-size: 10.5px; color: #1e293b; line-height: 1.5; font-weight: 600;
}
.inv-head .co-detail strong {
  color: #000000;
}
.inv-meta { text-align: right; }
.inv-meta .inv-id {
  font-size: 18px; font-weight: 900;
  font-family: monospace; line-height: 1.1;
  color: #000000;
}
.inv-meta .inv-date { font-size: 10.5px; color: #1e293b; margin-top: 4px; font-weight: 600; }
.inv-meta .inv-badge {
  display: inline-block; margin-top: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  background: #ffffff;
  border: 1px solid #000000;
  color: #000000;
}

/* Status row */
.inv-status-row {
  display: flex; gap: 8px;
  padding: 8px 22px;
  background: #f8fafc;
  border-bottom: 1px solid #000000;
  flex-wrap: wrap; align-items: center;
}
.schip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em;
  border: 1px solid #000000;
  background: #ffffff;
  color: #000000;
}
.schip-purple { background:#ffffff; color:#000000; border-color:#000000; }
.schip-mid    { background:#ffffff; color:#000000; border-color:#000000; }
.schip-light  { background:#ffffff; color:#000000; border-color:#000000; }
.schip-dot { width:5px;height:5px;border-radius:50%;background:#000000;flex-shrink:0; }

/* Parties */
.inv-parties {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  border-bottom: 1px solid #000000;
}
.inv-party { padding: 12px 22px; }
.inv-party:first-child { border-right: 1px solid #000000 !important; }
.inv-party-lbl {
  font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: #000000; margin-bottom: 4px;
}
.inv-party-name {
  font-size: 14px; font-weight: 900; color: #000000; margin-bottom: 3px;
}
.inv-party-detail {
  font-size: 10.5px; color: #1e293b; font-weight: 600; line-height: 1.5;
}
.inv-party-detail span { color: #000000; font-weight: 700; }

/* Items table */
.inv-tbl-wrap { padding: 12px 22px; }
.inv-tbl-wrap h4 {
  font-size: 10.5px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .08em;
  color: #000000; margin: 0 0 8px;
}
table.inv-tbl {
  width: 100%; border-collapse: collapse !important; font-size: 11px;
  border: 1px solid #000000 !important;
}
table.inv-tbl thead tr {
  background: #f8fafc;
  color: #000000;
}
table.inv-tbl th {
  padding: 6px 8px;
  font-size: 9.5px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap;
  color: #000000;
  background: #f8fafc;
  border: 1px solid #000000 !important;
}
table.inv-tbl tbody tr:nth-child(even) { background: #fafafa; }
table.inv-tbl tbody tr:hover { background: #f1f5f9; }
table.inv-tbl td {
  padding: 6px 8px;
  border: 1px solid #000000 !important;
  color: #000000; font-weight: 600;
}
table.inv-tbl td.num    { text-align: right; font-family: monospace; color: #000000; font-weight: 700; }
table.inv-tbl td.center { text-align: center; color: #000000; font-weight: 700; }
table.inv-tbl td.name   { font-weight: 700; color: #000000; }
.strike { text-decoration: line-through; color: #64748b; font-size: 10.5px; }
.disc-pct { color: #000000; font-weight: 800; }

.inv-tbl-wrap {
  page-break-inside: auto !important;
  break-inside: auto !important;
}

table.inv-tbl {
  page-break-inside: auto !important;
  break-inside: auto !important;
}

.inv-head, .inv-parties, .inv-footer-grid, .inv-strip, table.inv-tbl tr {
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}

.inv-footer-grid {
  display: grid; grid-template-columns: 1.15fr 1fr;
  border-top: 1px solid #000000;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}
.inv-notes {
  padding: 12px 22px;
  border-right: 1px solid #000000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.inv-notes h5 {
  font-size: 10px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .08em;
  color: #000000;
  margin: 0 0 6px;
}
.inv-notes-text {
  font-size: 10px; color: #1e293b; line-height: 1.6; font-weight: 600;
}

.inv-totals { padding: 12px 22px; }
.trow {
  display: flex; justify-content: space-between;
  align-items: center; font-size: 11px;
  padding: 3px 0; color: #1e293b; font-weight: 600;
}
.trow .tv { font-family: monospace; font-weight: 800; color: #000000; }
.trow.savings .tv { color: #000000; font-weight: 900; }
.trow.grand {
  margin-top: 8px; padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 6px; color: #000000;
  font-size: 12px; font-weight: 900;
}
.trow.grand .tv { color: #000000; font-size: 15px; font-weight: 900; }

/* Footer strip */
.inv-strip {
  background: #ffffff;
  color: #000000;
  border-top: 1px solid #000000;
  padding: 8px 22px;
  font-size: 9.5px; font-weight: 700;
  display: flex; justify-content: space-between;
  align-items: center;
}
.inv-strip .note { font-style: italic; color: #000000; font-size: 9px; }
.inv-strip .seal, .inv-strip .ref { font-family: monospace; color: #000000; font-size: 9px; }

/* Off-screen wrapper for rendering printable invoices and PDF generation */
.print-area-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 794px;
  max-width: 794px;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: -9999;
}
.print-area-container {
  width: 794px;
  max-width: 794px;
  background: #ffffff;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* Page margin setup for clean A4 multi-page document pagination */
@page {
  size: A4 portrait;
  margin: 5mm 5mm;
}

/* Force clean white background, black fonts, table borders, and multi-page flow in print view */
@media print {
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    background: #ffffff !important;
    color: #000000 !important;
    display: block !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Reset all flex/height/overflow constraints from layout containers */
  body,
  body > div,
  body > div > div,
  .flex-grow,
  .flex-1,
  div[class*="min-h-screen"],
  div[class*="h-screen"],
  div[class*="overflow-y-auto"],
  div[class*="overflow-x-auto"],
  main {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    position: static !important;
  }

  header, footer, .floating-sidebar, .print\:hidden, select, input, button, #site-top-fixed, #header-spacer, aside, #mobile-menu, #mobile-sticky-checkout-bar, #mobile-cart-modal, #video-player-modal, #image-lightbox, #global-image-lightbox, .ac-sidebar, .ac-banner, .cc-head, .tbl-wrap, .tr-chips, .empty-state, .otbl, .site-footer, #whatsapp-sticky, #call-sticky {
    display: none !important;
  }

  /* Show only print areas */
  .print-area-wrapper {
    position: static !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: auto !important;
    pointer-events: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }
  .print-area-container {
    position: static !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: auto !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: #ffffff !important;
    height: auto !important;
    overflow: visible !important;
  }
  .inv-card {
    border: 1.5px solid #000000 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    background: #ffffff !important;
    color: #000000 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
    box-sizing: border-box !important;
  }
  .inv-head {
    background: #ffffff !important;
    color: #000000 !important;
    border-bottom: 1px solid #000000 !important;
    padding: 12px 16px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .inv-head .co-name,
  .inv-head .co-sub,
  .inv-head .co-detail,
  .inv-head .co-detail strong,
  .inv-meta .inv-id,
  .inv-meta .inv-date {
    color: #000000 !important;
  }
  .inv-meta .inv-badge {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
  .inv-status-row {
    background: #ffffff !important;
    border-bottom: 1px solid #000000 !important;
    padding: 8px 16px !important;
  }
  .schip {
    border: 1px solid #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }
  .inv-parties {
    border-bottom: 1px solid #000000 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .inv-party {
    padding: 10px 16px !important;
  }
  .inv-party:first-child {
    border-right: 1px solid #000000 !important;
  }
  .inv-party-lbl, .inv-party-name, .inv-party-detail, .inv-party-detail span {
    color: #000000 !important;
  }
  .inv-tbl-wrap {
    padding: 10px 16px !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
    overflow: visible !important;
  }
  .inv-tbl-wrap h4 {
    color: #000000 !important;
  }
  table.inv-tbl {
    border: 1px solid #000000 !important;
    border-collapse: collapse !important;
    width: 100% !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }
  table.inv-tbl thead {
    display: table-header-group !important;
  }
  table.inv-tbl thead tr {
    background: #f8fafc !important;
  }
  table.inv-tbl th {
    color: #000000 !important;
    background: #f8fafc !important;
    border: 1px solid #000000 !important;
    padding: 6px 8px !important;
  }
  table.inv-tbl tbody tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  table.inv-tbl td {
    color: #000000 !important;
    border: 1px solid #000000 !important;
    padding: 6px 8px !important;
  }
  table.inv-tbl td.name, table.inv-tbl td.num, table.inv-tbl td.center {
    color: #000000 !important;
  }
  .disc-pct {
    color: #000000 !important;
  }
  .strike {
    color: #64748b !important;
  }
  .inv-footer-grid {
    border-top: 1px solid #000000 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .inv-notes {
    border-right: 1px solid #000000 !important;
    padding: 10px 16px !important;
  }
  .inv-notes h5, .inv-notes-text {
    color: #000000 !important;
  }
  .inv-totals {
    padding: 10px 16px !important;
  }
  .trow, .trow .tv, .trow.savings .tv {
    color: #000000 !important;
  }
  .trow.grand {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
    padding: 8px 12px !important;
  }
  .trow.grand .tv {
    color: #000000 !important;
  }
  .inv-strip {
    background: #ffffff !important;
    border-top: 1px solid #000000 !important;
    color: #000000 !important;
    padding: 6px 16px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .inv-strip .note,
  .inv-strip .seal,
  .inv-strip .ref {
    color: #000000 !important;
  }
  .inv-card * {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }
}



