html {
  font-size: 14px;
}

/* Right-to-left layout for the entire site */
html, body {
  direction: rtl;
  text-align: right;
}

/* Custom project font: alfont_com_zainpcv2-VF-2.ttf */
@font-face {
  font-family: 'ZainPCV2';
  src: url('../fonts/alfont_com_zainpcv2-VF-2.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'MaterialIcons';
  src: url('../fonts/MaterialIcons-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.material-icons {
  font-family: 'MaterialIcons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #fafafa;
}

.icon-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  user-select: none;
}

.icon-picker-item:hover {
  border-color: #0f2847;
}

.icon-picker-item.selected {
  border-color: #0f2847;
  background: #eef3f8;
  box-shadow: 0 0 0 2px rgba(15, 40, 71, 0.2);
}

.icon-picker-item .material-icons {
  font-size: 28px;
  color: #0f2847;
}

.icon-picker-item small {
  font-size: 11px;
  color: #555;
  text-align: center;
}

.myfont {
  font-family: 'ZainPCV2', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }

  /* Admin panel: keep compact on desktop (override global 16px) */
  html.admin-root {
    font-size: 13px;
  }
}

/* Admin panel base typography */
html.admin-root {
  font-size: 13px;
}

html.admin-root body.admin-body {
  font-size: 13px;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Admin panel */
.admin-body {
  background: #f4f6f9;
}

.admin-header {
  box-shadow: 0 2px 12px rgba(15, 40, 71, 0.12);
}

.admin-navbar {
  background: linear-gradient(135deg, #0f2847 0%, #163a63 100%);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.admin-brand {
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
}

.admin-nav-link {
  color: rgba(255, 255, 255, 0.88) !important;
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 0.4rem 0.75rem !important;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-nav-link:hover,
.admin-nav-link:focus {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
}

.admin-nav-link.active {
  color: #0f2847 !important;
  background: #fff;
  font-weight: 700;
}

.admin-navbar-toggler {
  border-color: rgba(255, 255, 255, 0.35);
}

.admin-navbar-toggler .navbar-toggler-icon {
  filter: invert(1);
}

.admin-mobile-login {
  color: #0f2847 !important;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
}

.admin-user-nav .admin-user-name {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.8125rem;
}

.admin-content {
  min-height: calc(100vh - 140px);
}

.admin-footer {
  border-top: 1px solid #dde3ea;
  background: #fff;
  padding: 0.75rem 0;
  color: #6c757d;
  font-size: 0.8125rem;
}

.admin-footer-link {
  color: #0f2847;
  text-decoration: none;
  margin-inline-start: 1rem;
}

.admin-footer-link:hover {
  text-decoration: underline;
}

.admin-page-title {
  color: #0f2847;
  font-size: 1.2rem;
  font-weight: 700;
}

.admin-page-subtitle {
  font-size: 0.8125rem;
}

.admin-card {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 40, 71, 0.06);
  padding: 1rem;
}

.admin-table-wrap {
  border-radius: 10px;
  overflow: hidden;
}

.admin-table {
  margin-bottom: 0;
  font-size: 0.8125rem;
}

.admin-table thead th {
  background: #eef3f8;
  color: #0f2847;
  font-weight: 700;
  font-size: 0.8125rem;
  white-space: nowrap;
  vertical-align: middle;
}

.admin-table tbody td {
  vertical-align: middle;
  font-size: 0.8125rem;
}

.admin-table .badge {
  font-size: 0.75rem;
}

.admin-table .btn-sm {
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
}

.admin-table .admin-thumb {
  width: 64px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.admin-actions .btn,
.admin-actions .btn-link {
  white-space: nowrap;
}

.admin-pagination .page-link {
  color: #0f2847;
  font-size: 0.8125rem;
}

.admin-pagination .text-muted.small {
  font-size: 0.75rem !important;
}

html.admin-root .btn {
  font-size: 0.8125rem;
}

html.admin-root .alert {
  font-size: 0.8125rem;
  padding: 0.65rem 0.85rem;
}

html.admin-root .form-control,
html.admin-root .form-select,
html.admin-root .form-label {
  font-size: 0.8125rem;
}

html.admin-root h1,
html.admin-root h2,
html.admin-root h3,
html.admin-root h4 {
  font-size: inherit;
}

.admin-pagination .page-item.active .page-link {
  background-color: #0f2847;
  border-color: #0f2847;
}

@media (max-width: 991.98px) {
  .admin-nav-list {
    padding-top: 0.75rem;
  }

  .admin-user-nav {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}

.admin-provider-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-provider-card {
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.admin-provider-card--pending {
  border-color: #ffc107;
  background: #fffdf5;
}

.admin-provider-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #eef3f8;
}

.admin-provider-card__body {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
}

.admin-provider-card__img {
  width: 88px;
  height: 55px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  flex-shrink: 0;
}

.admin-provider-card__info {
  min-width: 0;
  flex: 1;
}

.admin-provider-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f2847;
  margin: 0 0 0.25rem;
}

.admin-provider-card__meta,
.admin-provider-card__desc,
.admin-provider-card__line {
  font-size: 0.8125rem;
  margin-bottom: 0.25rem;
}

.admin-provider-card__desc {
  color: #495057;
}

.admin-provider-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem 0.85rem;
  border-top: 1px solid #eef3f8;
}

@media (max-width: 767.98px) {
  .admin-provider-card__body {
    flex-direction: column;
  }

  .admin-provider-card__img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .admin-provider-card__actions .btn {
    flex: 1 1 calc(50% - 0.35rem);
  }
}
