/* =========================================
   FRIZBY DARK THEME (Bootstrap-safe)
   Load this AFTER Bootstrap to override its styles!
========================================= */

/* === CSS Variables === */
:root {
  --ufo-green: #00ff7f;
  --ufo-green-600: #00cc66;
  --ufo-bg: #0b0f17;
  --ufo-panel: #101620;
  --ufo-panel-2: #0f1620;
  --ufo-border: rgba(255, 255, 255, 0.10);
  --ufo-text: #f5f8ff;
  --ufo-muted: #d0dbed;
  --ufo-font-family: "Segoe UI", Tahoma, sans-serif;
}

/* === Global Overrides === */
html, body {
  height: 100%;
  background: var(--ufo-bg);
  color: var(--ufo-text);
  font-family: var(--ufo-font-family) !important; /* Centralized font variable */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Force font-family across all Bootstrap components */
[class*="btn"],
[class*="form"],
[class*="nav"],
[class*="dropdown"],
[class*="alert"],
[class*="badge"],
[class*="modal"],
[class*="table"],
h1, h2, h3, h4, h5, h6,
p, strong, b {
  font-family: var(--ufo-font-family) !important;
}

/* === Typographic Fixes === */
a {
  color: var(--ufo-green-600);
  transition: color 0.2s;
}
a:hover {
  color: var(--ufo-green);
}

.text-muted,
.small,
.form-text {
  color: var(--ufo-muted);
  opacity: 1;
}

/* === Scrollbars (WebKit only) === */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* === Sidebar & Toggle === */
#sidebarToggle {
  font-size: 28px;
  cursor: pointer;
  padding: 8px 12px;
  background: var(--ufo-panel-2);
  color: var(--ufo-green);
  position: fixed;
  top: 15px;
  left: 15px;
  border-radius: 50%;
  z-index: 2001;
  box-shadow: 0 0 10px var(--ufo-green);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
#sidebarToggle:hover {
  transform: rotate(20deg) scale(1.06);
  box-shadow: 0 0 18px var(--ufo-green);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--ufo-panel), var(--ufo-panel-2));
  border-right: 1px solid var(--ufo-border);
  transition: width 0.35s ease;
  z-index: 2000;
  padding-top: 64px;
}
.sidebar.open {
  width: 260px;
}
.sidebar h2 {
  color: var(--ufo-green);
  padding: 0 20px 12px;
  margin: 0;
  font-size: 18px;
}
.sidebar a {
  display: block;
  padding: 12px 20px;
  font-size: 16px;
  color: var(--ufo-text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.2s, padding-left 0.2s;
}
.sidebar a:hover {
  background: rgba(0, 255, 127, 0.08);
  color: #fff;
  padding-left: 28px;
}
.sidebar .closebtn {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  opacity: 0.8;
}
.sidebar .closebtn:hover {
  opacity: 1;
}

@media (min-width: 992px) {
  body.sidebar-open .container,
  body.sidebar-open .container-fluid {
    margin-left: 280px;
    transition: margin 0.35s ease;
  }
}
@media (max-width: 991px) {
  .sidebar.open {
    width: 100vw;
  }
}

/* === Cards / Panels === */
.card,
.accordion-item {
  background: var(--ufo-panel);
  color: var(--ufo-text);
  border: 1px solid var(--ufo-border);
  border-radius: 14px;
}
.card {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}
.card-title {
  color: var(--ufo-green);
}

/* === Accordion === */
.accordion-button {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  color: var(--ufo-text);
}
.accordion-button:not(.collapsed) {
  color: var(--ufo-green);
  box-shadow: inset 0 -1px 0 var(--ufo-border);
}
.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(0, 255, 127, 0.15);
}
.accordion-body {
  background: var(--ufo-panel);
}

/* === Tables === */
.table {
  background: var(--ufo-panel);
  color: var(--ufo-text);
  border: 1px solid var(--ufo-border);
  border-radius: 12px;
  overflow: hidden;
  --bs-table-bg: var(--ufo-panel);
  --bs-table-color: var(--ufo-text);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
  --bs-table-hover-bg: rgba(0, 255, 127, 0.06);
}
.table th,
.table thead th {
  color: #cfe2ff;
  font-weight: 600;
  border-bottom: 1px solid var(--ufo-border);
}
.table td,
.table th {
  border-color: var(--ufo-border);
}
.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}
.table-hover > tbody > tr:hover {
  background-color: rgba(0, 255, 127, 0.08);
}

/* === Forms === */
.form-control,
.input-group-text,
textarea,
select {
  background: #122033;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.form-control:focus {
  border-color: var(--ufo-green);
  box-shadow: 0 0 0 0.2rem rgba(0, 255, 127, 0.12);
}
.form-control::placeholder {
  color: #c2cfe4;
  opacity: 1;
}
label,
.form-label {
  color: var(--ufo-text);
}

/* === Buttons === */
.btn-primary {
  background: linear-gradient(135deg, #00ff7f, #00a8ff);
  border: none;
  color: #061018;
  font-weight: 700;
}
.btn-primary:hover {
  filter: brightness(1.05);
}
.btn-outline-light {
  color: var(--ufo-text);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* === Badges === */
.badge.bg-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--ufo-text);
}
.badge.text-bg-info {
  background: rgba(0, 255, 127, 0.3);
  color: #fff;
}

/* === Modals === */
.modal-content {
  background: var(--ufo-panel-2);
  color: var(--ufo-text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
}
.modal-header,
.modal-footer {
  border-color: rgba(255, 255, 255, 0.18);
}
.modal-title {
  color: var(--ufo-green);
}

/* === Receipt Component === */
.receipt {
  background: #0f1620;
  color: var(--ufo-text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 1rem;
}
.receipt .list-group-item {
  background: transparent;
  border: none;
  color: var(--ufo-text);
}
.receipt .line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.receipt .line span {
  color: var(--ufo-text);
}

/* === Menu / Order Styling === */
.menu-item,
.menu-title {
  color: #ffffff;
}
.menu-price {
  color: #b7ffe0;
  font-weight: 600;
}
.menu-ingredients {
  color: #d7e6ff;
  font-size: 0.97rem;
}
.friz-order-card {
  background: #1a1f2b;
  color: #f1f1f1;
  border-radius: 0.75rem;
  box-shadow: 0 0 6px rgba(0, 255, 127, 0.2);
}
.friz-order-card .friz-link {
  color: var(--ufo-green);
  text-decoration: none;
}
.friz-order-card .friz-link:hover {
  text-decoration: underline;
}
.orders-page {
  background: var(--ufo-bg);
  color: var(--ufo-text);
  font-family: var(--ufo-font-family);
  min-height: 100vh;
  padding: 1rem;
}
.orders-page .friz-card {
  background: #1a2234;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}
.orders-page .friz-card h5 {
  color: var(--ufo-green);
}
.orders-page .friz-meta {
  font-size: 0.9rem;
  color: #cfd8dc;
}

/* === Cart Button === */
.cart-btn {
  background: linear-gradient(135deg, #66bb6a, #388e3c);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}
.cart-btn:hover {
   display: inline-block;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #4CAF50, #2e7d32);
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  
}
.cart-btn:active {
  transform: scale(0.96);
}

/* === Print Overrides === */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .modal,
  .modal-backdrop {
    all: unset;
  }
  .receipt {
    background: #fff;
    color: #000;
    border: 1px solid #000;
  }
  .btn,
  nav,
  header,
  footer {
    display: none;
  }
}

/* === Frizby Theme Scope === */
.frizby-theme {
  font-family: var(--ufo-font-family);
  background: var(--ufo-bg);
  color: var(--ufo-text);
}
.frizby-theme p,
.frizby-theme h1,
.frizby-theme h2,
.frizby-theme h3,
.frizby-theme td,
.frizby-theme th,
.frizby-theme .modal-content,
.frizby-theme .form-control,
.frizby-theme .table,
.frizby-theme .text-muted {
  color: var(--ufo-text);
  font-family: var(--ufo-font-family);
  background: transparent;
}
.frizby-theme .table {
  background: var(--ufo-panel);
}
.frizby-theme .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}
.frizby-theme .btn-primary {
  background: linear-gradient(135deg, #00ff7f, #00a8ff);
  border: none;
  color: #061018;
  font-weight: 700;
}
.frizby-theme .modal-content {
  background: var(--ufo-panel-2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ufo-text);
}

/* === SIDEBAR LINK STYLING (Retro Space Theme) === */
.sidebar-link {
  display: block;
  margin: 12px 16px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ufo-text);
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(0, 255, 127, 0.25);
  border-radius: 8px;
  box-shadow: 0 0 4px rgba(0, 255, 127, 0.2);
  transition: all 0.25s ease;
  position: relative;
}

/* Retro border ring hover */
.sidebar-link:hover {
  background: rgba(0, 255, 127, 0.08);
  color: #fff;
  border-color: #00ffff; /* Blue outer ring */
  box-shadow:
    0 0 0 2px #00ffff,
    0 0 12px rgba(0, 255, 127, 0.6),
    0 0 20px rgba(0, 255, 127, 0.4);
  transform: translateX(4px);
}

/* Optional: Add icon glow on hover */
.sidebar-link:hover span,
.sidebar-link:hover::before {
  text-shadow: 0 0 6px #00ff7f;
}

/* Optional spacing between link sections */
.sidebar hr {
  margin: 1rem 16px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
/* Galactic Alert Banner */
.galactic-alert {
  position: relative;
  margin: 20px auto;
  padding: 15px 20px;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  color: #ffdf5c;
  background: rgba(20,20,20,0.95);
  border: 2px solid #ffdf5c;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255,223,92,0.6), 0 0 40px rgba(255,223,92,0.3);
  text-shadow: 0 0 8px #ffdf5c;
  overflow: hidden;
}

/* glowing pulse */
.galactic-alert {
  animation: pulseGlow 2s infinite alternate;
}
@keyframes pulseGlow {
  0%   { box-shadow: 0 0 10px rgba(255,223,92,0.5); }
  100% { box-shadow: 0 0 25px rgba(255,223,92,1); }
}

/* subtle scanline effect */
.galactic-alert::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.05) 0px,
    rgba(255,255,255,0.05) 2px,
    transparent 2px,
    transparent 4px
  );
  animation: scanScroll 3s linear infinite;
  pointer-events: none;
}
@keyframes scanScroll {
  0% { background-position: 0 0; }
  100% { background-position: 0 20px; }
}
