html {
  font-size: 14px;
}

/* HTMX loading indicator */
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-block;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.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;
}

/* Category cards */
.category-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  border: 2px solid transparent;
  border-radius: 12px;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1) !important;
  border-color: #0d6efd;
}

.category-card.selected,
.category-card.border-primary {
  border-color: #0d6efd !important;
  background: #f0f7ff;
}

.category-icon {
  font-size: 2rem;
  line-height: 1;
}

.category-label {
  font-size: 0.85rem;
}

.category-count {
  font-size: 0.75rem;
}

/* Domain chips (Create page) */
.domain-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.domain-chip:hover {
  border-color: #0d6efd;
  background: #f8f9ff;
}

.domain-chip.active {
  border-color: #0d6efd;
  background: #e8f0fe;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.domain-chip-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 4px;
}

.domain-chip-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #333;
}

/* ============================================================
   Professional navigation bar
   ============================================================ */
:root {
  --shramiik-1: #1d4ed8;
  --shramiik-2: #0ea5a4;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.shramiik-nav {
  background: linear-gradient(100deg, var(--shramiik-1) 0%, #2563eb 55%, var(--shramiik-2) 130%);
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.18);
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  margin-bottom: 1.5rem;
}

/* Brand */
.shramiik-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0;
}
.shramiik-brand-mark {
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.shramiik-brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.2px;
}
.shramiik-brand-sub {
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
}

/* Links */
.shramiik-nav .nav-link {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 500;
  border-radius: 9px;
  padding: 0.45rem 0.85rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.shramiik-nav .nav-link:hover,
.shramiik-nav .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}
.shramiik-nav .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  font-weight: 600;
}
.shramiik-nav .nav-ico {
  font-size: 0.95rem;
  margin-right: 0.15rem;
}

/* "Add" call-to-action */
.btn-add-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  color: var(--shramiik-1);
  font-weight: 700;
  border-radius: 9px;
  padding: 0.45rem 1.05rem;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn-add-cta:hover {
  background: #f1f5ff;
  color: var(--shramiik-1);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}
.btn-add-cta .nav-ico {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

/* Account button (profile chip) */
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 220px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.32rem 0.55rem 0.32rem 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.account-chip:hover,
.account-chip:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}
.account-chip.active {
  background: #fff;
  color: var(--shramiik-1);
  border-color: #fff;
}
.account-chip-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  font-size: 0.9rem;
  line-height: 1;
}
.account-chip.active .account-chip-avatar {
  background: rgba(37, 99, 235, 0.12);
}
.account-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-chip-caret {
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.7;
}

/* Logout + language */
.shramiik-nav .logout-link,
.shramiik-nav .lang-link {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 500;
}
.shramiik-nav .logout-link:hover,
.shramiik-nav .lang-link:hover {
  color: #fff;
}
.shramiik-nav .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.4);
}
.shramiik-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Tighten dropdown on dark nav */
.shramiik-nav .dropdown-menu {
  border: none;
  border-radius: 10px;
  margin-top: 0.4rem;
}
.shramiik-nav .dropdown-item {
  font-weight: 500;
  padding: 0.45rem 1rem;
}

@media (max-width: 991.98px) {
  .shramiik-nav .navbar-nav {
    padding-top: 0.5rem;
    gap: 0.15rem;
  }
  .btn-add-cta {
    width: max-content;
    margin-top: 0.25rem;
  }
  .account-chip {
    margin: 0.25rem 0;
  }
}

/* Search results: tap-to-expand rows on mobile.
   On desktop the dedicated ▼ button is used; the hint + row cursor are hidden. */
.expand-hint {
  display: none;
  color: #6c757d;
}
@media (max-width: 767.98px) {
  .worker-row {
    cursor: pointer;
  }
  .expand-hint {
    display: inline;
  }
  /* Row tap replaces the ▼ button on mobile, so drop the column to free width. */
  .expand-cell {
    display: none;
  }
  /* Service areas repeat in the expanded panel; dropping the column keeps the
     table inside the viewport instead of forcing a horizontal scroll. */
  .area-cell {
    display: none;
  }
}

/* Footer links */
.footer-links a {
  color: #6c757d;
  text-decoration: none;
  font-weight: 500;
}
.footer-links a:hover {
  color: var(--shramiik-1);
  text-decoration: underline;
}
.top-whatsapp {
  color: #128c7e;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.top-whatsapp:hover {
  color: #0e6b60;
  text-decoration: underline;
}

/* Legal pages */
.legal-page {
  line-height: 1.7;
}
.legal-page h5 {
  font-weight: 700;
  color: #1f2937;
}
.legal-page ul {
  margin-bottom: 1rem;
}

/* ---------------------------------------------------------------
   Touch targets — a thumb needs ~44px, and neighbouring controls
   need space so the wrong one isn't hit. Applied only to touch
   devices so the desktop layout stays compact.
   --------------------------------------------------------------- */
@media (pointer: coarse) {
  .btn {
    min-height: 44px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .btn-sm {
    min-height: 40px;
  }
  .btn-lg {
    min-height: 52px;
  }
  .form-control,
  .form-select,
  .input-group > .form-control {
    min-height: 44px;
  }
  .shramiik-nav .nav-link,
  .dropdown-item {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  .account-chip,
  .navbar-toggler {
    min-height: 44px;
  }
  .top-whatsapp {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  /* Icon-only controls keep their small glyph but get a full-size hit area. */
  .btn-icon,
  .cmt-del,
  .btn-close {
    min-width: 44px;
    min-height: 44px;
  }
  /* Stars are the smallest thing people are asked to hit. */
  .rating-stars label {
    font-size: 1.7rem;
    padding: 0 0.2rem;
  }
}

/* Phones: the WhatsApp link sat right above "Add", so a thumb aimed at Add
   kept landing on the link. Give Add its own full-width row. Touch only, so a
   narrow desktop window keeps the original layout. */
@media (max-width: 767.98px) and (pointer: coarse) {
  .search-top-actions {
    row-gap: 0.9rem;
  }
  .search-top-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}