/*
 * Rencarso booking — and the site's green.
 *
 * Its own file on purpose: style.css is generated from the approved prototype and a sync would
 * silently drop anything written into it (see CLAUDE.md). Everything here builds on the theme's own
 * tokens — fonts, radii, spacing, the red accent — and adds one colour: the logo's green, darkened
 * until white text on it passes WCAG AA (5.0:1; the logo's own #27c342 is 2.3:1).
 *
 * Colour roles, the usual rental-site split:
 *   green  — go: every primary button, done steps, a confirmed booking
 *   red    — the brand: the step you are on, prices, headline accents
 *   white  — the page
 */

:root {
  --rc-go: #178033;
  --rc-go-dark: #126a2a;
  --rc-go-soft: #eaf5ed;
  --rc-brand-green: #27c342;
  --rc-stop-soft: #fcebed;
}

/* ---------------------------------------------------------------- the site's primary button */

.btn--primary {
  background: var(--rc-go);
  color: #fff;
}
.btn--primary:hover {
  background: var(--rc-go-dark);
}

/* The logo's green–white–red line, under the header. */
.header {
  position: relative;
}
.header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rc-brand-green) 0 33.33%, var(--color-paper) 33.33% 66.66%, var(--color-accent) 66.66% 100%);
}

/* ---------------------------------------------------------------- the steps, as Rencarso's wizard shows them */

.rc-steps-wrap {
  padding-block: var(--spacing-8) var(--spacing-6);
}
.rc-steps {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.rc-steps__item {
  flex: 1 1 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}
/* The line between dots: drawn from each dot back to the one before it. */
.rc-steps__item + .rc-steps__item::before {
  content: "";
  position: absolute;
  top: 1rem;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--color-line);
  z-index: 0;
}
.rc-steps__item.is-done + .rc-steps__item::before,
.rc-steps__item.is-done + .rc-steps__item.is-done::before {
  background: var(--rc-go);
}
.rc-steps__link {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-2);
  color: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
}
a.rc-steps__link,
button.rc-steps__link {
  cursor: pointer;
}
.rc-steps__dot {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  background: var(--color-paper);
  border: 2px solid var(--color-line);
  color: var(--color-muted);
  transition: transform .15s var(--ease-in-out), box-shadow .15s var(--ease-in-out);
}
.rc-steps__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  line-height: 1.25;
}
.is-done .rc-steps__dot {
  background: var(--rc-go);
  border-color: var(--rc-go);
  color: #fff;
}
.is-done .rc-steps__label {
  color: var(--color-ink);
}
.is-current .rc-steps__dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-ink);
  box-shadow: 0 0 0 4px var(--rc-stop-soft);
}
.is-current .rc-steps__label {
  color: var(--color-ink);
  font-weight: 700;
}
a.rc-steps__link:hover .rc-steps__dot,
button.rc-steps__link:hover .rc-steps__dot {
  transform: scale(1.08);
  box-shadow: 0 0 0 4px var(--rc-go-soft);
}
a.rc-steps__link:focus-visible,
button.rc-steps__link:focus-visible {
  outline: 2px solid var(--rc-go);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}
/* On a phone the dots stay and only the current step says its name. */
@media (max-width: 699px) {
  .rc-steps__item:not(.is-current) .rc-steps__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .rc-steps__item.is-current .rc-steps__label {
    white-space: nowrap;
  }
}

/* ---------------------------------------------------------------- steps 3–6: a step beside what you chose */

.rc-checkout {
  display: grid;
  gap: var(--spacing-6);
  padding-bottom: var(--spacing-16);
}
@media (min-width: 960px) {
  .rc-checkout {
    grid-template-columns: minmax(0, 1fr) 22rem;
    align-items: start;
  }
  .rc-checkout__aside {
    position: sticky;
    top: var(--spacing-6);
  }
}
/* On a phone, what you chose comes first. */
@media (max-width: 959px) {
  .rc-checkout__aside {
    order: -1;
  }
}

.rc-panel {
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: var(--spacing-6);
}
.rc-panel + .rc-panel {
  margin-top: var(--spacing-6);
}
.rc-panel__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 var(--spacing-2);
}
.rc-panel__lede {
  color: var(--color-muted);
  margin: 0 0 var(--spacing-6);
}

/* The summary card */
.rc-summary {
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 24px #0e10130f;
}
.rc-summary__media {
  background: var(--color-surface);
  aspect-ratio: 16 / 9;
}
.rc-summary__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rc-summary__body {
  padding: var(--spacing-4) var(--spacing-6) var(--spacing-6);
}
.rc-summary__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 0 0 var(--spacing-3);
}
.rc-summary__title span {
  color: var(--color-muted);
  font-weight: 400;
}
.rc-trip {
  display: grid;
  gap: var(--spacing-3);
  margin: 0 0 var(--spacing-4);
  padding: 0;
  list-style: none;
}
.rc-trip li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--spacing-3);
  align-items: start;
}
.rc-trip__pin {
  width: .75rem;
  height: .75rem;
  border-radius: var(--radius-full);
  margin-top: .3rem;
  border: 2px solid var(--rc-go);
}
.rc-trip li + li .rc-trip__pin {
  border-color: var(--color-accent);
}
.rc-trip__what {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-muted);
}
.rc-trip__where {
  display: block;
  font-weight: 600;
}
.rc-trip__when {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* Money */
.rc-lines {
  display: grid;
  gap: var(--spacing-2);
  margin: 0;
  padding: var(--spacing-4) 0 0;
  border-top: 1px solid var(--color-line);
}
.rc-lines__row {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-4);
  font-size: var(--text-sm);
}
.rc-lines__row dt {
  color: var(--color-muted);
}
.rc-lines__row dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.rc-lines__row--total {
  margin-top: var(--spacing-2);
  padding-top: var(--spacing-3);
  border-top: 1px solid var(--color-line);
  font-size: var(--text-lg);
}
.rc-lines__row--total dt {
  color: var(--color-ink);
  font-weight: 700;
}
.rc-lines__row--total dd {
  color: var(--color-accent);
  font-weight: 900;
}
.rc-note {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin: var(--spacing-3) 0 0;
}

/* ---------------------------------------------------------------- step 3: extras as choices */

.rc-extras {
  display: grid;
  gap: var(--spacing-3);
}
.rc-extra {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--spacing-4);
  align-items: center;
  border: 2px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--spacing-4);
  cursor: pointer;
  transition: border-color .15s var(--ease-in-out), background-color .15s var(--ease-in-out);
}
.rc-extra:hover {
  border-color: var(--color-muted);
}
.rc-extra:has(input:checked),
.rc-extra.is-on {
  border-color: var(--rc-go);
  background: var(--rc-go-soft);
}
.rc-extra.is-locked {
  cursor: default;
}
.rc-extra input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--rc-go);
}
.rc-extra__name {
  display: block;
  font-weight: 700;
}
.rc-extra__desc {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.rc-extra__badge {
  display: inline-block;
  margin-left: var(--spacing-2);
  padding: .125rem .5rem;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  vertical-align: middle;
}
.rc-extra__price {
  font-weight: 700;
  white-space: nowrap;
  text-align: right;
}
.rc-extra__per {
  display: block;
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-muted);
}
.rc-qty {
  width: 4.5rem;
  font: inherit;
  text-align: center;
  padding: .5rem;
  border: 2px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-paper);
}

/* ---------------------------------------------------------------- step 4: the renter */

.rc-form {
  display: grid;
  gap: var(--spacing-4);
}
@media (min-width: 700px) {
  .rc-form {
    grid-template-columns: 1fr 1fr;
  }
  .rc-form .rc-form__wide {
    grid-column: 1 / -1;
  }
}

/* ---------------------------------------------------------------- the way on and back */

.rc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-3);
  margin-top: var(--spacing-8);
  padding-top: var(--spacing-6);
  border-top: 1px solid var(--color-line);
}
.rc-actions .btn--primary {
  min-width: 12rem;
}
.rc-pay {
  font-size: var(--text-lg);
  padding: 1.125rem 2rem;
}

/* ---------------------------------------------------------------- the way back from the bank */

.rc-result {
  text-align: center;
  padding: var(--spacing-8) var(--spacing-6);
}
.rc-result__icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto var(--spacing-4);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}
.rc-result--ok .rc-result__icon {
  background: var(--rc-go-soft);
  color: var(--rc-go);
}
.rc-result--fail .rc-result__icon {
  background: var(--rc-stop-soft);
  color: var(--color-accent);
}
.rc-result__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 900;
  margin: 0 0 var(--spacing-2);
}
.rc-result__text {
  color: var(--color-muted);
  margin: 0 auto;
  max-width: 32rem;
}
.rc-result .rc-actions {
  justify-content: center;
}

/* On a phone the price goes under the name, so the name keeps the width. */
@media (max-width: 519px) {
  .rc-extra {
    grid-template-columns: auto 1fr;
    row-gap: var(--spacing-1);
  }
  .rc-extra__price {
    grid-column: 2;
    text-align: left;
  }
  .rc-extra__per {
    display: inline;
    margin-left: var(--spacing-1);
  }
}


/* ---------------------------------------------------------------- "Сите возила": one section per kind */

.rc-listing-section {
  padding-top: var(--spacing-12);
}
.rc-listing-head {
  margin-bottom: var(--spacing-6);
}
.rc-listing-head .section__title {
  margin: 0 0 var(--spacing-2);
}
.rc-listing-head__lede {
  color: var(--color-muted);
  margin: 0;
}

/* A car chosen on the listing, waiting for its dates. */
.rc-wanted {
  margin: 0 0 var(--spacing-4);
  padding: var(--spacing-3) var(--spacing-4);
  border-radius: var(--radius-md);
  background: var(--rc-go-soft);
  border-left: 4px solid var(--rc-go);
}

/* ---------------------------------------------------------------- "Ново во понудата": one card at a time */

.rc-featured {
  position: relative;
}
.rc-featured__slide[hidden] {
  display: none;
}
.rc-featured__slide:not([hidden]) {
  animation: rc-featured-in .4s var(--ease-in-out);
}
@keyframes rc-featured-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .rc-featured__slide:not([hidden]) {
    animation: none;
  }
}
.car-card__media {
  position: relative;
}
.rc-featured__badge {
  position: absolute;
  top: var(--spacing-3);
  left: var(--spacing-3);
  padding: .25rem .625rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}
.rc-featured__badge--rent {
  background: var(--rc-go);
}
.rc-featured__badge--sale {
  background: var(--color-accent);
}
.rc-featured__badge--reserved {
  background: var(--color-ink);
}
.rc-featured__dots {
  display: flex;
  justify-content: center;
  gap: var(--spacing-2);
  margin-top: var(--spacing-4);
}
.rc-featured__dot {
  width: .625rem;
  height: .625rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--color-night-line);
  cursor: pointer;
  transition: width .2s var(--ease-in-out), background-color .2s var(--ease-in-out);
}
.rc-featured__dot[aria-current="true"] {
  width: 1.75rem;
  background: var(--color-paper);
}
.rc-featured__dot:focus-visible {
  outline: 2px solid var(--rc-brand-green);
  outline-offset: 3px;
}

/* The home page's search from Rencarso: as many columns as it has fields, since a fleet of one type
   has no type select and one price has no price select. */
@media (min-width: 900px) {
  .rc-search--1 { grid-template-columns: 1fr auto; }
  .rc-search--2 { grid-template-columns: repeat(2, 1fr) auto; }
}

/* The price slider (home search and "Сите возила"): the green thumb and track, the current limit
   beside the label, the fleet's cheapest and dearest daily price under the ends. */
.rc-price__head {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-2);
}
.rc-price__value {
  color: var(--color-ink);
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--text-sm);
}
.rc-price__track {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
}
.rc-price input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--rc-go);
  cursor: pointer;
}
.rc-price input[type="range"]:focus-visible {
  outline: 2px solid var(--rc-go);
  outline-offset: 4px;
}
.rc-price__ends {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-muted);
}
/* In the search card the slider takes a select's height, so the labels and the button line up; the
   current limit beside the label says all the end labels would. */
.searchbar__card .rc-price__track {
  min-height: var(--control-h);
}
.searchbar__card .rc-price__ends {
  display: none;
}

/* A listing with nothing to filter (one car, or cars alike in every way) has no rail: the cards take
   the whole width, in either design. */
.listing.listing--bare {
  grid-template-columns: minmax(0, 1fr);
}
/* Arriving at a section's anchor (#rent, #sale) leaves room for the sticky header. */
.rc-listing-section {
  scroll-margin-top: 6rem;
}

/* ---------------------------------------------------------------- "Според тип на возило" */
/* One tile per type, sharing the row equally; a large photograph with the name over it, or a coloured
   tile while the photograph is not there yet. */
.rc-types {
  display: grid;
  gap: var(--spacing-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) {
  .rc-types--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-types--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rc-types--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.rc-types li {
  display: flex;
}
.rc-type {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--spacing-4);
  width: 100%;
  min-height: 15rem;
  padding: var(--spacing-8);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #178033 0%, #0f5e25 100%);
  color: #fff;
  isolation: isolate;
  transition: transform .2s var(--ease-in-out), box-shadow .2s var(--ease-in-out);
}
.rc-types li:nth-child(2n) .rc-type:not(.rc-type--photo) {
  background: linear-gradient(135deg, #1b232c 0%, #0f151c 100%);
}
.rc-type:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 18px 40px #12182033;
}
@media (min-width: 1000px) {
  .rc-type {
    min-height: 20rem;
  }
}
.rc-type__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease-in-out);
}
.rc-type:hover .rc-type__photo {
  transform: scale(1.04);
}
/* The words stay readable on any photograph. */
.rc-type--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #0000 35%, #000000b3 100%);
}
.rc-type__text {
  display: grid;
  gap: var(--spacing-1);
}
.rc-type__label {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.rc-type__count {
  font-size: var(--text-sm);
  font-weight: 600;
  opacity: .9;
}
.rc-type__go {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--color-ink);
  font-size: 1.25rem;
  font-weight: 700;
  transition: transform .2s var(--ease-in-out);
}
.rc-type:hover .rc-type__go {
  transform: translateX(4px);
}

/* ---------------------------------------------------------------- "Сите возила": all / for rent / for sale */
.rc-offer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2);
  margin-top: var(--spacing-8);
}
.rc-offer__tab {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: .6rem 1.1rem;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-full);
  background: var(--color-paper);
  color: var(--color-ink);
  font-weight: 700;
  font-size: var(--text-sm);
  transition: border-color .15s var(--ease-in-out), background-color .15s var(--ease-in-out);
}
.rc-offer__tab:hover {
  border-color: var(--rc-go);
  color: var(--rc-go);
}
.rc-offer__tab[aria-current="page"] {
  border-color: var(--rc-go);
  background: var(--rc-go);
  color: #fff;
}
.rc-offer__count {
  min-width: 1.5rem;
  padding: 0 .4rem;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: var(--text-xs);
  text-align: center;
}
.rc-offer__tab[aria-current="page"] .rc-offer__count {
  background: #ffffff33;
  color: #fff;
}

/* ---------------------------------------------------------------- "Повратно" / "Во еден правец" */
/* A note, not a warning: grey text with a small route mark, the full width of the form. */
.rc-tripkind {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.4;
}
.rc-tripkind::before {
  content: "";
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 2l4 4-4 4'/%3E%3Cpath d='M3 11V9a3 3 0 013-3h15'/%3E%3Cpath d='M7 22l-4-4 4-4'/%3E%3Cpath d='M21 13v2a3 3 0 01-3 3H3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 2l4 4-4 4'/%3E%3Cpath d='M3 11V9a3 3 0 013-3h15'/%3E%3Cpath d='M7 22l-4-4 4-4'/%3E%3Cpath d='M21 13v2a3 3 0 01-3 3H3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.rc-tripkind strong {
  color: var(--color-ink);
  font-weight: 600;
}
.rc-summary .rc-tripkind {
  margin-top: var(--spacing-3);
  font-size: var(--text-xs);
}
