/*
 |--------------------------------------------------------------
 | Project custom styles
 |--------------------------------------------------------------
 */

:root {
  --app-primary: #0d6efd; /* مقدار پیش‌فرض - توسط لیاوت داینامیک override می‌شود */
  --app-bg: #f6f8fb;
  --sidebar-link: #334155;
}

html, body {
  scroll-behavior: smooth;
}

body {
  font-family: Vazirmatn, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: var(--app-bg);
}

/* Ensure form controls inherit font */
button, input, optgroup, select, textarea {
  font-family: inherit;
}

/* Font Awesome v4/v5-style compatibility
   Allows using icons as: <i class="fa fa-xxx"></i>
   Prefer FA5 Free; fall back to FA6 Free if present locally */

 

/* Layout helpers */
.min-h-main {
  min-height: calc(100vh - 6rem);
}

/* Cards (auth and common) */
.auth-card {
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.brand-avatar {
  width: 56px;
  height: 56px;
  object-fit: cover;
}

/* Consistent tiny avatar size for tables/lists */
.avatar-34 {
  width: 34px;
  height: 34px;
  object-fit: cover;
}

/* Standard admin preview size (tables/lists) */
.avatar-60 {
  width: 60px;
  height: 60px;
  object-fit: cover;
}

/* Admin shell & sidebar */
.admin-shell {
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  flex: 0 0 260px; /* prevent collapsing in flex container on desktop */
}

.sidebar .nav-link {
  color: var(--sidebar-link);
  transition: padding .12s ease, background-color .12s ease, color .12s ease;
}

.sidebar .nav-link.active {
  background-color: var(--app-primary);
  color: #fff;
}

/* Increase padding for active sidebar items (blue background area) */
#adminSidebar .nav-link.active {
  padding-right: .75rem !important;
  padding-left: .75rem !important;
}
#adminSidebar .nav-link.active:hover,
#adminSidebar .nav-link.active:focus {
  padding-right: .75rem !important;
  padding-left: .75rem !important;
}

/* Hover padding for sidebar links (keep base px-0 in markup; add slight space on hover) */
#adminSidebar .nav-link:hover,
#adminSidebar .nav-link:focus {
  padding-right: .5rem !important;
  padding-left: .5rem !important;
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    top: 56px; /* navbar height */
    bottom: 0;
    z-index: 1030;
    transform: translateX(100%);
    transition: transform .2s ease-in-out;
    background: #fff;
  }
  .sidebar.show {
    transform: translateX(0);
  }
}

/* Example utility overrides */
.text-primary {
  color: var(--app-primary) !important;
}

/* Bootstrap primary button: Instagram-like gradient (global override) */
:root {
  --ig-primary-gradient: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
}

.btn-primary {
  color: #fff !important;
  border-color: transparent !important;
  background-color: transparent !important;
  background-image: var(--ig-primary-gradient) !important;
  background-size: 140% 140%;
  background-position: 50% 50%;
  box-shadow: 0 6px 18px rgba(214, 41, 118, 0.18);
}

.btn-primary:hover {
  color: #fff !important;
  border-color: transparent !important;
  background-color: transparent !important;
  background-image: var(--ig-primary-gradient) !important;
  background-position: 65% 35%;
  filter: saturate(1.08) brightness(1.02);
}

.btn-check:focus + .btn-primary,
.btn-primary:focus,
.btn-primary:focus-visible {
  color: #fff !important;
  border-color: transparent !important;
  background-color: transparent !important;
  background-image: var(--ig-primary-gradient) !important;
  box-shadow:
    0 6px 18px rgba(214, 41, 118, 0.18),
    0 0 0 0.25rem rgba(214, 41, 118, 0.22) !important;
}

.btn-check:active + .btn-primary,
.btn-check:checked + .btn-primary,
.btn-primary.active,
.btn-primary:active,
.show > .btn-primary.dropdown-toggle {
  color: #fff !important;
  border-color: transparent !important;
  background-color: transparent !important;
  background-image: var(--ig-primary-gradient) !important;
  filter: saturate(1.02) brightness(0.96);
  box-shadow: 0 6px 18px rgba(214, 41, 118, 0.12);
}

.btn-primary:disabled,
.btn-primary.disabled {
  color: rgba(255, 255, 255, 0.92) !important;
  border-color: transparent !important;
  background-color: transparent !important;
  background-image: var(--ig-primary-gradient) !important;
  opacity: 0.55 !important;
  filter: grayscale(0.12) saturate(0.8);
  box-shadow: none;
}

/* Action buttons: unified styling */
.action-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.action-buttons form {
  margin: 0;
}
.action-btn {
  /* Icon-only, fixed-size action buttons across admin tables */
  width: 34px;
  height: 34px;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  line-height: 1;
  font-size: 0.95rem;
  text-decoration: none;

  /* Variant-driven colors */
  background: var(--action-bg, transparent) !important;
  border-color: var(--action-border, rgba(15, 23, 42, 0.18)) !important;
  color: var(--action-color, #0f172a) !important;
  box-shadow: none !important;
}
.action-btn:hover,
.action-btn:focus {
  background: var(--action-hover-bg, rgba(15, 23, 42, 0.06)) !important;
  border-color: var(--action-hover-border, rgba(15, 23, 42, 0.28)) !important;
  color: var(--action-hover-color, #0f172a) !important;
  transform: translateY(-0.5px);
}
.action-btn:active {
  transform: translateY(0);
}
.action-btn i {
  margin: 0 !important;
}

/* Action button variants (exact, consistent palette) */
.action-btn--view {
  --action-bg: rgba(37, 99, 235, 0.08);
  --action-border: rgba(37, 99, 235, 0.28);
  --action-color: #1d4ed8;
  --action-hover-bg: rgba(37, 99, 235, 0.14);
  --action-hover-border: rgba(37, 99, 235, 0.4);
  --action-hover-color: #1e40af;
}
.action-btn--edit {
  --action-bg: rgba(99, 102, 241, 0.08);
  --action-border: rgba(99, 102, 241, 0.28);
  --action-color: #4f46e5;
  --action-hover-bg: rgba(99, 102, 241, 0.14);
  --action-hover-border: rgba(99, 102, 241, 0.4);
  --action-hover-color: #4338ca;
}
.action-btn--toggle {
  --action-bg: rgba(245, 158, 11, 0.12);
  --action-border: rgba(245, 158, 11, 0.35);
  --action-color: #b45309;
  --action-hover-bg: rgba(245, 158, 11, 0.18);
  --action-hover-border: rgba(245, 158, 11, 0.48);
  --action-hover-color: #92400e;
}
.action-btn--delete {
  --action-bg: rgba(239, 68, 68, 0.1);
  --action-border: rgba(239, 68, 68, 0.32);
  --action-color: #dc2626;
  --action-hover-bg: rgba(239, 68, 68, 0.16);
  --action-hover-border: rgba(239, 68, 68, 0.44);
  --action-hover-color: #b91c1c;
}


