/* =========================================================
   نوار بالا، فوتر، مودال و شِل اصلی برنامه
   منبع: TopNavbar.tsx, Footer.tsx, App.tsx
   ========================================================= */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f1f5f9;
  font-family: var(--font-vazir);
}

.top-navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.top-navbar-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 12px;
}

@media (min-width: 640px) { .top-navbar-inner { padding: 0 16px; } }
@media (min-width: 1024px) { .top-navbar-inner { padding: 0 24px; } }

.top-navbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
@media (min-width: 768px) { .top-navbar-row { height: 64px; } }

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(to top right, #2563eb, #4f46e5, #9333ea);
  padding: 2px;
  box-shadow: 0 1px 2px rgba(37,99,235,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark-inner {
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}

.nav-drop-btn {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #334155;
  transition: 0.15s ease;
}
.nav-drop-btn:hover { background: #f1f5f9; color: #0f172a; }
.nav-drop-btn.is-open-blue { background: #2563eb; color: #fff; }
.nav-drop-btn.is-open-purple { background: #9333ea; color: #fff; }
.nav-drop-btn.is-open-teal { background: #0d9488; color: #fff; }
.nav-drop-btn.is-open-rose { background: #e11d48; color: #fff; }

.nav-dropdown {
  position: absolute;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15,23,42,0.14);
  border: 1px solid #e2e8f0;
  padding: 6px;
  z-index: 50;
}
.nav-dropdown.w-64 { width: 16rem; }
.nav-dropdown.w-72 { width: 18rem; }
.nav-dropdown.align-left { right: auto; left: 0; }

.nav-item {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  border: 0;
  background: transparent;
  color: #1e293b;
  cursor: pointer;
}
.nav-item:hover { background: #eff6ff; color: #1d4ed8; }

.icon-chip {
  padding: 6px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-main {
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 12px;
}
@media (min-width: 640px) { .app-main { padding: 16px; } }
@media (min-width: 1024px) { .app-main { padding: 24px; } }

.sticky-shortcuts {
  position: sticky;
  top: 56px;
  z-index: 30;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(226,232,240,0.9);
  box-shadow: 0 4px 12px rgba(15,23,42,0.06);
}
@media (min-width: 768px) { .sticky-shortcuts { top: 64px; } }

.chip-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.15s ease;
  background: #fff;
}

.site-footer {
  background: #fff;
  border-top: 1px solid rgba(226,232,240,0.9);
  padding: 20px 16px;
  color: #334155;
  font-size: 12px;
  margin-top: 32px;
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow-y: auto;
}
.modal-card {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  box-shadow: 0 25px 50px rgba(15,23,42,0.25);
  border: 1px solid #f1f5f9;
  position: relative;
  margin: auto;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hidden { display: none !important; }

/* SVG decoration placeholder (heavy SVGs skipped per request) */
.svg-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}
.svg-placeholder::after {
  content: attr(data-emoji);
  font-size: inherit;
  line-height: 1;
}

.video-placeholder {
  background: linear-gradient(135deg, #0f172a, #1e293b 40%, #312e81);
  color: #e2e8f0;
  border-radius: 16px;
  border: 1px dashed #64748b;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
}
.video-placeholder code {
  font-size: 11px;
  background: rgba(255,255,255,0.08);
  padding: 4px 8px;
  border-radius: 8px;
  direction: ltr;
}

/* Checkerboard for transparent PVC preview */
.checkerboard {
  background-image:
    linear-gradient(45deg, #94a3b8 25%, transparent 25%),
    linear-gradient(-45deg, #94a3b8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #94a3b8 75%),
    linear-gradient(-45deg, transparent 75%, #94a3b8 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}
