/* App-level overrides layered on the design system */
:root {
  accent-color: #c5a059;
}

.validation-summary-errors ul {
  margin: 0;
  padding-inline-start: 1.1rem;
}

.field-validation-error {
  display: block;
  margin-top: 0.35rem;
}

.navbar, .footer {
  display: none !important;
}

/* Bootstrap primary → Aseer gold */
.btn-primary,
.bg-primary {
  --bs-btn-bg: #c5a059;
  --bs-btn-border-color: #c5a059;
  --bs-btn-hover-bg: #b8954a;
  --bs-btn-hover-border-color: #b8954a;
  --bs-btn-active-bg: #a67c2e;
  --bs-btn-active-border-color: #a67c2e;
  --bs-btn-color: #14110b;
  --bs-btn-hover-color: #14110b;
  --bs-primary-rgb: 197, 160, 89;
}

.text-primary { color: #c5a059 !important; }
.badge.bg-primary { color: #14110b !important; }

/* Global top search + command palette */
.fd-search {
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid rgba(197, 160, 89, 0.55);
  border-radius: 14px;
  padding: 0.55rem 0.9rem;
  color: #94A3B8;
  box-shadow: 0 1px 0 rgba(197, 160, 89, 0.12);
}
.fd-search i { color: #94A3B8; flex-shrink: 0; }
.fd-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #0F172A;
  font-size: 0.9rem;
  min-width: 0;
}
.fd-search kbd {
  font-size: 0.7rem;
  background: #1e293b;
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
html[data-theme="dark"] .fd-search {
  background: #0f172a;
  border-color: rgba(197, 160, 89, 0.35);
}
html[data-theme="dark"] .fd-search input { color: #f8fafc; }

.app-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 2rem;
  backdrop-filter: blur(2px);
}
.app-search-overlay[hidden] { display: none !important; }
.app-search-palette {
  width: min(640px, 100%);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
.app-search-palette-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.app-search-palette-head i { color: #94A3B8; }
.app-search-palette-head input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1.05rem;
  color: #0F172A;
  min-width: 0;
}
.app-search-palette-head kbd {
  font-size: 0.7rem;
  background: #F1F5F9;
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
  color: #64748B;
}
.app-search-palette-hint {
  padding: 0.55rem 1.1rem 0.35rem;
  font-size: 0.78rem;
  color: #94A3B8;
}
.app-search-results {
  max-height: min(52vh, 420px);
  overflow: auto;
  padding: 0.35rem 0.45rem 0.65rem;
}
.app-search-empty {
  padding: 1.4rem 1rem;
  text-align: center;
  color: #94A3B8;
  font-size: 0.92rem;
}
.app-search-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: none;
  background: transparent;
  text-align: start;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
}
.app-search-item:hover,
.app-search-item.is-active {
  background: #f5efe3;
}
.app-search-item > i {
  width: 1.5rem;
  text-align: center;
  color: #c5a059;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.app-search-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.app-search-item-text strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-search-item-text em {
  font-style: normal;
  font-size: 0.78rem;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-search-item-type {
  font-size: 0.72rem;
  color: #94A3B8;
  flex-shrink: 0;
}
html[data-theme="dark"] .app-search-palette { background: #0f172a; border-color: rgba(248,250,252,0.08); }
html[data-theme="dark"] .app-search-palette-head { border-bottom-color: rgba(248,250,252,0.06); }
html[data-theme="dark"] .app-search-palette-head input { color: #f8fafc; }
html[data-theme="dark"] .app-search-item:hover,
html[data-theme="dark"] .app-search-item.is-active { background: rgba(197, 160, 89, 0.12); }
html[data-theme="dark"] .app-search-item-text strong { color: #f8fafc; }
body.app-search-open { overflow: hidden; }

@media (max-width: 720px) {
  .fd-search { max-width: none; }
  .fd-search kbd { display: none; }
  .app-search-overlay { padding-top: 8vh; }
}
