/* ImpromptuIndian customer app – shared brand palette + light/dark themes */
@import url('custom-alert.css');
@import url('https://impromptuindian.com/css/site-brand-logo.css?v=8');

:root,
[data-theme="light"] {
  --ci-brand: #A52422;
  --ci-brand-dark: #7F3937;
  --ci-brand-hover: #8e1f1d;
  --ci-brand-light: rgba(165, 36, 34, 0.08);
  --ci-brand-mid: rgba(165, 36, 34, 0.14);
  --ci-brand-ring: rgba(165, 36, 34, 0.28);
  --ci-brand-glow: rgba(165, 36, 34, 0.25);
  --ci-accent: #FFCC00;
  --ci-bg: #f9fafb;
  --ci-page-bg: #f9fafb;
  --ci-surface: #f7f6f4;
  --ci-border: #e5e7eb;
  --ci-border-soft: rgba(122, 125, 125, 0.18);
  --ci-text: #111827;
  --ci-text-muted: #6b7280;
  --ci-card-bg: #ffffff;
  --ci-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.05);
  --ci-card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(165, 36, 34, 0.06);
  --ci-sidebar-hover-bg: #ffffff;
  --ci-sidebar-active-bg: rgba(165, 36, 34, 0.08);
  --ci-sidebar-user-name: #111827;
  --ci-sidebar-user-role: #6b7280;
  color-scheme: light;
}

[data-theme="dark"] {
  --ci-brand-light: rgba(165, 36, 34, 0.15);
  --ci-brand-mid: rgba(165, 36, 34, 0.22);
  --ci-brand-ring: rgba(165, 36, 34, 0.35);
  --ci-bg: #0a0a0a;
  --ci-page-bg: #0a0a0a;
  --ci-surface: #111111;
  --ci-border: rgba(255, 255, 255, 0.08);
  --ci-border-soft: rgba(255, 255, 255, 0.08);
  --ci-text: #ffffff;
  --ci-text-muted: rgba(255, 255, 255, 0.55);
  --ci-card-bg: #141414;
  --ci-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 20px rgba(0, 0, 0, 0.25);
  --ci-card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(165, 36, 34, 0.12);
  --ci-sidebar-hover-bg: rgba(255, 255, 255, 0.06);
  --ci-sidebar-active-bg: rgba(165, 36, 34, 0.12);
  --ci-sidebar-user-name: rgba(255, 255, 255, 0.9);
  --ci-sidebar-user-role: rgba(255, 255, 255, 0.4);
  color-scheme: dark;
}
body.page-customer-app {
  background: var(--ci-bg);
  color: var(--ci-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- Sidebar (app shell) ---- */
.ci-sidebar-logo {
  width: 100%;
  justify-content: center;
}

.ci-sidebar-logo .site-brand-logo--sidebar {
  display: flex;
  justify-content: center;
  width: 100%;
}

.ci-sidebar-logo .site-brand-logo__frame {
  height: 3.25rem;
  width: min(13.5rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

.ci-sidebar-logo .site-brand-logo__img {
  left: 50%;
  transform: translateX(-50%) scaleX(1.18);
  transform-origin: center center;
  object-position: center center;
}

.ci-sidebar {
  background: var(--ci-bg);
  border-right: 1px solid var(--ci-border-soft);
  color: var(--ci-brand-dark);
}

.ci-sidebar .sidebar-logo-text {
  color: var(--ci-brand);
  letter-spacing: -0.02em;
}

.ci-sidebar .ci-logo-icon {
  color: var(--ci-brand);
}

.ci-sidebar .menu-item {
  color: var(--ci-text-muted);
  border-radius: 8px;
  border-left: 5px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ci-sidebar .menu-item i,
.ci-sidebar .menu-item svg {
  color: var(--ci-text-muted);
  transition: color 0.15s ease;
}

.ci-sidebar .menu-item > span:not(.nav-count-badge) {
  color: inherit;
  font-weight: 500;
  transition: color 0.15s ease, font-weight 0.15s ease;
}

.ci-sidebar .menu-item:hover:not(.active) {
  background: #ffffff !important;
  color: #000000 !important;
  border-left-color: var(--ci-brand);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.ci-sidebar .menu-item:hover:not(.active) i,
.ci-sidebar .menu-item:hover:not(.active) svg {
  color: var(--ci-brand) !important;
}

.ci-sidebar .menu-item:hover:not(.active) > span:not(.nav-count-badge) {
  color: #000000;
  font-weight: 700;
}

.ci-sidebar .menu-item {
  position: relative;
}

.ci-sidebar .menu-item.active {
  background: var(--ci-brand) !important;
  color: #fff !important;
  border-left-color: var(--ci-brand);
  box-shadow: 0 2px 8px rgba(165, 36, 34, 0.22);
}

.ci-sidebar .menu-item.active i,
.ci-sidebar .menu-item.active svg {
  color: #fff;
}

.ci-sidebar-footer {
  padding: 18px 16px;
  border-top: 1px solid var(--ci-border-soft);
  background: var(--ci-surface);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.ci-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ci-user-info {
  flex: 1;
  min-width: 0;
}

.ci-user-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ci-sidebar-user-name);
  transition: color 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-user-role {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--ci-sidebar-user-role);
}

.ci-user-avatar,
.ci-sidebar-footer #userAvatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ci-brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--ci-brand-glow);
}

.ci-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ci-sidebar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--ci-border-soft);
  background: var(--ci-sidebar-hover-bg);
  color: var(--ci-brand-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

[data-theme="dark"] .ci-sidebar-icon-btn {
  color: rgba(255, 255, 255, 0.7);
}

.ci-sidebar-icon-btn svg {
  width: 18px;
  height: 18px;
  color: inherit;
  stroke: currentColor;
}

.ci-sidebar-icon-btn:hover {
  background: var(--ci-sidebar-active-bg);
  color: var(--ci-brand);
  border-color: var(--ci-brand-ring);
  transform: translateY(-1px);
}

.ci-sidebar-icon-btn--logout:hover {
  color: var(--ci-brand);
}

[data-theme="dark"] .ci-sidebar {
  background: #000;
  border-right-color: var(--ci-border-soft);
}

[data-theme="dark"] .ci-sidebar .menu-item {
  color: rgba(255, 255, 255, 0.65);
}

[data-theme="dark"] .ci-sidebar .menu-item:hover:not(.active) {
  background: #141414 !important;
  color: #ffffff !important;
  border-left-color: var(--ci-brand);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .ci-sidebar .menu-item:hover:not(.active) i,
[data-theme="dark"] .ci-sidebar .menu-item:hover:not(.active) svg {
  color: var(--ci-brand) !important;
}

[data-theme="dark"] .ci-sidebar .menu-item:hover:not(.active) > span:not(.nav-count-badge) {
  color: #ffffff;
  font-weight: 700;
}

[data-theme="dark"] .ci-sidebar .sidebar-logo-text {
  color: var(--ci-brand);
}

[data-theme="dark"] .ci-sidebar .sidebar-logo-text .text-gray-900 {
  color: rgba(255, 255, 255, 0.92);
}

.ci-mobile-toggle {
  background: var(--ci-brand) !important;
  color: #fff !important;
}

.ci-mobile-toggle i,
.ci-mobile-toggle svg {
  color: #fff !important;
}

/* ---- Shared buttons ---- */
.ci-btn-primary,
a.ci-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: var(--ci-brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease, transform 0.15s ease;
}

.ci-btn-primary:hover {
  background: var(--ci-brand-hover);
}

.ci-btn-primary:active {
  transform: translateY(1px);
}

.ci-text-brand {
  color: var(--ci-brand);
}

.ci-text-muted {
  color: var(--ci-text-muted);
}

/* Currency converter footer on light branded pages */
body.page-customer-app .cc-footer {
  border-top-color: var(--ci-border);
}

body.page-customer-app .cc-toggle-btn {
  border: 1px solid var(--ci-border);
  background: #fff;
  color: var(--ci-text);
  box-shadow: var(--ci-card-shadow);
}

body.page-customer-app .cc-toggle-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* Sidebar / hub count badges */
.nav-count-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

body.page-customer-app .nav-count-badge {
  background: var(--ci-brand);
  box-shadow: 0 1px 4px rgba(165, 36, 34, 0.25);
}

.nav-count-badge:not(.hidden) {
  display: inline-flex;
}

.nav-count-badge--cart:not(.hidden) {
  display: flex;
}

/* Location map modal — hidden unless explicitly opened (.map-visible) */
#mapModal {
  z-index: 9999 !important;
}

#mapModal:not(.map-visible) {
  display: none !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

#mapModal.map-visible {
  display: flex !important;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
