/* Filament admin tweaks */

@import url("https://fonts.googleapis.com/css2?family=Prompt:wght@400;700&display=swap");

/* Filament wordmark: CSS-only SpectaSync logo */
.spectasync-wordmark {
  align-items: baseline;
  color: #111827;
  display: inline-flex;
  font-family: "Prompt", "Segoe UI", sans-serif;
  font-size: 1.125rem;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.spectasync-wordmark__specta {
  font-weight: 700;
}

.spectasync-wordmark__sync {
  font-weight: 400;
}

.dark .spectasync-wordmark {
  color: #f9fafb;
}

/* Make the global table search field wider by default. */
.fi-ta-header-toolbar > :nth-child(2) {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.fi-ta-search-field {
  flex: 1 1 24rem;
  max-width: 40rem;
  width: 100%;
}

.fi-ta-search-field .fi-input-wrp,
.fi-ta-search-field .fi-input {
  width: 100%;
}

/* Marketplace listing repeater: subtle per-channel row tint */
.marketplace-row {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.75rem;
  padding: 0.75rem;
}

.marketplace-row--trendyol {
  background: rgba(255, 106, 0, 0.05);
}

.marketplace-row--hepsiburada {
  background: rgba(100, 75, 86, 0.12);
}

.marketplace-row--n11 {
  background: rgba(236, 72, 153, 0.08);
}

.marketplace-row--disabled {
  opacity: 0.85;
}

/* When a marketplace row is inactive, keep only the switch + channel info visible. */
.marketplace-row--disabled > .fi-sc > .fi-grid-col {
  display: none;
}

.marketplace-row--disabled > .fi-sc > .fi-grid-col:nth-child(1),
.marketplace-row--disabled > .fi-sc > .fi-grid-col:nth-child(2) {
  display: block;
}

.marketplace-row--disabled > .fi-sc::after {
  content: "Bu pazaryeri pasif. Detay alanlari icin Aktif acin.";
  color: #6b7280;
  display: block;
  font-size: 12px;
  margin-top: 0.5rem;
}

.dark .marketplace-row {
  border-color: rgba(148, 163, 184, 0.2);
}

.dark .marketplace-row--trendyol {
  background: rgba(255, 106, 0, 0.12);
}

.dark .marketplace-row--hepsiburada {
  background: rgba(100, 75, 86, 0.24);
}

.dark .marketplace-row--n11 {
  background: rgba(236, 72, 153, 0.2);
}

/* Marketplace KPI (dashboard stat cards): match the same tints */
.fi-wi-stats-overview-stat.marketplace-kpi--trendyol {
  background: rgba(255, 106, 0, 0.05);
}

.fi-wi-stats-overview-stat.marketplace-kpi--hepsiburada {
  background: rgba(14, 165, 233, 0.05);
}

.fi-wi-stats-overview-stat.marketplace-kpi--n11 {
  background: rgba(34, 197, 94, 0.05);
}

.dark .fi-wi-stats-overview-stat.marketplace-kpi--trendyol {
  background: rgba(255, 106, 0, 0.12);
}

.dark .fi-wi-stats-overview-stat.marketplace-kpi--hepsiburada {
  background: rgba(14, 165, 233, 0.12);
}

.dark .fi-wi-stats-overview-stat.marketplace-kpi--n11 {
  background: rgba(34, 197, 94, 0.12);
}

/* Product list (family inline): ensure child/root row tint is visible on table cells. */
.fi-ta-table tbody tr.family-row--child > td {
  background-color: rgba(148, 163, 184, 0.12) !important;
}

.fi-ta-table tbody tr.family-row--root-open > td {
  background-color: rgba(59, 130, 246, 0.1) !important;
}

.dark .fi-ta-table tbody tr.family-row--child > td {
  background-color: rgba(148, 163, 184, 0.2) !important;
}

.dark .fi-ta-table tbody tr.family-row--root-open > td {
  background-color: rgba(59, 130, 246, 0.2) !important;
}

/* Repeater items: add clearer hover/focus state for long variant lists */
.fi-fo-repeater-item,
.fi-fo-simple-repeater-item {
  transition: background-color 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.fi-fo-repeater-item:hover,
.fi-fo-repeater-item:focus-within,
.fi-fo-simple-repeater-item:hover,
.fi-fo-simple-repeater-item:focus-within {
  background-color: rgba(59, 130, 246, 0.06);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
  border-radius: 0.75rem;
}

.dark .fi-fo-repeater-item:hover,
.dark .fi-fo-repeater-item:focus-within,
.dark .fi-fo-simple-repeater-item:hover,
.dark .fi-fo-simple-repeater-item:focus-within {
  background-color: rgba(96, 165, 250, 0.12);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.28);
}

/* Variant marketplace mapping: show channel boxes side-by-side */
.variant-marketplace-grid .fi-fo-repeater-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 72rem) {
  .variant-marketplace-grid .fi-fo-repeater-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 48rem) {
  .variant-marketplace-grid .fi-fo-repeater-items {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Maintenance tools page: add breathing room between sections. */
.maintenance-tools-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 64rem) {
  .maintenance-tools-sections {
    column-gap: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2rem;
  }
}
