/* =====================================================================
   Post an ad (MyAds/Create). Built on the site tokens in rs-theme.css:
   the mock-up's gold accents map to Racing Red / Signal Red.
   ===================================================================== */

/* ---------- Layout: form + aside ---------- */
.rs-ad-page { padding-bottom: 8px; }
.rs-ad-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}
.rs-ad-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rs-ad-aside { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Stepper ---------- */
.rs-stepper {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 18px 12px 14px;
  border: 1px solid var(--rs-border);
  border-radius: var(--rs-radius-lg);
  background: var(--rs-card-bg);
  counter-reset: none;
}
.rs-stepper__item { position: relative; }
.rs-stepper__item + .rs-stepper__item::before {     /* connector line */
  content: "";
  position: absolute;
  top: 17px;
  inset-inline-end: calc(50% + 24px);
  width: calc(100% - 48px);
  height: 2px;
  background: var(--rs-line);
}
.rs-stepper__item.is-done + .rs-stepper__item::before,
.rs-stepper__item.is-done + .rs-stepper__item.is-current::before { background: var(--rs-racing-red); }
.rs-stepper__btn {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0; border: 0; background: none;
  color: var(--rs-text-muted);
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer;
}
.rs-stepper__num {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border: 2px solid var(--rs-line);
  border-radius: 50%;
  background: var(--rs-surface-2);
  color: var(--rs-text-secondary);
  font-family: var(--rs-font-latin);
  font-size: 16px; font-weight: 600;
  transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.rs-stepper__num > * { grid-area: 1 / 1; }
.rs-stepper__check { display: none; font-size: 18px; }
.rs-stepper__label { position: relative; padding-bottom: 6px; text-align: center; line-height: 1.3; }
.rs-stepper__item.is-current .rs-stepper__num {
  background: var(--rs-primary-gradient);
  border-color: var(--rs-signal-red);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(215, 25, 32, .2);
}
.rs-stepper__item.is-current .rs-stepper__label { color: var(--rs-text); }
.rs-stepper__item.is-current .rs-stepper__label::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; border-radius: 2px; background: var(--rs-racing-red);
}
.rs-stepper__item.is-done .rs-stepper__num { background: var(--rs-racing-red); border-color: var(--rs-racing-red); color: #fff; }
.rs-stepper__item.is-done .rs-stepper__digit { display: none; }
.rs-stepper__item.is-done .rs-stepper__check { display: block; }
.rs-stepper__btn:hover .rs-stepper__label { color: var(--rs-text); }

/* ---------- Photos ---------- */
.rs-upload { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; }
.rs-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 200px;
  padding: 18px;
  border: 2px dashed var(--rs-line);
  border-radius: var(--rs-radius-lg);
  background: var(--rs-dropzone-bg);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.rs-dropzone:hover, .rs-dropzone.is-over { border-color: var(--rs-signal-red); background: rgba(215, 25, 32, .06); }
.rs-dropzone:focus-within { box-shadow: var(--rs-focus-ring); }
.rs-dropzone__icon { font-size: 40px; line-height: 1; color: var(--rs-text); }
.rs-dropzone__title { font-size: 14.5px; font-weight: 800; color: var(--rs-text); }
.rs-dropzone__hint { font-size: 12px; color: var(--rs-text-muted); }
.rs-dropzone__btn { margin-top: 6px; height: 38px; padding: 0 18px; font-size: 14px; pointer-events: none; }

.rs-thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-content: start; }
.rs-thumbs:empty { display: none; }
.rs-upload:has(.rs-thumbs:empty) { grid-template-columns: minmax(0, 1fr); }
.rs-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--rs-border-strong);
  border-radius: var(--rs-radius-md);
  overflow: hidden;
  background: var(--rs-surface-2);
}
.rs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-thumb__remove {
  position: absolute; top: 6px; inset-inline-end: 6px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(11, 11, 12, .75);
  color: #fff; font-size: 14px; cursor: pointer;
}
.rs-thumb__remove:hover { background: var(--rs-racing-red); }
.rs-thumb__cover {
  position: absolute; bottom: 6px; inset-inline-start: 6px;
  padding: 2px 8px;
  border-radius: var(--rs-radius-xs);
  background: var(--rs-racing-red);
  color: #fff; font-size: 11px; font-weight: 800;
}
.rs-video-field { margin-top: 16px; }

/* ---------- Contact ---------- */
.rs-ad-contact { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr); gap: 14px 18px; align-items: end; }
.rs-ad-contact .rs-field { margin: 0; }
.rs-ad-contact__show { height: 42px; white-space: nowrap; }
.rs-phone { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 8px; }
.rs-phone__code { position: relative; }
.rs-phone__code img { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); width: 22px; height: 16px; border-radius: 2px; object-fit: cover; pointer-events: none; }
.rs-phone__code .rs-control { padding-left: 42px; padding-right: 26px; font-family: var(--rs-font-latin); background-position: right 10px center; }
.rs-phone .rs-control { font-family: var(--rs-font-latin); letter-spacing: .04em; }

/* ---------- Prev / Next ---------- */
.rs-ad-nav { display: flex; justify-content: space-between; gap: 14px; }
html[dir="rtl"] .rs-ad-nav { flex-direction: row-reverse; }   /* Previous left, Next right, as in the design */
.rs-ad-nav .rs-btn { height: 46px; font-size: 16px; }
.rs-ad-nav__prev { flex: 0 0 200px; }
.rs-ad-nav__next { flex: 0 1 360px; }
.rs-ad-nav__prev:disabled { opacity: .45; cursor: not-allowed; }
html[dir="rtl"] .rs-flip { display: inline-block; }
html[dir="ltr"] .rs-flip { transform: scaleX(-1); }

/* ---------- Aside: fees ---------- */
.rs-fee-options { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; border: 0; }
.rs-fee {
  position: relative;
  display: grid; justify-items: center; gap: 2px;
  padding: 14px 12px 12px;
  border: 1px solid var(--rs-border-strong);
  border-radius: var(--rs-radius-lg);
  background: var(--rs-bg);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.rs-fee:hover { border-color: var(--rs-silver); }
.rs-fee__name { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 800; color: var(--rs-text-secondary); }
.rs-fee__name i { color: var(--rs-signal-red); }
.rs-fee__amount { font-family: var(--rs-font-latin); font-weight: 600; font-size: 17px; color: var(--rs-text-secondary); }
.rs-fee__amount strong { font-family: var(--rs-font-display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--rs-price); }
.rs-fee__per { font-size: 12px; color: var(--rs-text-muted); }
.btn-check:checked + .rs-fee {
  border-color: var(--rs-racing-red);
  background: linear-gradient(180deg, rgba(215,25,32,.14), rgba(215,25,32,.03));
  box-shadow: 0 0 0 1px var(--rs-racing-red);
}
.btn-check:checked + .rs-fee::after {
  content: "\F26E";  /* bi-check-lg */
  font-family: "bootstrap-icons";
  position: absolute; top: 8px; inset-inline-end: 10px;
  width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 50%; background: var(--rs-racing-red); color: #fff; font-size: 13px;
}
.btn-check:checked + .rs-fee .rs-fee__name { color: var(--rs-text); }
.btn-check:focus-visible + .rs-fee { box-shadow: var(--rs-focus-ring); }

.rs-benefits__featured { display: none !important; color: var(--rs-text); font-weight: 700; }
.rs-benefits__featured i { border-color: var(--rs-racing-red); color: var(--rs-signal-red); }
.rs-ad-form:has(#rsAdType_featured:checked) .rs-benefits__featured { display: flex !important; }

.rs-edit-type { display: flex; justify-content: space-between; align-items: center; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--rs-racing-red); border-radius: var(--rs-radius-md); }
.rs-edit-type span { color: var(--rs-text-muted); font-size: 13px; }
.rs-thumb--current img { filter: saturate(.85); }

/* ---------- Aside: live preview ---------- */
.rs-preview-card { pointer-events: none; }
.rs-preview-card .rs-motorcycle-card__media { aspect-ratio: 4 / 3; }
.rs-preview-card__placeholder {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 6px;
  color: var(--rs-text-subtle); font-size: 12.5px;
  background: var(--rs-surface-2);
}
.rs-preview-card__placeholder i { font-size: 32px; }
.rs-preview-card__badge {
  position: absolute; top: 8px; inset-inline-start: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: var(--rs-radius-sm);
  background: var(--rs-primary-gradient);
  color: #fff; font-size: 12px; font-weight: 800;
}
.rs-preview-card .rs-fav-btn { display: inline-flex; }
.rs-preview-card .rs-motorcycle-card__body { padding-bottom: 12px; }
.rs-preview-card__cta { width: 100%; height: 40px; margin-top: 4px; font-size: 14px; direction: var(--rs-text-dir); }
.rs-preview-card__cta i { font-size: 18px; }

/* ---------- Feature strip ---------- */
.rs-ad-features { margin-top: 40px; border-top: 1px solid var(--rs-divider); background: var(--rs-strip-bg); }
.rs-ad-features__list {
  list-style: none;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 auto; padding-block: 30px;
}
.rs-ad-features__list li {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 4px 14px;
  text-align: center;
}
.rs-ad-features__list li + li { border-inline-start: 1px solid var(--rs-divider); }
.rs-ad-features__list i, .rs-ad-features__list .rs-icon { font-size: 32px; line-height: 1; color: var(--rs-signal-red); margin-bottom: 4px; }
.rs-ad-features__list strong { font-size: 16px; font-weight: 800; color: var(--rs-text); }
.rs-ad-features__list span { font-size: 12.5px; color: var(--rs-text-muted); line-height: 1.6; }
.rs-ad-features + .rs-footer { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  .rs-ad-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .rs-ad-contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rs-ad-contact .rs-field:first-child { grid-column: 1 / -1; }
}
@media (max-width: 991.98px) {
  .rs-ad-layout { grid-template-columns: minmax(0, 1fr); }
  .rs-ad-aside { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-ad-preview { grid-column: 1 / -1; max-width: 360px; justify-self: center; width: 100%; }
  .rs-ad-features__list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
  .rs-ad-features__list li:nth-child(4) { border-inline-start: 0; }
}
@media (max-width: 767.98px) {
  .rs-upload { grid-template-columns: minmax(0, 1fr); }
  .rs-dropzone { min-height: 160px; }
  .rs-ad-aside { grid-template-columns: minmax(0, 1fr); }
  .rs-stepper { padding: 14px 4px 10px; }
  .rs-stepper__btn { font-size: 12px; }
  .rs-stepper__item + .rs-stepper__item::before { inset-inline-end: calc(50% + 20px); width: calc(100% - 40px); }
}
@media (max-width: 575.98px) {
  .rs-ad-contact { grid-template-columns: minmax(0, 1fr); }
  .rs-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-ad-nav__prev { flex-basis: 120px; }
  .rs-ad-nav__next { flex: 1 1 auto; }
  .rs-ad-features__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-ad-features__list li:nth-child(odd) { border-inline-start: 0; }
  .rs-ad-features__list li:nth-child(4) { border-inline-start: 1px solid var(--rs-divider); }
  .rs-ad-features__list li:last-child { grid-column: 1 / -1; }
}
