/*
 * Shared pieces for the public pages (market, service page, seller profile,
 * buyer requests) and the partials they share with the dashboard: ratings,
 * level badge, favourite heart, follow / contact / report buttons, reviews.
 *
 * Built only on the tokens in style.css (--primary-color, --secondary-color,
 * --dark-color, --gray-color, --green-color, --orange-color, --red-color) and
 * the site's neutrals (#e5e7e7 borders, #f9f9f9 surfaces). Loaded by the app,
 * landing and dashboard layouts, after style.css.
 */

:root {
  --zw-border: #e5e7e7;
  --zw-surface: #f9f9f9;
  --zw-pill: 3.75rem;
  --zw-radius: 1.25rem;
  --zw-primary-soft: rgba(159, 232, 112, 0.18);
  --zw-orange-soft: rgba(255, 149, 0, 0.12);
  --zw-red-soft: rgba(226, 41, 0, 0.08);
  /* The signed-in bar's height (partials.dashboard.top-bar), as slim as Khamsat's. */
  --zw-bar-h: 4rem;
}

/* ---------- Buttons ---------- */

.zw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 3rem;
  padding: 0 1.75rem;
  border-radius: var(--zw-pill);
  border: 1px solid var(--primary-color) !important;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.zw-btn:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color) !important;
  color: var(--primary-color);
}

.zw-btn--light {
  background-color: var(--light-color);
  border-color: var(--zw-border) !important;
}

.zw-btn--light:hover {
  background-color: var(--light-color);
  border-color: var(--primary-color) !important;
  color: var(--secondary-color);
}

.zw-btn--danger {
  background-color: var(--zw-red-soft);
  border-color: transparent !important;
  color: var(--red-color);
}

.zw-btn--danger:hover {
  background-color: var(--red-color);
  border-color: var(--red-color) !important;
  color: var(--light-color);
}

/* ---------- Form fields (same pill fields as the checkout page) ---------- */

.zw-field .form-control,
.zw-field .form-select,
.zw-filters .form-control,
.zw-filters .form-select,
.zw-requests .form-control,
.zw-requests .form-select,
.zw-side .form-control,
.zw-side .form-select {
  height: 3rem;
  border-radius: var(--zw-pill);
  border: 1px solid transparent;
  background-color: var(--zw-surface);
  color: var(--dark-color);
  font-size: 0.875rem;
  padding: 0 1.25rem;
  box-shadow: none;
}

.zw-filters .form-select,
.zw-requests .form-select,
.zw-side .form-select {
  padding-inline-end: 2.75rem;
}

html[dir="rtl"] .zw-filters .form-select,
html[dir="rtl"] .zw-requests .form-select,
html[dir="rtl"] .zw-side .form-select {
  background-position: left 1.25rem center;
}

.zw-filters textarea.form-control,
.zw-requests textarea.form-control {
  height: auto;
  border-radius: var(--zw-radius);
  padding: 1rem 1.25rem;
}

.zw-filters .form-control:focus,
.zw-filters .form-select:focus,
.zw-requests .form-control:focus,
.zw-requests .form-select:focus,
.zw-side .form-control:focus,
.zw-side .form-select:focus {
  border-color: var(--primary-color);
  background-color: var(--light-color);
  box-shadow: none;
}

.zw-requests .form-label {
  color: var(--dark-color);
  font-size: 0.875rem;
  font-weight: 700;
}

/* ---------- Market: filters, search suggestions ---------- */

.zw-filters {
  margin-bottom: 1.5rem;
}

.zw-filters__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.zw-filters__count {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  color: var(--dark-color);
  font-weight: 700;
  border-radius: var(--zw-pill);
  scroll-margin-top: 1.5rem;
}

.zw-filters__count:focus {
  outline: none;
}

/* The search as a chip: what was searched, and a cross to clear it. */
.zw-search-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.375rem 0.25rem 1rem;
  border: 1px solid var(--primary-color);
  border-radius: var(--zw-pill);
  background-color: var(--zw-primary-soft);
  color: var(--secondary-color);
  font-weight: 500;
}

html[dir=rtl] .zw-search-chip {
  padding: 0.25rem 1rem 0.25rem 0.375rem;
}

.zw-search-chip img {
  width: 1.125rem;
  height: 1.125rem;
}

.zw-search-chip b {
  font-weight: 800;
}

.zw-search-chip__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--light-color);
  color: var(--secondary-color);
  font-size: 1.25rem;
  line-height: 1;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.zw-search-chip__clear:hover {
  background-color: var(--secondary-color);
  color: var(--light-color);
}

.zw-results-count {
  color: var(--gray-color);
  font-size: 0.9375rem;
  font-weight: 500;
}

/* A short glow when the page lands on the results. */
.zw-filters__count.is-flash .zw-search-chip,
.zw-filters__count.is-flash:not(:has(.zw-search-chip)) {
  animation: zw-flash 1.6s ease-out 0.4s;
}

@keyframes zw-flash {
  0% { box-shadow: 0 0 0 0 rgba(159, 232, 112, 0.7); }
  70% { box-shadow: 0 0 0 0.75rem rgba(159, 232, 112, 0); }
  100% { box-shadow: 0 0 0 0 rgba(159, 232, 112, 0); }
}

.zw-filters__sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-color);
  font-size: 0.875rem;
}

.zw-filters__bar .form-select {
  width: auto;
  min-width: 11rem;
  height: 2.75rem;
}

.zw-filters__panel {
  background-color: var(--zw-surface);
  border-radius: var(--zw-radius);
  padding: 1rem 1.25rem;
}

.zw-filters__panel summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  color: var(--dark-color);
  font-weight: 700;
}

.zw-filters__panel summary::-webkit-details-marker {
  display: none;
}

.zw-filters__panel summary::after {
  content: "";
  width: 1rem;
  height: 1rem;
  margin-inline-start: auto;
  background: url("../images/icons/down_arrow.svg") center / contain no-repeat;
  transition: transform 0.2s ease;
}

.zw-filters__panel[open] summary::after {
  transform: rotate(180deg);
}

.zw-filters__panel .form-control,
.zw-filters__panel .form-select {
  background-color: var(--light-color);
  border-color: var(--zw-border);
}

.zw-filters__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  height: 1.375rem;
  padding: 0 0.375rem;
  border-radius: var(--zw-pill);
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-size: 0.75rem;
}

.zw-filters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  align-items: end;
}

.zw-filters__label {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--dark-color);
  font-size: 0.8125rem;
  font-weight: 700;
}

.zw-filters__check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.875rem;
  color: var(--dark-color);
  font-size: 0.875rem;
}

.zw-filters__check input,
.zw-requests .form-check-input {
  accent-color: var(--secondary-color);
}

.zw-filters__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.zw-filters__clear {
  color: var(--gray-color);
  font-size: 0.875rem;
}

.zw-filters__clear:hover {
  color: var(--red-color);
}

.zw-describe {
  margin: 0.625rem 0 0.875rem;
  max-width: 40rem;
}

.zw-describe summary {
  cursor: pointer;
  color: var(--light-color);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.zw-describe form {
  margin-top: 0.625rem;
  padding: 0.75rem;
  border-radius: var(--zw-radius);
  background-color: var(--light-color);
}

.zw-describe textarea.form-control {
  border-radius: 1rem;
  border: 1px solid transparent;
  background-color: var(--zw-surface);
  box-shadow: none;
}

.zw-describe textarea.form-control:focus {
  border-color: var(--primary-color);
}

.zw-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 0.625rem;
}

.zw-recent {
  margin-top: 2.5rem;
}

.zw-recent h2 {
  margin-bottom: 0.875rem;
  color: var(--dark-color);
  font-size: 1.25rem;
  font-weight: 700;
}

.zw-recent__list {
  display: flex;
  gap: 0.875rem;
  overflow-x: auto;
  padding-bottom: 0.375rem;
}

.zw-recent__item {
  flex: 0 0 11.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  color: var(--dark-color);
  font-size: 0.875rem;
  text-decoration: none;
}

.zw-recent__item:hover {
  color: var(--secondary-color);
}

.zw-recent__item img {
  width: 100%;
  height: 7rem;
  object-fit: cover;
  border-radius: 1rem;
  background-color: var(--zw-surface);
}

.form-icon {
  position: relative;
}

.zw-suggest {
  position: absolute;
  top: 100%;
  inset-inline: 0;
  z-index: 50;
  margin-top: 0.375rem;
  padding: 0.375rem 0;
  border: 1px solid var(--zw-border);
  border-radius: 1rem;
  background-color: var(--light-color);
  box-shadow: 0 0.5rem 1.5rem rgba(6, 14, 0, 0.08);
  text-align: start;
}

.zw-suggest h6 {
  margin: 0.375rem 0.875rem 0.125rem;
  color: var(--gray-color);
  font-size: 0.75rem;
}

.zw-suggest a {
  display: block;
  padding: 0.5rem 0.875rem;
  color: var(--dark-color);
  font-size: 0.875rem;
  text-decoration: none;
}

.zw-suggest a:hover,
.zw-suggest a.is-active {
  background-color: var(--zw-primary-soft);
}

/* ---------- Service card extras: heart, sponsored tag, rating ---------- */

.zw-card {
  position: relative;
}

/* The card's own link fills it; a guest's heart is a link too, and keeps its size. */
.zw-card > a:not(.zw-heart) {
  display: block;
  height: 100%;
}

.zw-card--sponsored .lp-service__media {
  position: relative;
}

.zw-sponsored {
  position: absolute;
  top: 0.625rem;
  inset-inline-start: 0.625rem;
  z-index: 4;
  padding: 0.1875rem 0.75rem;
  border-radius: var(--zw-pill);
  background-color: var(--secondary-color);
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 700;
}

.zw-heart-form {
  position: absolute;
  top: 0.625rem;
  inset-inline-end: 0.625rem;
  z-index: 5;
  margin: 0;
}

.zw-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--light-color);
  box-shadow: 0 1px 4px rgba(6, 14, 0, 0.12);
  cursor: pointer;
}

.zw-heart svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: var(--secondary-color);
  stroke-width: 1.8;
}

.zw-heart:hover svg {
  stroke: var(--red-color);
}

.zw-heart {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zw-heart:hover {
  transform: scale(1.1);
  box-shadow: 0 0.25rem 0.75rem rgba(6, 14, 0, 0.18);
}

.zw-heart:active {
  transform: scale(0.92);
}

/* Saving pops the heart once. */
.zw-heart.is-saved svg {
  animation: zw-heart-pop 0.35s ease-out;
}

@keyframes zw-heart-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* A service card without an image (or whose image failed): a calm placeholder, not alt text. */
.lp-service__media.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--zw-surface);
}

.lp-service__media.is-empty::after {
  content: "";
  width: 3.5rem;
  height: 3.5rem;
  background: url("../images/icons/zadwork-icon.svg") center / contain no-repeat;
  opacity: 0.35;
}

.zw-heart.is-saved svg {
  fill: var(--red-color);
  stroke: var(--red-color);
}

.zw-heart:focus-visible {
  outline: 2px solid var(--primary-color);
}

.zw-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.1875rem;
  color: var(--gray-color);
  font-size: 0.8125rem;
}

.zw-card-rating b {
  color: var(--dark-color);
}

.zw-card-rating__star {
  color: var(--orange-color);
}

/* ---------- Stars ---------- */

.zw-stars {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
}

.zw-stars svg {
  width: 1rem;
  height: 1rem;
}

.zw-star-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.625rem;
  padding: 0;
  border: 0;
}

.zw-star-input legend {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  color: var(--dark-color);
  font-size: 0.9375rem;
}

.zw-star-input__stars {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.zw-star-input input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.zw-star-input label {
  padding: 0 2px;
  color: var(--zw-border);
  font-size: 1.625rem;
  line-height: 1;
  cursor: pointer;
}

.zw-star-input input:checked ~ label,
.zw-star-input label:hover,
.zw-star-input label:hover ~ label {
  color: var(--orange-color);
}

.zw-star-input input:focus-visible + label {
  outline: 2px solid var(--primary-color);
  border-radius: 4px;
}

/* ---------- Seller: level, presence, stats, follow, contact ---------- */

.zw-level {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.75rem;
  border-radius: var(--zw-pill);
  background-color: var(--zw-primary-soft);
  color: var(--secondary-color);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.zw-level::before {
  content: "★";
  color: var(--orange-color);
}

.zw-level--top_rated {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.zw-presence {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--gray-color);
  font-size: 0.8125rem;
}

.zw-presence::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--gray-color);
}

.zw-presence--online {
  color: var(--green-color);
}

.zw-presence--online::before {
  background-color: var(--green-color);
}

.zw-presence--away {
  color: var(--orange-color);
}

.zw-presence--away::before {
  background-color: var(--orange-color);
}

.zw-seller-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.625rem 0 0;
  padding: 0;
  list-style: none;
}

.zw-seller-stats li {
  display: flex;
  flex-direction: column;
  min-width: 7.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 1rem;
  background-color: var(--zw-surface);
}

.zw-seller-stats span {
  color: var(--gray-color);
  font-size: 0.75rem;
}

.zw-seller-stats b {
  color: var(--dark-color);
  font-size: 0.9375rem;
}

.zw-follow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 0.75rem;
}

.zw-follow-btn {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1.25rem;
  border: 1px solid var(--primary-color) !important;
  border-radius: var(--zw-pill);
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.zw-follow-btn:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color) !important;
  color: var(--primary-color);
}

.zw-follow-btn.is-following {
  background-color: var(--light-color);
  border-color: var(--zw-border) !important;
  color: var(--secondary-color);
}

.zw-follow-count {
  color: var(--gray-color);
  font-size: 0.8125rem;
}

.zw-contact-seller {
  min-width: 13.75rem;
  margin: 0.75rem 0;
}

.zw-contact-seller-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 3rem;
  border: 1px solid var(--primary-color) !important;
  border-radius: var(--zw-pill);
  background-color: var(--light-color);
  color: var(--secondary-color);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.zw-contact-seller-btn:hover {
  background-color: var(--zw-primary-soft);
  color: var(--secondary-color);
}

/* ---------- Report ---------- */

.zw-report {
  position: relative;
  display: inline-block;
  font-size: 0.8125rem;
}

.zw-report summary {
  list-style: none;
  cursor: pointer;
  color: var(--gray-color);
}

.zw-report summary::-webkit-details-marker {
  display: none;
}

.zw-report summary:hover {
  color: var(--red-color);
}

.zw-report__form {
  position: absolute;
  top: 100%;
  inset-inline-end: 0;
  z-index: 30;
  width: 16.25rem;
  margin-top: 0.375rem;
  padding: 0.75rem;
  border: 1px solid var(--zw-border);
  border-radius: 1rem;
  background-color: var(--light-color);
  box-shadow: 0 0.5rem 1.5rem rgba(6, 14, 0, 0.08);
  text-align: start;
}

.zw-report__form .form-control,
.zw-report__form .form-select {
  border-radius: 0.75rem;
  border-color: var(--zw-border);
  box-shadow: none;
  font-size: 0.875rem;
}

.zw-report__send {
  padding: 0.25rem 0.875rem;
  border: 0 !important;
  border-radius: var(--zw-pill);
  background-color: var(--zw-red-soft);
  color: var(--red-color);
  font-size: 0.8125rem;
  font-weight: 700;
}

.zw-report__send:hover {
  background-color: var(--red-color);
  color: var(--light-color);
}

/* ---------- Reviews: the stars filter (seller profile) ---------- */

.zw-reviews__filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.zw-reviews__filter a {
  padding: 0.25rem 0.875rem;
  border: 1px solid var(--zw-border);
  border-radius: var(--zw-pill);
  color: var(--gray-color);
  font-size: 0.8125rem;
  text-decoration: none;
}

.zw-reviews__filter a:hover {
  border-color: var(--primary-color);
  color: var(--secondary-color);
}

.zw-reviews__filter a.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: 700;
}

/* ---------- Buyer requests (public board) ---------- */

.zw-requests {
  max-width: 61.25rem;
  padding-top: 8.75rem;
  padding-bottom: 3.75rem;
}

.zw-requests__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.zw-requests__head h1 {
  margin-bottom: 0.375rem;
  color: var(--dark-color);
  font-size: 1.75rem;
  font-weight: 700;
}

.zw-requests__lead,
.zw-muted,
.zw-requests .zw-muted {
  color: var(--gray-color);
}

.zw-requests__back {
  color: var(--secondary-color);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.zw-requests__back:hover {
  color: var(--green-color);
}

.zw-requests__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.zw-requests__filters .form-control {
  flex: 1 1 15rem;
}

.zw-requests__filters .form-select {
  flex: 0 1 13.75rem;
}

.zw-request-card {
  display: block;
  margin-bottom: 0.875rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--zw-radius);
  background-color: var(--zw-surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.zw-request-card:hover {
  border-color: var(--primary-color);
  background-color: var(--light-color);
  color: inherit;
}

.zw-request-card h2 {
  margin: 0 0 0.5rem;
  color: var(--dark-color);
  font-size: 1.125rem;
  font-weight: 700;
}

.zw-request-card p {
  margin-bottom: 0.625rem;
  color: var(--gray-color);
  white-space: pre-line;
}

.zw-request-card__budget {
  height: fit-content;
  padding: 0.125rem 0.75rem;
  border-radius: var(--zw-pill);
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: 700;
}

.zw-request-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1rem;
  color: var(--gray-color);
  font-size: 0.8125rem;
}

.zw-request-empty {
  padding: 3rem 0.625rem;
  border-radius: var(--zw-radius);
  background-color: var(--zw-surface);
  text-align: center;
}

.zw-request-empty img {
  width: 6rem;
  margin-bottom: 1rem;
}

.zw-request-empty h2 {
  color: var(--dark-color);
  font-size: 1.25rem;
  font-weight: 700;
}

.zw-panel {
  margin-bottom: 1.125rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--zw-radius);
  background-color: var(--zw-surface);
}

.zw-panel h1,
.zw-panel h2 {
  margin-bottom: 0.75rem;
  color: var(--dark-color);
  font-size: 1.125rem;
  font-weight: 700;
}

.zw-panel .form-control,
.zw-panel .form-select {
  background-color: var(--light-color);
  border-color: var(--zw-border);
}

.zw-pre {
  white-space: pre-line;
}

.zw-offer {
  padding: 1rem 0;
  border-top: 1px solid var(--zw-border);
}

.zw-offer:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.zw-offer img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.zw-offer__price {
  color: var(--secondary-color);
  font-size: 1.25rem;
  font-weight: 700;
}

.zw-status {
  display: inline-block;
  padding: 0.125rem 0.75rem;
  border-radius: var(--zw-pill);
  background-color: var(--zw-border);
  color: var(--dark-color);
  font-size: 0.75rem;
  font-weight: 700;
}

.zw-status--open,
.zw-status--accepted {
  background-color: var(--zw-primary-soft);
  color: var(--green-color);
}

.zw-status--pending_review,
.zw-status--pending {
  background-color: var(--zw-orange-soft);
  color: var(--orange-color);
}

.zw-status--removed,
.zw-status--rejected,
.zw-status--withdrawn {
  background-color: var(--zw-red-soft);
  color: var(--red-color);
}

.zw-stars .is-on {
  fill: var(--orange-color);
}

.zw-stars .is-off {
  fill: var(--zw-border);
}

/* On a phone the report form opens as a sheet at the bottom of the screen,
 * so it never runs off the side whatever the link's position. */
@media (max-width: 575.98px) {
  .zw-report__form {
    position: fixed;
    top: auto;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    z-index: 1050;
  }
}

/* ---------- Service grid (market, seller profile) ---------- */

/* The landing "featured services" cards (lp-service) in a responsive grid;
   each card fills its cell instead of the carousel's fixed width. */
/* Scoped under .landing-page: the landing stylesheet loads after this one. */
.landing-page.lp-market {
  background: transparent;
}

.lp-market__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 2rem 1.5rem;
}

.landing-page.lp-market .lp-service {
  width: auto;
}

.landing-page.lp-market .lp-service--link {
  text-decoration: none;
  color: inherit;
}

/* ---------- Seller profile (as on Khamsat) ---------- */

.zw-profile-hero {
  padding-top: 3rem;
  background-color: var(--zw-primary-soft);
  text-align: center;
}

.zw-profile-hero__avatar {
  position: relative;
  width: 8.5rem;
  height: 8.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 0.25rem solid var(--light-color);
  background-color: var(--secondary-color);
  box-shadow: 0 0.5rem 1.5rem rgba(22, 51, 0, 0.12);
}

.zw-profile-hero__avatar > img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.zw-profile-hero__check {
  position: absolute;
  bottom: 0.25rem;
  inset-inline-end: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 0.1875rem solid var(--light-color);
  background-color: var(--primary-color);
}

.zw-profile-hero__check svg {
  width: 1rem;
  height: 1rem;
}

.zw-profile-hero h1 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
  color: var(--secondary-color);
  font-size: 1.75rem;
  font-weight: 700;
}

.zw-profile-hero__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-color: var(--green-color);
  box-shadow: 0 0 0 0.1875rem var(--light-color);
}

.zw-profile-hero__headline {
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

.zw-profile-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--gray-color);
  font-size: 0.9375rem;
}

.zw-profile-hero__country {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.zw-profile-hero__country img {
  width: 1rem;
  height: 1rem;
  opacity: 0.6;
}

.zw-profile-tabs {
  margin-top: 2rem;
}

.zw-profile-tabs .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.zw-profile-tabs__nav {
  display: flex;
  gap: 0.25rem;
}

.zw-profile-tabs__nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-radius: 1rem 1rem 0 0;
  color: var(--secondary-color);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.zw-profile-tabs__nav a img {
  width: 1.25rem;
  height: 1.25rem;
}

.zw-profile-tabs__nav a b {
  min-width: 1.5rem;
  padding: 0 0.375rem;
  border-radius: var(--zw-pill);
  background-color: var(--zw-primary-soft);
  font-size: 0.75rem;
  line-height: 1.5rem;
}

.zw-profile-tabs__nav a:hover {
  background-color: rgba(255, 255, 255, 0.6);
  color: var(--secondary-color);
}

.zw-profile-tabs__nav a.active {
  background-color: var(--light-color);
  font-weight: 700;
}

.zw-profile-tabs__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
}

.zw-profile-tabs__actions .zw-btn img {
  width: 1.125rem;
  height: 1.125rem;
}

.zw-profile-tabs__actions .zw-follow,
.zw-profile-tabs__actions .zw-contact-seller {
  margin: 0;
}

.zw-profile-body {
  padding: 2.5rem 0 4rem;
}

.zw-profile-card {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--zw-border);
  border-radius: var(--zw-radius);
  background-color: var(--light-color);
}

.zw-profile-card h2 {
  margin-bottom: 1.25rem;
  color: var(--secondary-color);
  font-size: 1.125rem;
  font-weight: 700;
}

.zw-profile-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.zw-profile-card__head h2 {
  margin-bottom: 0;
}

.zw-profile-card__head a {
  color: var(--green-color);
  font-weight: 700;
  text-decoration: none;
}

.zw-profile-bio {
  margin-bottom: 0;
  color: var(--secondary-color);
  line-height: 1.9;
  white-space: pre-line;
}

.zw-profile-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zw-profile-skills li {
  padding: 0.375rem 1rem;
  border-radius: var(--zw-pill);
  background-color: var(--zw-primary-soft);
  color: var(--secondary-color);
  font-size: 0.875rem;
}

.zw-profile-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem;
}

.zw-profile-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0.75rem;
  object-fit: cover;
}

.zw-profile-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--gray-color);
}

.zw-profile-empty img {
  width: 6rem;
  margin-bottom: 1rem;
}

/* Label on one side, value on the other, like the statistics box on Khamsat. */
.zw-profile-stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.875rem 1rem;
  align-items: center;
  margin: 0;
}

.zw-profile-stats + .zw-profile-stats {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--zw-border);
}

.zw-profile-stats dt {
  color: var(--secondary-color);
  font-weight: 500;
}

.zw-profile-stats dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.375rem;
  margin: 0;
  color: var(--secondary-color);
  font-weight: 700;
}

.zw-profile-rate {
  padding: 0.125rem 0.625rem;
  border-radius: var(--zw-pill);
  background-color: var(--zw-primary-soft);
  color: var(--green-color);
  font-size: 0.875rem;
}

/* A rate not worked out yet, as on Khamsat: a grey chip. */
.zw-profile-rate.is-pending {
  background-color: var(--zw-surface);
  color: var(--gray-color);
  font-weight: 400;
  font-size: 0.8125rem;
}

.zw-profile-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zw-profile-checks li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-color);
}

.zw-profile-checks li > span[aria-hidden] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background-color: var(--zw-red-soft);
  color: var(--red-color);
  font-size: 0.75rem;
  font-weight: 700;
}

.zw-profile-checks li.is-done {
  color: var(--secondary-color);
}

.zw-profile-checks li.is-done > span[aria-hidden] {
  background-color: var(--zw-primary-soft);
  color: var(--green-color);
}

.zw-profile-average {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary-color);
  font-size: 1.25rem;
}

.zw-profile-review {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--zw-border);
}

.zw-reviews__filter + .zw-profile-review {
  margin-top: 0.75rem;
}

.zw-profile-review__avatar,
.zw-profile-review__reply > img {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
}

.zw-profile-review__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--zw-primary-soft);
  color: var(--secondary-color);
  font-size: 1.25rem;
  font-weight: 700;
}

.zw-profile-review__body {
  flex: 1;
  min-width: 0;
}

.zw-profile-review__body p {
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

.zw-profile-review__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary-color);
}

.zw-profile-review__service {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.375rem 0 0.25rem;
}

.zw-profile-review__service a {
  color: var(--secondary-color);
  font-weight: 700;
  text-decoration: none;
}

.zw-profile-review__service a:hover {
  color: var(--green-color);
}

.zw-profile-review__badge {
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  background-color: var(--zw-primary-soft);
  color: var(--green-color);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.zw-profile-review__body .zw-profile-review__info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--gray-color);
  font-size: 0.8125rem;
}

.zw-profile-review__info span,
.zw-profile-review__info time {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.zw-profile-review__info svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: currentColor;
}

.zw-profile-review__body .zw-profile-review__text {
  margin: 0.75rem 0 0;
  line-height: 1.8;
  white-space: pre-line;
}

/* The seller's reply, indented under the comment as on Khamsat. */
.zw-profile-review__reply {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-inline-start: 1.5rem;
}

.zw-profile-review__reply strong {
  color: var(--secondary-color);
}

.zw-profile-review__reply .zw-profile-review__info {
  margin: 0.25rem 0 0;
}

.zw-profile-review__reply > img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
}

@media (max-width: 991.98px) {
  .zw-profile-tabs .container {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .zw-profile-tabs__actions {
    justify-content: center;
    padding-bottom: 0;
  }

  .zw-profile-tabs__nav {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .lp-market__grid {
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 1.25rem 1rem;
  }

  .zw-profile-hero {
    padding-top: 2rem;
  }

  .zw-profile-hero__avatar {
    width: 6.5rem;
    height: 6.5rem;
  }

  .zw-profile-hero h1 {
    font-size: 1.375rem;
  }

  .zw-profile-tabs__nav a {
    flex: 1;
    justify-content: center;
    padding: 0.875rem 0.5rem;
    font-size: 0.875rem;
  }

  .zw-profile-tabs__nav a img {
    display: none;
  }

  .zw-profile-card {
    padding: 1.25rem 1rem;
  }

  .zw-profile-checks {
    grid-template-columns: 1fr;
  }
}

/* ---------- One review: share card (as on Khamsat) ---------- */

.zw-profile-review__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: auto;
}

.zw-profile-review__share {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.875rem;
  border: 1px solid var(--zw-border);
  border-radius: var(--zw-pill);
  color: var(--secondary-color);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.zw-profile-review__share:hover {
  border-color: var(--primary-color);
  background-color: var(--zw-primary-soft);
  color: var(--secondary-color);
}

.zw-profile-review__share img {
  width: 0.875rem;
  height: 0.875rem;
}

.zw-review-share {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 2.5rem 2rem 2rem;
  border-radius: var(--zw-radius);
  background: radial-gradient(circle at 15% 110%, rgba(159, 232, 112, 0.35), transparent 55%), var(--secondary-color);
  color: var(--light-color);
  overflow: hidden;
}

.zw-review-share__title {
  margin: 0;
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.4;
}

.zw-review-share .zw-stars svg {
  width: 2.5rem;
  height: 2.5rem;
}

.zw-review-share__comment {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.8;
}

.zw-review-share__logo {
  width: 9rem;
  margin-top: 1rem;
}

.zw-review-share__link {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.zw-review-share__link .form-control {
  height: 3rem;
  border-radius: var(--zw-pill);
  background-color: var(--zw-surface);
}

.zw-review-share__networks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.zw-review-share__networks a {
  padding: 0.5rem 1.25rem;
  border-radius: var(--zw-pill);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.zw-review-share__networks a:hover {
  color: #fff;
  opacity: 0.85;
}

.zw-review-share__networks .is-telegram {
  background-color: #229ed9;
}

.zw-review-share__networks .is-linkedin {
  background-color: #0a66c2;
}

.zw-review-share__networks .is-facebook {
  background-color: #1877f2;
}

.zw-review-share__networks .is-x {
  background-color: #000;
}

@media (max-width: 575.98px) {
  .zw-review-share {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .zw-review-share__title {
    font-size: 1.375rem;
  }

  .zw-review-share .zw-stars svg {
    width: 1.75rem;
    height: 1.75rem;
  }

  .zw-review-share__comment {
    font-size: 1rem;
  }

  .zw-review-share__link .zw-btn {
    padding: 0 1rem;
  }
}

/* ---------- Success toast (shared/success, outside the admin panel) ---------- */

.zw-toast {
  position: fixed;
  top: 6.5rem;
  left: 50%;
  z-index: 1060;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: 0.75rem 0.875rem 0.75rem 1.25rem;
  border-radius: var(--zw-pill);
  background-color: #163300;
  color: #fff;
  box-shadow: 0 1rem 2rem rgba(22, 51, 0, 0.25);
  transform: translateX(-50%);
  animation: zw-toast-in 0.35s ease;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.zw-toast.is-leaving {
  opacity: 0;
  transform: translate(-50%, -1rem);
}

.zw-toast p {
  margin: 0;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
}

.zw-toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: #163300;
  font-size: 0.875rem;
  font-weight: 700;
}

.zw-toast__close {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0 !important;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.125rem;
  line-height: 1;
}

.zw-toast__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

@keyframes zw-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -1rem);
  }
}

@media (max-width: 575.98px) {
  .zw-toast {
    top: 5rem;
  }
}

/* Errors on the dashboard: a soft red card with the list in it. */
.main-dash-contain .alert-danger {
  padding: 1rem 1.25rem;
  border: 1px solid rgba(226, 41, 0, 0.25);
  border-radius: var(--zw-radius);
  background-color: var(--zw-red-soft);
  color: var(--red-color);
  font-weight: 500;
}

.main-dash-contain .alert-danger ul {
  margin: 0;
  padding-inline-start: 1.25rem;
}

/* ---------- My experience (seller/partials/expertise) ---------- */

.zw-expertise {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.zw-expertise__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--zw-border);
  border-radius: 1rem;
  color: var(--secondary-color);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.zw-expertise__item:hover {
  border-color: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-0.125rem);
}

.zw-expertise__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--zw-primary-soft);
}

.zw-expertise__icon img {
  width: 1.375rem;
  height: 1.375rem;
  object-fit: contain;
}

.zw-expertise__text {
  flex: 1;
  min-width: 0;
}

.zw-expertise__text b {
  display: block;
  font-size: 0.9375rem;
}

.zw-expertise__text small {
  color: var(--gray-color);
  font-size: 0.8125rem;
}

.zw-expertise__rating {
  flex-shrink: 0;
  padding: 0.125rem 0.625rem;
  border-radius: var(--zw-pill);
  background-color: var(--zw-orange-soft);
  color: var(--orange-color);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ---------- Portfolio: empty state and broken images (seller/partials/about) ---------- */

.zw-profile-gallery a {
  display: block;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: var(--zw-surface);
}

.zw-profile-gallery a.is-empty {
  aspect-ratio: 4 / 3;
  background: url("../images/icons/zadwork-icon.svg") center / 2.5rem no-repeat, var(--zw-surface);
  opacity: 0.6;
  pointer-events: none;
}

.zw-profile-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  border: 2px dashed var(--zw-border);
  border-radius: var(--zw-radius);
  text-align: center;
}

.zw-profile-empty-box img {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.25rem;
  opacity: 0.7;
}

.zw-profile-empty-box b {
  color: var(--secondary-color);
  font-size: 1.0625rem;
}

.zw-profile-empty-box p {
  max-width: 28rem;
  margin: 0 0 0.5rem;
  color: var(--gray-color);
  font-size: 0.875rem;
}

/* ---------- Community (community/*), as on Khamsat's ---------- */

.zw-community {
  padding: 2.5rem 0 4rem;
}

.zw-community-narrow {
  max-width: 56rem;
}

.zw-community-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.zw-community-head h1 {
  margin: 0;
  color: var(--secondary-color);
  font-size: 1.75rem;
  font-weight: 700;
}

.zw-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
  color: var(--gray-color);
  font-size: 0.875rem;
}

.zw-crumbs a {
  color: var(--gray-color);
  text-decoration: none;
}

.zw-crumbs a:hover {
  color: var(--green-color);
}

.zw-community-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.zw-community-tabs a {
  flex-shrink: 0;
  padding: 0.5rem 1.125rem;
  border: 1px solid var(--zw-border);
  border-radius: var(--zw-pill);
  color: var(--secondary-color);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}

.zw-community-tabs a:hover {
  border-color: var(--primary-color);
  color: var(--secondary-color);
}

.zw-community-tabs a.active {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  font-weight: 700;
}

.zw-member {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  object-fit: cover;
}

.zw-member.is-large {
  width: 3.75rem;
  height: 3.75rem;
}

.zw-topics {
  border: 1px solid var(--zw-border);
  border-radius: var(--zw-radius);
  background-color: var(--light-color);
  overflow: hidden;
}

.zw-topic {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--zw-border);
}

.zw-topic:last-child {
  border-bottom: 0;
}

.zw-topic:hover {
  background-color: var(--zw-surface);
}

.zw-topic__main,
.zw-topic__last {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.zw-topic__main {
  flex: 1;
  color: var(--secondary-color);
  text-decoration: none;
}

.zw-topic__main:hover b {
  color: var(--green-color);
}

.zw-topic__main > span,
.zw-topic__last > span {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.zw-topic__main b {
  font-size: 1.0625rem;
  transition: color 0.2s ease;
}

.zw-topic small {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  color: var(--gray-color);
  font-size: 0.8125rem;
}

.zw-topic__last {
  flex-basis: 16rem;
  flex-shrink: 0;
}

.zw-topic__last .zw-member {
  width: 2.75rem;
  height: 2.75rem;
}

.zw-topic__last b {
  color: var(--secondary-color);
  font-size: 0.9375rem;
}

.zw-community-more {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.zw-post__head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.zw-post__head > div:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.zw-post__head time,
.zw-post__comment-meta time {
  color: var(--gray-color);
  font-size: 0.8125rem;
}

.zw-post__author,
.zw-post__comment-meta > a {
  color: var(--secondary-color);
  font-weight: 700;
  text-decoration: none;
}

.zw-post__author:hover,
.zw-post__comment-meta > a:hover {
  color: var(--green-color);
}

.zw-post__actions {
  margin-inline-start: auto;
}

.zw-post__body {
  color: var(--secondary-color);
  font-size: 1rem;
  line-height: 1.9;
  white-space: pre-line;
}

.zw-post__comment {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 0;
  border-top: 1px solid var(--zw-border);
  scroll-margin-top: 7rem;
}

.zw-post__comment:target {
  margin-inline: -1rem;
  padding-inline: 1rem;
  border-radius: 1rem;
  background-color: var(--zw-primary-soft);
}

.zw-post__comment .zw-member {
  width: 2.75rem;
  height: 2.75rem;
}

.zw-post__comment-body {
  flex: 1;
  min-width: 0;
}

.zw-post__comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

.zw-post__comment-body p {
  margin: 0;
  color: var(--secondary-color);
  line-height: 1.8;
  white-space: pre-line;
}

.zw-post__badge {
  padding: 0.0625rem 0.5rem;
  border-radius: var(--zw-pill);
  background-color: var(--zw-primary-soft);
  color: var(--green-color);
  font-size: 0.75rem;
  font-weight: 700;
}

.zw-post__link {
  padding: 0;
  border: 0 !important;
  background: none;
  color: var(--red-color);
  font-size: 0.8125rem;
}

.zw-post__form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--zw-border);
}

.zw-post__form textarea {
  border-radius: 1rem;
}

.zw-post__signin {
  margin: 1rem 0 0;
  color: var(--gray-color);
}

.zw-community-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.zw-community-form > label {
  margin-top: 0.75rem;
  color: var(--secondary-color);
  font-weight: 700;
}

.zw-community-form .form-control,
.zw-community-form .form-select {
  border-radius: 0.875rem;
}

.zw-community-form > .zw-btn {
  align-self: flex-start;
  margin-top: 1rem;
}

.zw-community-checks {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.zw-community-checks label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  color: var(--secondary-color);
  font-size: 0.9375rem;
}

.zw-community-checks label[hidden] {
  display: none;
}

.zw-community-checks .form-check-input {
  flex-shrink: 0;
  margin: 0.25rem 0 0;
}

/* "My work samples" on the profile (seller/partials/about). */
.zw-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 1rem;
}

.zw-showcase__item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  color: var(--secondary-color);
  text-decoration: none;
}

.zw-showcase__item:hover b {
  color: var(--green-color);
}

.zw-showcase__image {
  aspect-ratio: 4 / 3;
  border-radius: 0.875rem;
  background: url("../images/icons/zadwork-icon.svg") center / 2.5rem no-repeat, var(--zw-surface);
  overflow: hidden;
}

.zw-showcase__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zw-showcase__item small {
  color: var(--gray-color);
  font-size: 0.8125rem;
}

@media (max-width: 767.98px) {
  .zw-topic {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }

  .zw-topic__last {
    flex-basis: auto;
    padding-inline-start: 4.25rem;
  }

  .zw-community-head h1 {
    font-size: 1.375rem;
  }
}

/* ---------- One work, large (seller/work) ---------- */

.zw-work-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.zw-work-images a {
  display: block;
  border-radius: var(--zw-radius);
  background-color: var(--zw-surface);
  overflow: hidden;
}

.zw-work-images img {
  display: block;
  width: 100%;
  height: auto;
}

.zw-work-images a.is-empty {
  aspect-ratio: 16 / 10;
  background: url("../images/icons/zadwork-icon.svg") center / 4rem no-repeat, var(--zw-surface);
  pointer-events: none;
}

/* ---------- Community: icons, topic sidebar, add a comment (community/show) ---------- */

.zw-icon {
  flex-shrink: 0;
  width: 0.9375rem;
  height: 0.9375rem;
  vertical-align: -0.125rem;
}

.zw-topic small > span,
.zw-topic small > time,
.zw-post__comment-meta time {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.zw-post__foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--zw-border);
}

.zw-post__comment-meta {
  justify-content: space-between;
}

.zw-post__comment-meta > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.zw-add-comment {
  scroll-margin-top: 7rem;
}

.zw-add-comment .zw-post__form {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.zw-add-comment textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.1875rem var(--zw-primary-soft);
}

.zw-community-checks__one {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  color: var(--secondary-color);
  font-size: 0.9375rem;
}

.zw-community-checks__one .form-check-input {
  flex-shrink: 0;
  margin: 0.25rem 0 0;
}

.zw-profile-stats dd a {
  color: var(--green-color);
  text-decoration: none;
}

.zw-poster {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: var(--secondary-color);
  text-decoration: none;
}

.zw-poster > span {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.zw-poster:hover b {
  color: var(--green-color);
}

.zw-poster small {
  color: var(--gray-color);
  font-size: 0.8125rem;
}

.zw-latest {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zw-latest a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.75rem;
  color: var(--secondary-color);
  font-size: 0.9375rem;
  text-decoration: none;
}

.zw-latest a:hover,
.zw-latest a.is-current {
  background-color: var(--zw-surface);
}

.zw-latest .zw-member {
  width: 2.5rem;
  height: 2.5rem;
}

.zw-latest a span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.zw-btn .zw-icon {
  width: 1.125rem;
  height: 1.125rem;
}

/* ---------- "Are you sure?" (partials/confirm-dialog) ---------- */

.zw-confirm {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: rgba(6, 14, 0, 0.45);
  animation: zw-confirm-fade 0.2s ease;
}

.zw-confirm[hidden] {
  display: none;
}

body.zw-confirm-open {
  overflow: hidden;
}

.zw-confirm__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 26rem;
  padding: 2rem 1.5rem 1.5rem;
  border-radius: var(--zw-radius);
  background-color: var(--light-color);
  box-shadow: 0 1.5rem 3rem rgba(6, 14, 0, 0.2);
  text-align: center;
  animation: zw-confirm-in 0.25s ease;
}

.zw-confirm__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: var(--zw-red-soft);
  color: var(--red-color);
  font-size: 1.75rem;
  font-weight: 700;
}

.zw-confirm__box p {
  margin: 0;
  color: var(--secondary-color);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.7;
}

.zw-confirm__actions {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.zw-confirm__actions .zw-btn {
  flex: 1;
}

@keyframes zw-confirm-fade {
  from {
    opacity: 0;
  }
}

@keyframes zw-confirm-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.97);
  }
}

.zw-confirm .zw-btn--danger {
  background-color: var(--red-color);
  color: #fff;
}

.zw-confirm .zw-btn--danger:hover {
  background-color: #b82100;
  border-color: #b82100 !important;
}

.zw-btn .zw-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.zw-btn .zw-icon path {
  stroke-width: 2;
}

/* ---------- "Show more" under the market's cards (market/index) ---------- */

.zw-load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  margin-top: 2.5rem;
}

.zw-load-more .custom-btn {
  text-decoration: none;
}

.zw-load-more .custom-btn[data-busy] {
  opacity: 0.7;
  pointer-events: none;
}

/* A down arrow: the button style turns arrows round in RTL. */
.zw-load-more .custom-btn .icon img {
  transform: none !important;
  filter: brightness(0) invert(1);
}

/* The paperclip on the inbox's "Attach files" and on attached files. */
.zw-attach .zw-icon,
.zw-msg-files .zw-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.zw-attach {
  gap: 0.375rem;
}

/* An alert (one OK button): the brand's orange sign and the green button. */
.zw-confirm[data-kind="alert"] .zw-confirm__icon {
  background-color: var(--zw-orange-soft);
  color: var(--orange-color);
}

.zw-confirm[data-kind="alert"] .zw-btn--danger {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

.zw-confirm[data-kind="alert"] .zw-btn--danger:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color) !important;
  color: var(--primary-color);
}

/* Long messages (an error, a link) wrap inside the dialog and scroll if they must. */
.zw-confirm__box p {
  max-height: 50vh;
  overflow-y: auto;
  overflow-wrap: anywhere;
}

/* ---------- Market: a category page, as on Khamsat (market/category) ---------- */

.zw-cat-page {
  padding: 2.5rem 0 4rem;
}

.zw-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.zw-cat-head h1 {
  margin: 0;
  color: var(--secondary-color);
  font-size: 1.875rem;
  font-weight: 700;
}

.zw-cat-head p {
  margin: 0.75rem 0 0;
  color: var(--dark-color);
  font-size: 1rem;
}

.zw-cat-found {
  margin-bottom: 1.25rem;
  color: var(--gray-color);
  font-size: 0.9375rem;
}

/* The order: a button with its menu under it. */
.zw-sort {
  position: relative;
  flex-shrink: 0;
}

.zw-sort summary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid var(--zw-border);
  border-radius: var(--zw-pill);
  background-color: var(--light-color);
  color: var(--secondary-color);
  font-size: 0.9375rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.zw-sort summary::-webkit-details-marker {
  display: none;
}

.zw-sort summary::after {
  content: "";
  border-top: 0.375rem solid currentColor;
  border-inline: 0.3125rem solid transparent;
  transition: transform 0.2s ease;
}

.zw-sort summary:hover,
.zw-sort[open] summary {
  border-color: var(--primary-color);
}

.zw-sort[open] summary::after {
  transform: rotate(180deg);
}

.zw-sort ul {
  position: absolute;
  top: calc(100% + 0.375rem);
  inset-inline-end: 0;
  z-index: 20;
  min-width: 11rem;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  border: 1px solid var(--zw-border);
  border-radius: 0.75rem;
  background-color: var(--light-color);
  box-shadow: 0 0.5rem 1.5rem rgba(6, 14, 0, 0.12);
}

.zw-sort li a {
  display: block;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  color: var(--dark-color);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}

.zw-sort li a:hover,
.zw-sort li a[aria-current] {
  background-color: var(--zw-primary-soft);
  color: var(--secondary-color);
}

.zw-sort li a[aria-current] {
  font-weight: 700;
}

/* The filters down the side. */
.zw-side__section {
  margin-bottom: 2rem;
}

.zw-side__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.zw-side__head h2,
.zw-side__head label {
  margin: 0;
  color: var(--secondary-color);
  font-size: 1.0625rem;
  font-weight: 700;
}

.zw-side__clear {
  color: var(--dark-color);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.zw-side__clear:hover {
  color: var(--red-color);
}

.zw-side__cats {
  max-height: 23rem;
  margin: 0;
  padding: 0;
  padding-inline-end: 0.5rem;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #c9cfc9 transparent;
}

.zw-side__cats ul {
  margin: 0.25rem 0 0.5rem;
  margin-inline-start: 0.75rem;
  padding: 0;
  padding-inline-start: 0.875rem;
  border-inline-start: 1px solid var(--zw-border);
  list-style: none;
}

.zw-side__cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: var(--dark-color);
  font-size: 0.9375rem;
  text-decoration: none;
}

.zw-side__cats > li > a {
  font-size: 1rem;
}

.zw-side__cats a:hover {
  color: var(--green-color);
}

.zw-side__cats a.active {
  color: var(--secondary-color);
  font-weight: 700;
}

.zw-side__count {
  flex-shrink: 0;
  min-width: 2.75rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--zw-border);
  border-radius: 0.5rem;
  background-color: var(--zw-surface);
  color: var(--gray-color);
  font-size: 0.75rem;
  font-weight: 400;
  text-align: center;
}

.zw-side__cats a.active .zw-side__count {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

/* Delivery and budget: one choice among buttons side by side. */
.zw-side__chips {
  display: flex;
  gap: 0.5rem;
}

.zw-side__chips label {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

.zw-side__chips input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.zw-side__chips span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  padding: 0 0.5rem;
  border: 1px solid var(--zw-border);
  border-radius: 0.75rem;
  background-color: var(--light-color);
  color: var(--dark-color);
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.zw-side__chips span:hover {
  border-color: var(--primary-color);
}

.zw-side__chips input:checked + span {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: 700;
}

.zw-side__chips input:focus-visible + span {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Rating, level and status: a box or a round button before each line. */
.zw-side__check {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 0.75rem;
  color: var(--dark-color);
  font-size: 0.9375rem;
  cursor: pointer;
}

.zw-side__check input {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--secondary-color);
  cursor: pointer;
}

.zw-side__check .zw-stars svg {
  width: 1.125rem;
  height: 1.125rem;
}

.zw-side-toggle {
  display: none;
}

/* The services, three in a row. */
.zw-gigs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 1.875rem;
}

.zw-gig {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.zw-gig > .zw-gig__link {
  height: auto;
  color: inherit;
  text-decoration: none;
}

.zw-gig__media {
  position: relative;
  aspect-ratio: 16 / 9.25;
  margin-bottom: 0.875rem;
  border-radius: 0.75rem;
  background-color: var(--zw-surface);
}

.zw-gig__media > img:not(.zw-gig__avatar) {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0.75rem;
  object-fit: cover;
}

.zw-gig__media.is-empty {
  background: url("../images/icons/zadwork-icon.svg") center / 3.5rem no-repeat, var(--zw-surface);
}

/* The arrows over a card's image, as on Khamsat: shown when the card is pointed at (always on touch). */
.zw-gig {
  position: relative;
}

.zw-gig__nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  aspect-ratio: 16 / 9.25;
  padding: 0 0.625rem;
  pointer-events: none;
}

.zw-gig__nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.92);
  color: #163300;
  box-shadow: 0 2px 8px rgba(6, 14, 0, 0.25);
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.zw-gig__nav button:hover {
  transform: scale(1.08);
}

/* In Arabic the first (previous) is on the right and points right; the next on the left points left. */
.zw-gig__nav button[data-gig-step="-1"] .zw-icon {
  transform: scaleX(-1);
}

[dir="ltr"] .zw-gig__nav button .zw-icon {
  transform: scaleX(-1);
}

[dir="ltr"] .zw-gig__nav button[data-gig-step="-1"] .zw-icon {
  transform: none;
}

.zw-gig__nav .zw-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.zw-gig:hover .zw-gig__nav button,
.zw-gig__nav button:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .zw-gig__nav button {
    opacity: 1;
  }
}

.zw-gig__avatar {
  position: absolute;
  bottom: 0.75rem;
  inset-inline-end: 0.75rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background-color: #fff;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(6, 14, 0, 0.2);
}

.zw-gig__title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--secondary-color);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.zw-gig__link:hover .zw-gig__title {
  color: var(--green-color);
}

.zw-gig__path {
  color: var(--gray-color);
  font-size: 0.875rem;
}

.zw-gig__path a {
  color: var(--gray-color);
  text-decoration: none;
}

.zw-gig__path a:hover {
  color: var(--green-color);
}

.zw-gig__path span {
  margin: 0 0.25rem;
}

.zw-gig__rating {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--gray-color);
  font-size: 0.9375rem;
}

.zw-gig__price {
  color: var(--dark-color);
  font-size: 0.9375rem;
}

.zw-gig__price b {
  color: var(--secondary-color);
  font-size: 1.0625rem;
  font-weight: 700;
  unicode-bidi: isolate;
  direction: ltr;
}

@media (max-width: 1199.98px) {
  .zw-gigs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tablets and phones: the filters open from a button above the services. */
@media (max-width: 991.98px) {
  .zw-cat-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .zw-side-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 3rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--zw-border) !important; /* style.css takes the border off every button */
    border-radius: var(--zw-pill);
    background-color: var(--light-color);
    color: var(--secondary-color);
    font-weight: 700;
  }

  .zw-cat-side {
    display: none;
    margin-bottom: 1.5rem;
  }

  .zw-cat-side.is-open {
    display: block;
  }
}

@media (max-width: 575.98px) {
  .zw-cat-head h1 {
    font-size: 1.5rem;
  }

  .zw-gigs {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- The signed-in bar on the site's pages (partials.dashboard.top-bar) ---------- */

/* On the dashboard the bar is fixed over a padded page; here it holds its own place
   at the top and stays there while the page scrolls, as on Khamsat. */
.top-nav.is-page {
  position: sticky;
  border-bottom: 1px solid var(--zw-border);
}

/* The bar's items line up with the page under them, as on Khamsat: 1400px at most,
   15px inside each side (the dashboard's pages are as wide, dashboard-ui.css). */
.top-nav > .container-fluid,
.top-nav .top-search > .container-fluid {
  max-width: 87.5rem;
  margin-inline: auto;
  padding-inline: 0.9375rem;
}

/* The footer under the site's and the dashboard's pages as wide as they are (the landing page keeps its own). */
.landing-page.zw-site-footer .lp-container {
  width: 100%;
  max-width: 87.5rem;
  padding-inline: 0.9375rem;
}

/* The site's pages (market, service, profile...) as wide as the bar over them, from a laptop up. */
@media (min-width: 1200px) {
  .container {
    max-width: 87.5rem;
    padding-inline: 0.9375rem;
  }
}

@media (max-width: 575.98px) {
  .top-nav > .container-fluid,
  .top-nav .top-search > .container-fluid {
    padding-inline: 1rem;
  }
}

/* A sticky bar needs the page itself to scroll: "hidden" (landing.scss) makes the page
   a box of its own and the bar would leave with it; "clip" cuts the same overflow. */
html:has(.top-nav.is-page),
html:has(.top-nav.is-page) body {
  overflow-x: clip;
}

/* ---------- A service page, as on Khamsat (market/product) ---------- */

/* A box with its title over a line, as Khamsat's panels. */
.zw-box {
  display: block;
  margin-bottom: 2rem;
  border: 1px solid var(--zw-border);
  border-radius: var(--zw-radius);
  background-color: var(--light-color);
}

.zw-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--zw-border);
  color: var(--secondary-color);
  font-size: 1.125rem;
  font-weight: 700;
}

.zw-box__head h2 {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.zw-box__head a {
  color: var(--green-color);
  font-size: 0.875rem;
  font-weight: 400;
  text-decoration: none;
}

.zw-box__body {
  padding: 1.5rem;
}

.zw-box__body--line {
  border-top: 1px solid var(--zw-border);
}

.zw-box__title {
  margin: 1.75rem 0 1rem;
  color: var(--secondary-color);
  font-size: 1.25rem;
  font-weight: 700;
}

.zw-box__line {
  height: 0;
  margin: 2rem 0 0;
  border: 0;
  border-top: 1px solid var(--zw-border);
  background: none;
  opacity: 1;
}

.zw-collect-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid var(--zw-border) !important; /* style.css takes the border off every button */
  border-radius: var(--zw-pill);
  background-color: var(--light-color);
  color: var(--secondary-color);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}

.zw-collect-btn:hover {
  border-color: var(--primary-color) !important;
  color: var(--secondary-color);
}

.zw-collect-btn .zw-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.zw-service-cover img {
  display: block;
  width: 100%;
  border-radius: 0.75rem;
}

.zw-service-cover.is-empty {
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  background: url("../images/icons/zadwork-icon.svg") center / 4rem no-repeat, var(--zw-surface);
}

.zw-service-text {
  color: var(--dark-color);
  font-size: 1rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.zw-service-text img {
  max-width: 100%;
  height: auto;
}

.zw-service-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.zw-service-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0.75rem;
  object-fit: cover;
}

.zw-service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.zw-service-tags a {
  padding: 0.5rem 1rem;
  border: 1px solid var(--zw-border);
  border-radius: var(--zw-pill);
  color: var(--secondary-color);
  font-size: 0.9375rem;
  text-decoration: none;
}

.zw-service-tags a:hover {
  border-color: var(--primary-color);
  background-color: var(--zw-primary-soft);
}

/* "Service rating": the average beside a bar for each star. */
.zw-rating-summary {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem 2rem;
}

.zw-rating-summary__average {
  text-align: center;
}

.zw-rating-summary__average b {
  display: block;
  color: var(--secondary-color);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
}

.zw-rating-summary__average a {
  color: var(--gray-color);
  font-size: 0.875rem;
  text-decoration: none;
}

.zw-rating-summary__average a:hover {
  color: var(--green-color);
}

.zw-rating-summary__bars {
  margin: 0;
  padding: 0;
  list-style: none;
}

.zw-rating-summary__bars a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.3125rem 0;
  color: var(--dark-color);
  text-decoration: none;
}

.zw-rating-summary__bars a.active .zw-rating-summary__share {
  color: var(--secondary-color);
  font-weight: 700;
}

.zw-rating-summary__bar {
  flex: 1;
  height: 0.75rem;
  overflow: hidden;
  border-radius: var(--zw-pill);
  background-color: var(--zw-border);
}

.zw-rating-summary__bar span {
  display: block;
  height: 100%;
  border-radius: var(--zw-pill);
  background-color: var(--primary-color);
}

.zw-rating-summary__share {
  min-width: 3.5rem;
  font-size: 0.875rem;
  text-align: end;
}

.zw-rating-summary__aspects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  grid-column: 1 / -1;
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--zw-border);
  list-style: none;
  color: var(--dark-color);
  font-size: 0.875rem;
}

.zw-rating-summary__aspects li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.zw-service-reviews .zw-profile-review:first-child {
  padding-top: 0;
  border-top: 0;
}

/* "Order the service": the price, the enhancements and the buttons. */
.zw-service-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--secondary-color);
  font-weight: 700;
}

.zw-service-price b {
  font-size: 1.625rem;
}

.zw-service-extras__title {
  margin: 1.25rem 0 0.25rem;
  color: var(--secondary-color);
  font-size: 1rem;
  font-weight: 700;
}

.zw-service-extras {
  margin: 0;
  padding: 0;
  list-style: none;
}

.zw-service-extras li {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--zw-border);
}

.zw-service-extras label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
  cursor: pointer;
}

.zw-service-extras input {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.25rem 0 0;
  accent-color: var(--secondary-color);
  cursor: pointer;
}

.zw-service-extras b {
  display: block;
  color: var(--dark-color);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.7;
}

.zw-service-extras small {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.375rem;
  color: var(--gray-color);
  font-size: 0.8125rem;
}

.zw-service-extras small span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.zw-service-extras .zw-icon {
  width: 1rem;
  height: 1rem;
}

.zw-service-note {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background-color: var(--zw-orange-soft);
  color: var(--dark-color);
  font-size: 0.9375rem;
}

.zw-service-note p {
  margin: 0.25rem 0 0;
}

.zw-service-buy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.zw-service-buy form {
  margin: 0;
}

.zw-service-buy .zw-btn {
  width: 100%;
}

.zw-service-buy .zw-btn img {
  width: 1.25rem;
  height: 1.25rem;
}

/* "Service card": its facts, then its owner. */
.zw-service-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.875rem 1rem;
  margin: 0;
}

.zw-service-facts dt {
  color: var(--dark-color);
  font-weight: 400;
}

.zw-service-facts dd {
  margin: 0;
  color: var(--secondary-color);
  font-weight: 700;
  text-align: end;
}

.zw-service-facts dd a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--gray-color);
  font-weight: 400;
  text-decoration: none;
}

.zw-service-seller__title {
  margin-bottom: 1rem;
  color: var(--secondary-color);
  font-size: 1rem;
  font-weight: 700;
}

.zw-service-seller {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.zw-service-seller__avatar img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.zw-service-seller__data {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
}

.zw-service-seller__data > a {
  color: var(--secondary-color);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
}

.zw-service-seller__data > span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--gray-color);
  font-size: 0.875rem;
}

.zw-service-seller__data .zw-icon {
  width: 1rem;
  height: 1rem;
}

.zw-service-seller .zw-contact-seller {
  min-width: 0;
  margin: 0;
}

.zw-service-seller .zw-contact-seller-btn {
  height: 2.5rem;
  padding: 0 1.25rem;
  font-size: 0.9375rem;
}

.zw-service-report {
  margin-top: 1rem;
}

/* The guarantee. */
.zw-service-guarantee {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.zw-service-guarantee:hover {
  border-color: var(--primary-color);
}

.zw-service-guarantee img {
  width: 3.5rem;
  height: 3.5rem;
}

.zw-service-guarantee strong {
  color: var(--secondary-color);
  font-size: 2rem;
  font-weight: 700;
}

.zw-service-guarantee > span {
  color: var(--dark-color);
  font-size: 1rem;
}

.zw-service-guarantee .zw-stars svg {
  width: 1.375rem;
  height: 1.375rem;
}

/* "Add to a collection": the site's dialog with a list to choose. */
.zw-collect {
  align-items: stretch;
  text-align: start;
}

.zw-collect h2 {
  margin: 0;
  color: var(--secondary-color);
  font-size: 1.125rem;
  font-weight: 700;
}

.zw-collect label {
  margin-bottom: -0.5rem;
  color: var(--dark-color);
  font-size: 0.875rem;
  font-weight: 700;
}

.zw-collect .form-select,
.zw-collect .form-control {
  height: 3rem;
  border: 1px solid var(--zw-border);
  border-radius: 0.75rem;
  background-color: var(--light-color);
  color: var(--dark-color);
  box-shadow: none;
}

html[dir="rtl"] .zw-collect .form-select {
  padding-inline-end: 2.75rem;
  background-position: left 1rem center;
}

.zw-collect .form-select:focus,
.zw-collect .form-control:focus {
  border-color: var(--primary-color);
}

/* The same dialog holds an order's requests (dashboard/orders/partials/dialogs). */
.zw-confirm__box.zw-collect {
  max-width: 32rem;
}

.zw-collect textarea.form-control {
  height: auto;
  min-height: 6rem;
  padding: 0.75rem 1rem;
}

.zw-confirm__box.zw-collect p {
  max-height: none;
  color: var(--gray-color);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.7;
}

/* Phones and tablets: one column of boxes, "Order the service" right under the description. */
@media (max-width: 991.98px) {
  .zw-service-page .row {
    margin: 0;
  }

  .zw-service-page .row > [class*="col-"] {
    display: contents;
  }

  .zw-service-page .row > [class*="col-"] > * {
    order: 3;
    width: 100%;
  }

  .zw-service-page .row .zw-service-main {
    order: 1;
  }

  .zw-service-page .row .zw-service-order {
    order: 2;
  }
}

@media (max-width: 767.98px) {
  .zw-rating-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .zw-service-gallery {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- The home page after signing in, as on Khamsat (dashboard/home) ---------- */

/* The search on Zadwork's video, as tall as Khamsat's. */
.zw-home-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(calc(100svh - var(--zw-bar-h)), 50rem);
  padding: 6rem 0;
  overflow: hidden;
  background: #060e00 url("../../assets/landing/hero-video-poster.jpg") center / cover no-repeat;
  color: #fff;
  text-align: center;
}

.zw-home-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zw-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(6, 14, 0, 0.55), rgba(6, 14, 0, 0.7));
}

.zw-home-hero > .container {
  position: relative;
  z-index: 2;
}

.zw-home-hero h1 {
  margin: 0 0 0.875rem;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.zw-home-hero p {
  margin: 0 0 2.25rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.125rem;
}

.zw-home-search {
  position: relative;
  display: flex;
  gap: 0.5rem;
  max-width: 45rem;
  margin: 0 auto;
  padding: 0.3125rem;
  border-radius: var(--zw-pill);
  background-color: #fff;
  box-shadow: 0 1rem 2.5rem rgba(6, 14, 0, 0.3);
}

.zw-home-search input {
  flex: 1;
  min-width: 0;
  padding: 0 1.25rem;
  border: 0;
  background: transparent;
  color: #060e00;
  font-size: 1rem;
  outline: none;
}

.zw-home-search button {
  padding: 0.6875rem 2rem;
  border-radius: var(--zw-pill);
  background-color: var(--primary-color);
  color: #163300;
  font-size: 1rem;
  font-weight: 700;
}

.zw-home-search button:hover {
  background-color: #8edc5c;
}

/* Khamsat's three popular words, beside their title. */
.zw-home-keywords {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 45rem;
  margin: 1.125rem auto 0;
}

.zw-home-keywords b {
  color: #fff;
  font-size: 1rem;
}

.zw-home-keywords a {
  padding: 0.375rem 0.875rem;
  font-size: 0.9375rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--zw-pill);
  background-color: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(6px);
  text-decoration: none;
}

.zw-home-keywords a:hover {
  border-color: var(--primary-color);
  background-color: rgba(159, 232, 112, 0.25);
  color: #fff;
}

/* Each block of the page, the grey ones between the white, as on Khamsat. */
.zw-home-section {
  padding: 5rem 0;
}

.zw-home-section.is-muted {
  background-color: var(--zw-surface);
}

.zw-home-section h2 {
  margin: 0;
  color: var(--secondary-color);
  font-size: 1.75rem;
  font-weight: 700;
}

.zw-home-section h2.is-centered {
  margin-bottom: 3rem;
  font-size: 2.125rem;
  text-align: center;
}

/* Every category on its photo, its name in the middle, four in a row (as Khamsat's);
   a short last row sits in the middle. */
.zw-home-cats {
  --zw-cats-gap: 1.875rem;
  --zw-cats-per-row: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--zw-cats-gap);
}

.zw-home-cat {
  position: relative;
  flex: 0 0 calc((100% - (var(--zw-cats-per-row) - 1) * var(--zw-cats-gap)) / var(--zw-cats-per-row));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  aspect-ratio: 400 / 230;
  overflow: hidden;
  border-radius: 1rem;
  background: linear-gradient(135deg, #1b3d06, #2b5a0e);
  text-decoration: none;
}

.zw-home-cat > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.zw-home-cat::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(6, 14, 0, 0.4);
  transition: background-color 0.3s ease;
}

.zw-home-cat:hover::after {
  background-color: rgba(6, 14, 0, 0.25);
}

.zw-home-cat:hover > img {
  transform: scale(1.06);
}

/* No photo yet: the line icon on the dark green, without the shade. */
.zw-home-cat.is-plain::after {
  content: none;
}

.zw-home-cat .zw-category-icon {
  position: relative;
  z-index: 1;
  width: 3.25rem;
  height: 3.25rem;
  color: var(--primary-color);
}

/* The names on one line and in one size, as on Khamsat: as large as the card (cqi) allows for the
   longest of them (--len, letters, set on .zw-home-cats) — an Arabic letter is about 0.4em wide. */
.zw-home-cat {
  container-type: inline-size;
}

.zw-home-cat span {
  position: relative;
  z-index: 1;
  max-width: 100%;
  padding: 0 1rem;
  overflow: hidden;
  color: #fff;
  font-size: min(1.75rem, 9cqi, calc((100cqi - 2rem) / (var(--len, 10) * 0.42)));
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

/* The popular sub-categories (Khamsat's "Popular services"), on a band of the site's dark green
   with a soft light at the top; each a frosted tile: the icon on its green badge, the name, and
   an arrow that comes in when pointed at. Fixed colours: the band is the same in both themes. */
.zw-home-section.is-brand {
  position: relative;
  background:
    radial-gradient(60rem 22rem at 50% -6rem, rgba(159, 232, 112, 0.16), transparent 70%),
    #163300;
}

.zw-home-section.is-brand h2 {
  color: #fff;
}

.zw-home-popular {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.zw-home-popular a {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 6rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.125rem;
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.zw-home-popular a:hover {
  border-color: rgba(159, 232, 112, 0.6);
  background-color: rgba(255, 255, 255, 0.09);
  color: #fff;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.25);
  transform: translateY(-3px);
}

.zw-home-popular__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background-color: rgba(159, 232, 112, 0.14);
  color: var(--primary-color);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* #11280a: the dark green the dark theme leaves as it is (the band is the same in both themes). */
.zw-home-popular a:hover .zw-home-popular__icon {
  background-color: var(--primary-color);
  color: #11280a;
}

.zw-home-popular .zw-category-icon {
  width: 2rem;
  height: 2rem;
}

/* The name on two lines at most. */
/* The name on one line, its main category under it in a quieter tone. */
.zw-home-popular__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.zw-home-popular__name,
.zw-home-popular__parent {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A name longer than its card (the home page's script marks it): it fades at its end, and pointed at
   it slides inside the card to show the rest, then back. */
.zw-home-popular__name > span {
  display: inline-block;
  transition: transform var(--zw-slide-time, 0.6s) ease-in-out;
}

.zw-home-popular__name.is-long {
  text-overflow: clip;
  -webkit-mask-image: linear-gradient(to var(--zw-fade-side, left), #000 80%, transparent);
  mask-image: linear-gradient(to var(--zw-fade-side, left), #000 80%, transparent);
}

[dir="ltr"] .zw-home-popular__name.is-long {
  --zw-fade-side: right;
}

/* Slid, the fade moves to the start, where the name now leaves the card. */
.zw-home-popular a:hover .zw-home-popular__name.is-long,
.zw-home-popular a:focus-visible .zw-home-popular__name.is-long {
  -webkit-mask-image: linear-gradient(to var(--zw-fade-start, right), #000 88%, transparent);
  mask-image: linear-gradient(to var(--zw-fade-start, right), #000 88%, transparent);
}

[dir="ltr"] .zw-home-popular__name.is-long {
  --zw-fade-start: left;
}

.zw-home-popular a:hover .zw-home-popular__name > span,
.zw-home-popular a:focus-visible .zw-home-popular__name > span {
  transform: translateX(var(--zw-slide, 0));
  transition-delay: 0.15s;
}

@media (prefers-reduced-motion: reduce) {
  .zw-home-popular__name > span {
    transition: none;
  }
}

.zw-home-popular__name {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.5;
}

.zw-home-popular__parent {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
}

.zw-home-popular__arrow {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary-color);
  opacity: 0;
  transform: translateX(0.5rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

[dir="ltr"] .zw-home-popular__arrow {
  transform: scaleX(-1) translateX(0.5rem);
}

.zw-home-popular a:hover .zw-home-popular__arrow,
.zw-home-popular a:focus-visible .zw-home-popular__arrow {
  opacity: 1;
  transform: none;
}

[dir="ltr"] .zw-home-popular a:hover .zw-home-popular__arrow,
[dir="ltr"] .zw-home-popular a:focus-visible .zw-home-popular__arrow {
  transform: scaleX(-1);
}

/* A row of services: its name, "Show more" across from it, then four cards. */
.zw-home-row + .zw-home-row {
  margin-top: 4.5rem;
}

.zw-home-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.zw-home-more {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--secondary-color) !important;
  border-radius: var(--zw-pill);
  background-color: transparent;
  color: var(--secondary-color);
  font-size: 0.9375rem;
}

.zw-home-more:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color) !important;
  color: #163300;
}

.zw-home-gigs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem 1.875rem;
}

.zw-home-gig[hidden] {
  display: none;
}

/* Khamsat's "Integrated solutions" in Zadwork's words: buttons side by side, a short last row in the middle. */
.zw-home-solutions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 76rem;
  margin: 0 auto;
}

.zw-home-solutions a {
  display: inline-flex;
  align-items: center;
  min-height: 3.75rem;
  padding: 0 1.25rem;
  border: 1px solid var(--zw-border);
  border-radius: 0.75rem;
  background-color: var(--light-color);
  color: var(--secondary-color);
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.zw-home-solutions a:hover {
  border-color: var(--primary-color);
  background-color: var(--zw-primary-soft);
  color: var(--secondary-color);
}

@media (max-width: 575.98px) {
  .zw-home-solutions a {
    min-height: 3rem;
    padding: 0 1rem;
    font-size: 1rem;
  }
}

/* ---------- Alerts in the site's toast style (dashboard/partials/home-notices) ---------- */

/* A deck at the corner: the first alert in front, the others peeking out behind it; pointing at
   it (or tapping into it) fans them out one above the other. */
.zw-alerts {
  position: fixed;
  inset-inline-start: 1.5rem;
  bottom: 1.5rem;
  z-index: 1050;
  display: grid;
  width: min(24rem, calc(100vw - 2rem));
}

.zw-alerts > .zw-alert {
  grid-area: 1 / 1;
  align-self: end;
  z-index: calc(10 - var(--i, 0));
  transform: translateY(calc(var(--i, 0) * -0.75rem)) scale(calc(1 - var(--i, 0) * 0.05));
  transform-origin: top center;
}

/* The alerts behind: a lighter green edge, their content hidden until the deck opens. */
.zw-alerts > .zw-alert:not(:first-child) {
  background-color: #2b5a0e;
}

.zw-alerts > .zw-alert:not(:first-child) > * {
  visibility: hidden;
}

.zw-alerts:focus:not(:focus-visible) {
  outline: none;
}

.zw-alerts:hover,
.zw-alerts:focus-within {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
}

.zw-alerts:hover > .zw-alert,
.zw-alerts:focus-within > .zw-alert {
  transform: none;
  background-color: #163300;
}

.zw-alerts:hover > .zw-alert > *,
.zw-alerts:focus-within > .zw-alert > * {
  visibility: visible;
}

.zw-alert {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.125rem 1.125rem 1.125rem 1rem;
  border-radius: 1.25rem;
  background-color: #163300;
  color: #fff;
  box-shadow: 0 1.25rem 2.5rem rgba(22, 51, 0, 0.3);
  animation: zw-alert-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  animation-delay: calc(0.6s + var(--i, 0) * 0.25s);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.zw-alert.is-leaving {
  opacity: 0;
  transform: translateY(0.75rem) scale(0.97);
}

.zw-alert__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: #163300;
}

.zw-alert__icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

/* Delivering is sending the work: the send arrow points the way the page reads. */
[dir="rtl"] .zw-alert[data-alert="delivery"] .zw-alert__icon svg {
  transform: scaleX(-1);
}

.zw-alert__body {
  flex: 1;
  min-width: 0;
}

.zw-alert__body b {
  display: block;
  margin-bottom: 0.25rem;
  color: #fff;
  font-size: 1rem;
}

.zw-alert__body p {
  margin: 0 0 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  line-height: 1.6;
}

.zw-alert__body a {
  display: inline-flex;
  padding: 0.4375rem 1rem;
  border-radius: var(--zw-pill);
  background-color: var(--primary-color);
  color: #163300;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.zw-alert__body a:hover {
  background-color: #8edc5c;
  color: #163300;
}

.zw-alert__close {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0 !important;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.125rem;
  line-height: 1;
}

.zw-alert__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

@keyframes zw-alert-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .zw-alert {
    animation: none;
  }
}

@media (max-width: 1199.98px) {
  .zw-home-popular__name {
    font-size: 1.0625rem;
  }
}

@media (max-width: 991.98px) {
  .zw-home-cats {
    --zw-cats-gap: 1.25rem;
    --zw-cats-per-row: 2;
  }

  .zw-home-popular,
  .zw-home-gigs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .zw-home-hero h1 {
    font-size: 2.25rem;
  }
}

@media (max-width: 575.98px) {
  /* One category a row: two would leave the names too small to read on one line. */
  .zw-home-cats {
    --zw-cats-per-row: 1;
  }

  .zw-home-hero {
    min-height: 0;
    padding: 4.5rem 0;
  }

  .zw-home-hero h1 {
    font-size: 1.75rem;
  }

  .zw-home-hero p {
    font-size: 1rem;
  }

  .zw-home-search button {
    padding-inline: 1.25rem;
  }

  .zw-home-section {
    padding: 3.5rem 0;
  }

  .zw-home-section h2.is-centered {
    margin-bottom: 2rem;
    font-size: 1.5rem;
  }

  .zw-home-section h2 {
    font-size: 1.375rem;
  }

  .zw-home-popular,
  .zw-home-gigs {
    grid-template-columns: minmax(0, 1fr);
  }

  .zw-home-popular a {
    min-height: 4.75rem;
  }

  .zw-home-popular__icon {
    width: 3rem;
    height: 3rem;
  }

  .zw-home-popular__arrow {
    opacity: 1;
    transform: none;
  }

  .zw-alerts {
    inset-inline: 1rem;
    bottom: 1rem;
    width: auto;
  }
}

/* ---------- The bar's side menu, as on Khamsat (partials.dashboard.side-menu) ---------- */

/* The menu button beside the logo, at every width. */
.top-nav .contain .hamburger {
  display: block;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  /* Its lines on the page's edge, as Khamsat's, not the button's padding. */
  margin-inline-start: -0.625rem;
  padding: 0;
  border-radius: 0.875rem;
  background: transparent;
  transition: background-color 0.2s ease;
}

.top-nav .contain .hamburger:hover,
.top-nav .contain .hamburger.active {
  background-color: var(--zw-primary-soft);
}

.top-nav .contain .hamburger .line {
  width: 1.5rem;
  margin: 0.3125rem auto;
}

/* Open: the button stays still and its lines cross into an ✕ (0.5rem between their middles). */
.top-nav .contain .hamburger.active {
  transform: none;
  transition-delay: 0s;
}

.top-nav .contain .hamburger.active .line {
  transition-delay: 0s;
}

.top-nav .contain .hamburger.active .line:nth-child(1) {
  transform: translateY(0.5rem) rotate(45deg);
}

.top-nav .contain .hamburger.active .line:nth-child(2) {
  opacity: 0;
}

.top-nav .contain .hamburger.active .line:nth-child(3) {
  transform: translateY(-0.5rem) rotate(-45deg);
}

/* The menu holds the bar's links: on a phone, or a bar too narrow for them, they leave the bar. */
@media (max-width: 992px) {
  .top-nav .contain .top-links,
  .top-nav .contain .top-links.active-nav {
    display: none;
  }
}

@media (min-width: 993px) {
  .top-nav.is-collapsed .contain .top-links,
  .top-nav.is-collapsed .contain .top-links.active-nav {
    display: none;
  }
}

/* The shade over the page while the menu is open. */
.zw-menu-backdrop {
  position: fixed;
  inset: var(--zw-bar-h) 0 0;
  z-index: 1040;
  background-color: rgba(6, 14, 0, 0.35);
  animation: zw-menu-fade 0.25s ease;
}

.zw-menu-backdrop[hidden],
.zw-menu[hidden] {
  display: none;
}

/* The page stays still under the open menu. Locked on html, not body: a body that clips its own
   scroll would carry the sticky bar away with the page (layouts.app). */
html.zw-menu-open:has(.top-nav) {
  overflow: hidden;
}

/* The panel: under the bar, on the logo's side, the height of the window. */
.zw-menu {
  position: fixed;
  top: var(--zw-bar-h);
  bottom: 0;
  inset-inline-start: 0;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  width: min(21rem, 100vw);
  overflow-y: auto;
  background-color: var(--light-color);
  border-inline-end: 1px solid var(--zw-border);
  box-shadow: 0 1.5rem 3rem rgba(6, 14, 0, 0.16);
  animation: zw-menu-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[dir="rtl"] .zw-menu {
  animation-name: zw-menu-in-rtl;
}

.zw-menu__search {
  position: relative;
  display: flex;
  align-items: center;
  margin: 1.25rem 1.25rem 0.5rem;
  border: 1px solid var(--zw-border);
  border-radius: var(--zw-pill);
  background-color: var(--zw-surface);
}

.zw-menu__search:focus-within {
  border-color: var(--primary-color);
}

.zw-menu__search input {
  flex: 1;
  min-width: 0;
  height: 3rem;
  padding: 0 1.25rem;
  border: 0;
  background: transparent;
  color: var(--dark-color);
  outline: none;
}

/* The search button, as the bar's icons: the filled icon, no circle; a soft circle when pointed at. */
.zw-menu__search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-inline-end: 0.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.zw-menu__search button:hover {
  background-color: #eef3ec;
}

.zw-menu__search img {
  width: 1.25rem;
  height: 1.25rem;
}

.zw-menu__list {
  margin: 0;
  padding: 0.5rem 0.75rem 1.5rem;
  list-style: none;
}

/* Each item: a link, or a list folding under its name. */
.zw-menu__list > li > a,
.zw-menu__list summary {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 3.25rem;
  padding: 0 0.875rem;
  border-radius: 0.875rem;
  color: var(--secondary-color);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
  list-style: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.zw-menu__list summary::-webkit-details-marker {
  display: none;
}

.zw-menu__list > li > a:hover,
.zw-menu__list summary:hover,
.zw-menu__list details[open] > summary {
  background-color: var(--zw-primary-soft);
  color: var(--secondary-color);
}

.zw-menu__list .zw-icon,
.zw-menu__list img {
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
}

.zw-menu__list summary > span {
  flex: 1;
}

/* The arrow at the end of a folding item turns down when it opens. */
.zw-menu__list summary > .zw-icon:last-child {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--gray-color);
  transition: transform 0.2s ease;
}

[dir="ltr"] .zw-menu__list summary > .zw-icon:last-child {
  transform: scaleX(-1);
}

.zw-menu__list details[open] > summary > .zw-icon:last-child {
  transform: rotate(-90deg);
}

.zw-menu__list details ul {
  margin: 0.25rem 0 0.5rem;
  padding: 0;
  padding-inline-start: 2.75rem;
  list-style: none;
}

.zw-menu__list details ul a {
  display: block;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  color: var(--gray-color);
  font-size: 0.9375rem;
  text-decoration: none;
}

.zw-menu__list details ul a:hover,
.zw-menu__list details ul a.is-all {
  color: var(--secondary-color);
}

.zw-menu__list details ul a:hover {
  background-color: var(--zw-surface);
}

.zw-menu__badge {
  margin-inline-start: auto;
  min-width: 1.5rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--zw-pill);
  background-color: #e22900;
  color: #fff;
  font-size: 0.75rem;
  text-align: center;
}

/* The cart is in the bar, except on small phones. */
.zw-menu__phone {
  display: none;
}

@keyframes zw-menu-in {
  from {
    opacity: 0;
    transform: translateX(-1.5rem);
  }
}

@keyframes zw-menu-in-rtl {
  from {
    opacity: 0;
    transform: translateX(1.5rem);
  }
}

@keyframes zw-menu-fade {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zw-menu,
  .zw-menu-backdrop {
    animation: none;
  }
}

@media (max-width: 576px) {
  .zw-menu__phone {
    display: list-item;
  }

  .zw-menu {
    width: 100vw;
    border-inline-end: 0;
  }
}

/* ---------- The slim bar, as Khamsat's (partials.dashboard.top-bar; style.css draws the rest) ---------- */

.top-nav {
  padding-block: 0.625rem;
}

.top-nav .contain .brand-name img {
  height: 2.75rem;
}

.top-nav .contain .top-icon,
.top-nav .contain .flex-data .notification-list,
.top-nav .contain .user-account .user-img .avatar,
.top-nav .contain .top-links li a {
  width: auto;
  height: 2.75rem;
}

.top-nav .contain .top-icon,
.top-nav .contain .flex-data .notification-list,
.top-nav .contain .flex-data .ai-chat-toggle,
.top-nav .contain .user-account .user-img .avatar {
  width: 2.75rem;
  height: 2.75rem;
}

/* The icon group: filled icons (side-nav/search, cart, inbox, notifications) on the bar itself, no circles;
   a soft circle shows under the one hovered, open (search, messages, notifications) or of the
   page it leads to. */
.top-nav .contain .top-icon {
  padding: 0;
  border: 0;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.top-nav .contain .top-icon::after {
  display: none;
}

.top-nav .contain .top-icon img {
  width: 1.375rem;
  height: 1.375rem;
  filter: none;
}

.top-nav .contain .top-icon:hover,
.top-nav .contain .top-icon.active,
.top-nav .contain .top-icon[aria-expanded="true"] {
  background-color: #eef3ec;
}

@media (max-width: 576px) {
  .top-nav .contain .top-icon,
  .top-nav .contain .flex-data .notification-list,
  .top-nav .contain .user-account .user-img .avatar {
    width: 2.25rem;
    height: 2.25rem;
  }

  .top-nav .contain .top-icon img {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* The messages menu, as the bell's: each conversation with its sender's photo, name, last message and time. */
.top-nav .contain .messages-menu .dropdown-menu .item .item-icon {
  overflow: hidden;
  background-color: #eef3ec;
}

.top-nav .contain .messages-menu .dropdown-menu .item .item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.top-nav .contain .messages-menu .dropdown-menu .item .item-text b {
  color: var(--dark-color);
  font-size: 0.9375rem;
  font-weight: 700;
}

.top-nav .contain .messages-menu .dropdown-menu .item p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}

.top-nav .contain .messages-menu .dropdown-menu .item.is-unread p {
  color: var(--secondary-color);
  font-weight: 700;
}

.top-nav .contain .messages-menu .dropdown-menu .item .item-text {
  flex: 1;
}


/* ---------- A visitor's header, as Khamsat's (partials.landing.site-header) ---------- */

.landing-header .zw-guest-bar {
  gap: 1.5rem;
  padding-block: 0.75rem;
}

/* The categories panel hangs from the header. */
.landing-header {
  position: sticky;
}

/* On the site's pages the landing frame holds only the header (layouts.app): it must let the
   panel hang out of it, and stick with the header while the page scrolls. */
.landing-page.zw-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;
}

/* The landing frame cuts what sticks out sideways with clip, not hidden: hidden makes it a scroll
   box of its own, and the header then scrolls away with the page instead of staying on top. */
.landing-page:not(.zw-site-header) {
  overflow-x: clip;
  overflow-y: visible;
}

html:has(.landing-header),
html:has(.landing-header) body {
  overflow-x: clip;
  overflow-y: visible;
}

.zw-guest-bar__start,
.zw-guest-bar__end {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* The menu button: three lines that cross into an ✕ while the menu is open. */
.zw-guest-bar__menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3125rem;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  margin-inline-start: -0.625rem;
  padding: 0 0.625rem;
  border: 0 !important;
  border-radius: 0.875rem;
  background: transparent;
  transition: background-color 0.2s ease;
}

.zw-guest-bar__menu:hover,
.zw-guest-bar__menu.active {
  background-color: var(--zw-primary-soft);
}

.zw-guest-bar__menu span {
  display: block;
  height: 0.1875rem;
  border-radius: 1rem;
  background-color: var(--primary-color);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.zw-guest-bar__menu.active span:nth-child(1) {
  transform: translateY(0.5rem) rotate(45deg);
}

.zw-guest-bar__menu.active span:nth-child(2) {
  opacity: 0;
}

.zw-guest-bar__menu.active span:nth-child(3) {
  transform: translateY(-0.5rem) rotate(-45deg);
}

.zw-guest-bar__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--zw-pill);
  color: var(--secondary-color);
  font-weight: 700;
  text-decoration: none;
}

.zw-guest-bar__link:hover {
  background-color: var(--zw-primary-soft);
  color: var(--secondary-color);
}

.zw-guest-bar__link img {
  width: 1.25rem;
  height: 1.25rem;
}

/* Search and cart, as the signed-in bar's icons: filled, no circles; a soft circle under the
   one hovered, and under the search while its bar is open. */
.zw-guest-bar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0 !important;
  border-radius: 50%;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.zw-guest-bar__icon:hover,
.zw-guest-bar__icon[aria-expanded="true"] {
  background-color: #eef3ec;
}

.zw-guest-bar__icon img {
  width: 1.375rem;
  height: 1.375rem;
}

/* "Categories" while its panel is open. */
.zw-guest-bar__link[aria-expanded="true"] {
  background-color: var(--zw-primary-soft);
}

/* Every category and its sub-categories in columns under the header, as Khamsat's panel. */
.zw-guest-cats {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  z-index: 5;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  border-top: 1px solid var(--zw-border);
  background-color: var(--light-color);
  box-shadow: 0 1.25rem 2.5rem rgba(6, 14, 0, 0.12);
}

.zw-guest-cats[hidden] {
  display: none;
}

.zw-guest-cats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 2.5rem;
  padding-block: 2rem 2.5rem;
}

.zw-guest-cats__head {
  display: block;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--zw-border);
  color: var(--secondary-color);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}

.zw-guest-cats ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.zw-guest-cats li a {
  display: block;
  padding: 0.375rem 0;
  color: var(--gray-color);
  text-decoration: none;
}

.zw-guest-cats a:hover {
  color: var(--green-color);
}

@media (max-width: 991.98px) {
  .zw-guest-cats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The search bar under the header. */
.zw-guest-search {
  padding-bottom: 0.875rem;
  background-color: inherit;
}

.zw-guest-search[hidden] {
  display: none;
}

.zw-guest-search__inner {
  position: relative;
  display: flex;
  gap: 0.5rem;
  padding: 0.3125rem;
  border-radius: var(--zw-pill);
  background-color: var(--zw-surface);
}

.zw-guest-search__inner input {
  flex: 1;
  min-width: 0;
  padding: 0 1.25rem;
  border: 0;
  background: transparent;
  color: var(--dark-color);
  outline: none;
}

.zw-guest-search__inner button {
  padding: 0.625rem 2rem;
  border: 0 !important;
  border-radius: var(--zw-pill);
  background-color: var(--primary-color);
  color: #163300;
  font-weight: 700;
}

@media (max-width: 767.98px) {
  .landing-header .zw-guest-bar {
    gap: 0.5rem;
  }

  .zw-guest-bar__start,
  .zw-guest-bar__end {
    gap: 0.375rem;
  }

  /* The old header's phone layout (a column of full-width buttons) does not apply here. */
  .zw-guest-bar__end.landing-header__cta {
    flex-direction: row;
    width: auto;
    margin: 0;
  }

  .zw-guest-bar .landing-header__brand img {
    height: 1.625rem;
  }

  /* On a phone the categories, login and sign-up are in the side menu. */
  .zw-guest-bar__link,
  .zw-guest-bar__end .landing-btn {
    display: none !important;
  }
}

/* ---------- Over a search's services (market/category, a search): Zadwork's bar from the old search page ---------- */

/* The featured categories as chips, in one scrolling line. */
.zw-search-cats {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.zw-search-cats a {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem 0.375rem 0.375rem;
  border: 1px solid var(--zw-border);
  border-radius: var(--zw-pill);
  background-color: var(--light-color);
  color: var(--secondary-color);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}

[dir="rtl"] .zw-search-cats a {
  padding: 0.375rem 0.375rem 0.375rem 1rem;
}

.zw-search-cats a:hover,
.zw-search-cats a.is-active {
  border-color: var(--primary-color);
  background-color: var(--zw-primary-soft);
}

.zw-search-cats img {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0.3125rem;
  border-radius: 50%;
  background-color: var(--zw-surface);
}

/* The searched words as a chip, and the number of results. */
.zw-search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1.75rem;
}

/* A visitor's empty cart (market/cart), as Khamsat's. */
.zw-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 3rem 1.5rem;
  border: 1px solid var(--zw-border);
  border-radius: var(--zw-radius);
  background-color: var(--light-color);
  text-align: center;
}

.zw-cart-empty h2 {
  margin: 0;
  color: var(--secondary-color);
  font-size: 1.375rem;
}

/* ---------- A main category's own page, as Khamsat's /data-services (market/category-page) ---------- */

/* As Khamsat's: calm, the text in regular weight and dark, wide bands of white and grey, flat tiles. */
.zw-catpage .zw-home-section {
  padding: 5.5rem 0;
}

/* Wide, as Khamsat's page, with room at the sides on every screen. */
.zw-catpage .container {
  max-width: 90rem;
  padding-inline: 2rem;
}

.zw-catpage .zw-home-section h2.is-centered {
  margin-bottom: 3rem;
  color: var(--dark-color);
  font-size: 2rem;
  font-weight: 500;
}

.zw-catpage__hero {
  padding: 5rem 0;
  text-align: center;
}

.zw-catpage__hero h1 {
  margin: 0 0 1.25rem;
  color: var(--dark-color);
  font-size: 2.75rem;
  font-weight: 500;
}

.zw-catpage__hero p {
  max-width: 44rem;
  margin: 0 auto 2rem;
  color: var(--dark-color);
  font-size: 1.125rem;
  line-height: 1.8;
}

.zw-catpage__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.zw-catpage__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.875rem;
  padding: 0 1.25rem;
  border: 1px solid var(--dark-color);
  border-radius: 0.375rem;
  color: var(--dark-color);
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.zw-catpage__btn:hover {
  background-color: var(--zw-surface);
  color: var(--dark-color);
}

.zw-catpage__btn.is-primary,
.zw-catpage__btn.is-primary:hover {
  color: #163300; /* the dark green on the light green, in both themes */
}

.zw-catpage__btn.is-primary {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
}

.zw-catpage__btn.is-primary:hover {
  border-color: #8edb5e;
  background-color: #8edb5e;
}

.zw-catpage__btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* The popular sub-categories: four in a row on one grid, flat white tiles of one height, each its
   icon and name (two lines at most). */
.zw-catpage__tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.zw-catpage__tiles a {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 5.5rem;
  padding: 0 1.5rem;
  border-radius: 0.25rem;
  background-color: var(--light-color);
  color: var(--dark-color);
  font-size: 1.0625rem;
  line-height: 1.5;
  text-decoration: none;
  transition: box-shadow 0.2s ease;
}

.zw-catpage__tiles a > span:last-child {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.zw-catpage__tiles a:hover {
  color: var(--dark-color);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.06);
}

.zw-catpage__icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--dark-color);
}

.zw-catpage__icon .zw-category-icon {
  width: 2.125rem;
  height: 2.125rem;
}

/* The groups: four columns, each its heading and its sub-categories. */
.zw-catpage__groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3rem 2rem;
}

.zw-catpage__groups h3 {
  margin: 0 0 1.25rem;
  color: var(--dark-color);
  font-size: 1.5rem;
  font-weight: 500;
}

.zw-catpage__groups ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.zw-catpage__groups li + li {
  margin-top: 0.75rem;
}

.zw-catpage__groups a {
  color: var(--dark-color);
  font-size: 1.0625rem;
  text-decoration: none;
}

.zw-catpage__groups a:hover {
  color: var(--green-color);
}

/* The articles: a row of four, each its picture and title. */
.zw-catpage__articles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.zw-catpage__articles a {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--dark-color);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-decoration: none;
}

.zw-catpage__articles a:hover {
  color: var(--green-color);
}

.zw-catpage__articles img,
.zw-catpage__article-blank {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.zw-catpage__article-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--zw-primary-soft);
  color: var(--dark-color);
}

.zw-catpage__article-blank .zw-category-icon {
  width: 3rem;
  height: 3rem;
}

/* The questions: each opens under itself. */
.zw-catpage__faqs {
  max-width: 60rem;
  margin: 0 auto;
}

.zw-catpage__faqs details {
  border-bottom: 1px solid var(--zw-border);
}

.zw-catpage__faqs summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
  color: var(--dark-color);
  font-size: 1.25rem;
  list-style: none;
  cursor: pointer;
}

.zw-catpage__faqs summary::-webkit-details-marker {
  display: none;
}

.zw-catpage__faqs summary svg {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 1.5;
  transition: transform 0.2s ease;
}

.zw-catpage__faqs details[open] summary {
  color: var(--gray-color);
}

.zw-catpage__faqs details[open] summary svg {
  transform: rotate(180deg);
}

.zw-catpage__faqs p {
  margin: 0;
  padding: 0 0 1.5rem;
  color: var(--dark-color);
  font-size: 1.0625rem;
  line-height: 2;
}

/* The related services, as flat chips. */
.zw-catpage__related {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.zw-catpage__related a {
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--zw-border);
  border-radius: 0.25rem;
  background-color: var(--light-color);
  color: var(--dark-color);
  font-size: 1rem;
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.zw-catpage__related a:hover {
  border-color: var(--dark-color);
  color: var(--dark-color);
}

@media (max-width: 1199.98px) {
  .zw-catpage__tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .zw-catpage .zw-home-section {
    padding: 4.5rem 0;
  }

  .zw-catpage__tiles,
  .zw-catpage__groups,
  .zw-catpage__articles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .zw-catpage .zw-home-section {
    padding: 3.5rem 0;
  }

  .zw-catpage .container {
    padding-inline: 1rem;
  }

  .zw-catpage .zw-home-section h2.is-centered {
    margin-bottom: 2rem;
    font-size: 1.5rem;
  }

  .zw-catpage__hero {
    padding: 3.5rem 0;
  }

  .zw-catpage__hero h1 {
    font-size: 2rem;
  }

  .zw-catpage__tiles,
  .zw-catpage__articles {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .zw-catpage__tiles a {
    height: 4.5rem;
  }

  .zw-catpage__groups {
    gap: 2rem 1.25rem;
  }

  .zw-catpage__groups h3 {
    font-size: 1.25rem;
  }

  .zw-catpage__faqs summary {
    padding: 1.25rem 0;
    font-size: 1.0625rem;
  }
}

/* ---------- An article written in the console (article-details, "body_html"): as the other articles' text ---------- */

.article-details__md {
  font-family: 'Almarai', 'Tajawal', sans-serif;
  color: #5a5b5b;
  font-size: 1rem;
  line-height: 1.9;
}

.article-details__md h1,
.article-details__md h2,
.article-details__md h3,
.article-details__md h4 {
  margin: 2rem 0 0.875rem;
  color: #141414;
  font-weight: 700;
  line-height: 1.5;
}

.article-details__md h1,
.article-details__md h2 {
  font-size: 1.5rem;
}

.article-details__md h3,
.article-details__md h4 {
  font-size: 1.25rem;
}

.article-details__md > :first-child {
  margin-top: 0;
}

.article-details__md p,
.article-details__md ul,
.article-details__md ol,
.article-details__md blockquote {
  margin: 0 0 1.25rem;
}

.article-details__md ul,
.article-details__md ol {
  padding-inline-start: 1.5rem;
}

.article-details__md ul {
  list-style: disc;
}

.article-details__md ol {
  list-style: decimal;
}

.article-details__md li + li {
  margin-top: 0.375rem;
}

.article-details__md strong {
  color: #141414;
}

.article-details__md a {
  color: var(--green-color);
  text-decoration: underline;
}

.article-details__md blockquote {
  padding-inline-start: 1rem;
  border-inline-start: 4px solid var(--primary-color);
}

@media (max-width: 768px) {
  .article-details__md h1,
  .article-details__md h2 {
    font-size: 1.25rem;
  }
}

/* ---------- A select in the site's own look (partials.combo-select), as Khamsat's seller-country field ---------- */

.zw-combo {
  position: relative;
}

.zw-combo__input {
  width: 100%;
  cursor: pointer;
}

.zw-combo.is-open .zw-combo__input {
  cursor: text;
}

.zw-combo__list {
  position: absolute;
  top: calc(100% + 0.375rem);
  inset-inline: 0;
  z-index: 30;
  max-height: 17.5rem;
  margin: 0;
  padding: 0.375rem;
  overflow-y: auto;
  border: 1px solid var(--zw-border);
  border-radius: 1rem;
  background-color: var(--light-color);
  box-shadow: 0 0.75rem 2rem rgba(22, 51, 0, 0.12);
  list-style: none;
  scrollbar-width: thin;
}

.zw-combo__list li {
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  color: var(--dark-color);
  font-size: 0.9375rem;
  cursor: pointer;
}

.zw-combo__list li.is-active {
  background-color: var(--zw-surface);
}

.zw-combo__list li[aria-selected="true"] {
  background-color: var(--zw-primary-soft);
  color: var(--secondary-color);
  font-weight: 700;
}

.zw-combo__list .zw-combo__empty {
  color: var(--gray-color);
  cursor: default;
}

/* ---------- "How does Zadwork work?" (how-work) in the site's frame: the bar is in the page's flow, so no room kept for it ---------- */

.welcome-section {
  padding-top: 1.5rem;
}

/* ---------- A business solution's page, as Khamsat's "Digital transformation solutions" (market/solution) ---------- */

/* Its bands use the category page's (zw-catpage); a line under each heading, and four ways to show services. */
.zw-catpage .zw-home-section h2.is-centered:has(+ .zw-solution__lead) {
  margin-bottom: 1rem;
}

.zw-solution__lead {
  max-width: 44rem;
  margin: 0 auto 3rem;
  color: var(--dark-color);
  font-size: 1.0625rem;
  text-align: center;
}

.zw-solution__items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.zw-solution__items a {
  color: var(--dark-color);
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.zw-solution__items a:hover {
  color: var(--dark-color);
}

.zw-solution__name {
  font-size: 1.125rem;
  line-height: 1.5;
}

.zw-solution__icon {
  display: inline-flex;
  color: var(--dark-color);
}

/* Icons: a large icon over the name, on the band itself. */
.zw-solution__items.is-icons a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  text-align: center;
}

.zw-solution__items.is-icons .zw-category-icon {
  width: 4.5rem;
  height: 4.5rem;
  transition: transform 0.2s ease;
}

.zw-solution__items.is-icons a:hover .zw-category-icon {
  transform: translateY(-4px);
}

.zw-solution__items.is-icons .zw-solution__name {
  font-size: 1.25rem;
}

/* Cards: white, the icon beside the name. */
.zw-solution__items.is-cards a {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 5.5rem;
  padding: 0 1.5rem;
  border-radius: 0.25rem;
  background-color: var(--light-color);
}

.zw-solution__items.is-cards a:hover {
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.06);
}

.zw-solution__items.is-cards .zw-category-icon {
  width: 2.25rem;
  height: 2.25rem;
}

/* Tiles: grey, the icon over the name. */
.zw-solution__items.is-tiles a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 10rem;
  padding: 1.5rem;
  border-radius: 0.25rem;
  background-color: #efefef;
  text-align: center;
}

.zw-solution__items.is-tiles a:hover {
  background-color: #e7ebe5;
}

.zw-solution__items.is-tiles .zw-category-icon {
  width: 3rem;
  height: 3rem;
}

.zw-solution__items.is-tiles .zw-solution__name {
  font-size: 1.25rem;
}

/* Photos: the name in white on a darkened photo. */
.zw-solution__items.is-photos a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 1.5rem;
  border-radius: 0.25rem;
  background-color: #163300;
  text-align: center;
}

.zw-solution__items.is-photos img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.zw-solution__items.is-photos a::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  transition: background-color 0.3s ease;
}

.zw-solution__items.is-photos a:hover img {
  transform: scale(1.05);
}

.zw-solution__items.is-photos a:hover::after {
  background-color: rgba(0, 0, 0, 0.6);
}

.zw-solution__items.is-photos .zw-solution__icon {
  position: absolute;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  z-index: 1;
  color: #9fe870;
}

.zw-solution__items.is-photos .zw-solution__icon .zw-category-icon {
  width: 2rem;
  height: 2rem;
}

.zw-solution__items.is-photos .zw-solution__name {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 1.5rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1199.98px) {
  .zw-solution__items.is-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .zw-solution__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .zw-solution__lead {
    margin-bottom: 2rem;
    font-size: 1rem;
  }

  .zw-solution__items {
    gap: 0.75rem;
  }

  .zw-solution__items.is-cards,
  .zw-solution__items.is-photos {
    grid-template-columns: minmax(0, 1fr);
  }

  .zw-solution__items.is-cards a {
    height: 4.5rem;
  }

  .zw-solution__items.is-icons .zw-category-icon {
    width: 3.25rem;
    height: 3.25rem;
  }

  .zw-solution__items.is-icons .zw-solution__name,
  .zw-solution__items.is-tiles .zw-solution__name {
    font-size: 1.0625rem;
  }

  .zw-solution__items.is-tiles a {
    min-height: 8rem;
  }

  .zw-solution__items.is-photos .zw-solution__name {
    font-size: 1.25rem;
  }
}

/* Cards on a white band are grey, so they stand out as on a grey band. */
.zw-solution .zw-home-section:not(.is-muted) .zw-solution__items.is-cards a {
  background-color: var(--zw-surface);
}
