:root {
  --cbnb-navy: #003d5b;
  --cbnb-gold: #fbaf00;
  --cbnb-error: #b91c1c;
  --cbnb-muted: #eef3f6;
  /* Height the sticky action bar takes off the bottom of the viewport. */
  --cbnb-sticky-bar-space: 104px;
}

.cbnb-final-invalid {
  border-color: var(--cbnb-error) !important;
  box-shadow: 0 0 0 2px rgba(185, 28, 28, .12) !important;
}

.cbnb-final-error,
.cbnb-final-newsletter-status.is-error,
.cbnb-final-telegram-note {
  color: var(--cbnb-error);
}

.cbnb-final-error,
.cbnb-final-newsletter-status,
.cbnb-final-telegram-note {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
}

/* Inquiry modals: required state and consent layout stay consistent. */
:is(.lessee_form, .yacht_form) .wpcf7-form-control-wrap:is(
  [data-name="sn_lessee_user_your_name"],
  [data-name="sn_lessee_user_your_email"],
  [data-name="sn_lessee_user_your_message"],
  [data-name="sn_yacht_user_your_name"],
  [data-name="sn_yacht_user_your_email"],
  [data-name="sn_yacht_user_your_message"]
)::after {
  content: "*";
  position: absolute;
  top: 12px;
  right: 18px;
  z-index: 2;
  color: var(--cbnb-error);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

:is(.lessee_form, .yacht_form) .wpcf7-not-valid-tip {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:is(.lessee_form, .yacht_form) .block-checkbox,
:is(.lessee_form, .yacht_form) .cont-checkbox {
  width: 100%;
  text-align: left;
}

:is(.lessee_form, .yacht_form) .cont-checkbox {
  display: grid;
  gap: 12px;
}

:is(.lessee_form, .yacht_form) .cont-checkbox .wpcf7-form-control-wrap,
:is(.lessee_form, .yacht_form) .cont-checkbox .wpcf7-list-item {
  display: block;
  width: 100%;
  margin: 0;
}

:is(.lessee_form, .yacht_form) .cont-checkbox .wpcf7-list-item label {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}

:is(.lessee_form, .yacht_form) .cont-checkbox .wpcf7-list-item-label {
  text-align: left;
}

:is(.lessee_form, .yacht_form) .wpcf7-form-control-wrap[data-name="checkbox-965"] .wpcf7-list-item-label::after,
:is(.lessee_form, .yacht_form) .wpcf7-form-control-wrap[data-name="checkbox-1965"] .wpcf7-list-item-label::after {
  content: " *";
  color: var(--cbnb-error);
  font-weight: 700;
}

.cbnb-final-form-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #e8f6ee;
  color: #166534;
  font-weight: 600;
}

.cbnb-final-form-notice.is-error {
  background: #fde8e8;
  color: var(--cbnb-error);
}

.cbnb-form-sticky-bar {
  position: sticky !important;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 90;
  box-sizing: border-box;
  width: 100%;
  margin-top: 28px;
  padding: 12px;
  border: 1px solid rgba(0, 61, 91, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 36px rgba(0, 61, 91, .18);
  backdrop-filter: blur(8px);
}

.cbnb-form-sticky-bar .jet-form-builder__field-wrap,
.cbnb-form-sticky-bar .jet-form-builder__submit-wrap,
.cbnb-form-sticky-bar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.cbnb-sticky-action {
  min-width: min(220px, 100%);
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid var(--cbnb-navy);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.cbnb-sticky-action--secondary {
  background: #fff;
  color: var(--cbnb-navy);
}

.cbnb-sticky-action--primary {
  border-color: var(--cbnb-gold);
  background: var(--cbnb-gold);
  color: var(--cbnb-navy);
}

.cbnb-sticky-action:hover,
.cbnb-sticky-action:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(251, 175, 0, .24);
}

.cbnb-form-sticky-bar--profile .cbnb-sticky-action--primary {
  margin-left: auto;
}

.cbnb-listing-status-toast {
  position: fixed;
  right: 20px;
  bottom: calc(94px + env(safe-area-inset-bottom));
  z-index: 110;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 12px;
  background: #166534;
  color: #fff;
  font-weight: 700;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
}

.cbnb-listing-status-toast.is-error {
  background: var(--cbnb-error);
}

.cbnb-listing-status-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  /* The bar floats over the form, so whatever sits at the bottom of the viewport sits under
     it - on a phone that was the Cover Photo preview together with its Choose File button
     and the "no file chosen" line. Reserve the bar's height at the end of the form so every
     field can be scrolled clear of it, and tell the browser's own scrolling (focus, the jump
     to an invalid field) about it too. */
  html:has(.cbnb-form-sticky-bar) {
    scroll-padding-bottom: var(--cbnb-sticky-bar-space);
  }

  form:has(.cbnb-form-sticky-bar) {
    padding-bottom: var(--cbnb-sticky-bar-space);
  }

  .cbnb-form-sticky-bar {
    bottom: max(8px, env(safe-area-inset-bottom));
    padding: 10px;
  }

  .cbnb-form-sticky-bar .jet-form-builder__field-wrap,
  .cbnb-form-sticky-bar .jet-form-builder__submit-wrap,
  .cbnb-form-sticky-bar > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  /* Scoped to the bar on purpose. The submit button also carries the theme's `.btn`, whose
     `min-width: 16.6667rem` is declared in a later stylesheet and so beat a bare
     `.cbnb-sticky-action`: at 390px the two buttons measured 407px inside a 289px wrapper,
     which is the Russian and Ukrainian labels hanging out of the bar. */
  .cbnb-form-sticky-bar .cbnb-sticky-action {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 13px;
    white-space: normal;
    overflow-wrap: break-word;
  }

  .cbnb-form-sticky-bar--profile .jet-form-builder__field-wrap,
  .cbnb-form-sticky-bar--profile .jet-form-builder__submit-wrap,
  .cbnb-form-sticky-bar--profile > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .cbnb-listing-status-toast {
    right: 16px;
    bottom: calc(108px + env(safe-area-inset-bottom));
  }
}

.cbnb-final-switcher-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cbnb-final-switcher-option {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0, 61, 91, .22);
  border-radius: 999px;
  padding: 6px 14px;
  background: #fff;
  cursor: pointer;
}

.cbnb-final-switcher-option:has(input:checked) {
  background: var(--cbnb-gold);
  border-color: var(--cbnb-gold);
  color: var(--cbnb-navy);
}

.cbnb-final-disabled {
  opacity: .45;
  pointer-events: none;
}

.cbnb-final-route-order,
.yacht-dates__list.cbnb-final-route-order,
.route-repeater.cbnb-final-route-order,
.jet-form-builder-repeater__row.cbnb-final-route-order {
  display: flex;
  flex-direction: column;
}

.cbnb-final-duplicate-clear,
.cbnb-hide-chatbot {
  display: none !important;
}

/* Single listing button alignment (#146) */
.single-yacht-listing .btn,
.single-yacht-listing button,
.single-yacht-listing .jet-popup-action-button,
.single-yacht-listing a[class*="btn"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: normal;
  line-height: 1.2;
}

.single-yacht-listing .yacht-page-info__btns > .btn {
  white-space: nowrap;
}

.single-yacht-listing .yacht-buttons,
.single-yacht-listing .boat-actions,
.single-yacht-listing .owner-actions,
.single-yacht-listing [class*="action"] {
  flex-wrap: wrap;
  align-items: center;
}

/* Footer consistency (#117) */
.footer,
.footer a,
.footer p,
.footer li,
.footer small,
.footer .subscribe__input,
.footer .subscribe__btn {
  font-size: 16px;
  line-height: 1.45;
}

/* CLS guardrails (#26/#97) */
.home .main,
.home .hero,
.home .hero-section,
.home .section-hero {
  min-height: clamp(520px, 72vh, 820px);
}

#cbnb-yacht-map,
.jet-map,
.elementor-widget-jet-map,
[class*="map"] .gm-style {
  min-height: 420px;
}

.page-id-pricing .pricing,
body[class*="pricing"] .pricing,
body[class*="about"] .about-hero,
body[class*="about"] .hero,
.page-template-default .about-hero {
  min-height: 360px;
}

img[width][height] {
  height: auto;
}

/* Swiper switches to vertical at 992px; reserve that viewport before JS runs. */
@media (min-width: 992px) {
  .home .main .slider-yacht {
    height: 36.4444rem;
  }
}

@media (min-width: 1023px) {
  .home .main .slider-yacht__wrap-img {
    width: 18.3333rem;
    max-width: 18.5rem;
    transform: scale(.8182);
    transform-origin: left center;
  }

  .home .main .swiper-slide-next .slider-yacht__wrap-img {
    transform: scale(1);
  }

  .home .main .slider-yacht:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    flex-direction: column;
  }

  .home .main .slider-yacht:not(.swiper-initialized) .swiper-slide {
    height: calc((100% - 40px) / 3);
    margin-bottom: 20px;
  }

  .home .main .slider-yacht:not(.swiper-initialized) .swiper-slide:nth-child(2) {
    position: relative;
    top: -1.8rem;
    z-index: 10;
  }

  .home .main .slider-yacht:not(.swiper-initialized) .swiper-slide:nth-child(2) .slider-yacht__wrap-img {
    transform: scale(1);
    border: 3px solid #fff;
    box-shadow: 1px 2px 1.1111rem 0 rgba(0, 0, 0, .4);
  }

  .home .main .slider-yacht:not(.swiper-initialized) .swiper-slide:nth-child(2) .slider-yacht__price {
    display: block;
  }

  /* Match the English hero's 3 / 2 / 2 line rhythm in Cyrillic locales. */
  html[lang^="ru"] body.home .main__item:first-child,
  html[lang^="uk"] body.home .main__item:first-child {
    width: calc(100% - 26rem);
    max-width: 40rem;
  }

  html[lang^="ru"] body.home .main__title,
  html[lang^="uk"] body.home .main__title {
    white-space: nowrap;
    font-size: clamp(3.1rem, 4.86vw, 3.5rem);
  }

  html[lang^="ru"] body.home .main__desc p:first-child,
  html[lang^="uk"] body.home .main__desc p:first-child {
    max-width: 85%;
  }

  html[lang^="ru"] body.home .main__desc p:last-child,
  html[lang^="uk"] body.home .main__desc p:last-child {
    max-width: 82%;
  }
}

.home .main .slider-yacht__wrap-img {
  aspect-ratio: 800 / 436;
}

.home .main .slider-yacht__wrap-img > a,
.home .main .slider-yacht__wrap-img img {
  display: block;
  width: 100%;
  height: 100%;
}

.home .main .slider-yacht__wrap-img img {
  object-fit: cover;
}

body[class*="template-about"] .about-main-img {
  aspect-ratio: 2.43 / 1;
  overflow: hidden;
}

body[class*="template-about"] .about-main-img picture,
body[class*="template-about"] .about-main-img img {
  display: block;
  width: 100%;
  height: 100%;
}

body[class*="template-about"] .about-main-img img {
  object-fit: cover;
  object-position: center 62%;
}


/* Photo engine preview/delete (#104/#105/#106/#107/#108) */
.cbnb-photo-engine-queue {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.cbnb-photo-engine-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 10px;
  border: 1px solid rgba(0, 61, 91, .18);
  border-radius: 12px;
  background: #fff;
}

.cbnb-photo-engine-preview {
  width: 76px;
  height: 58px;
  border-radius: 8px;
  background: var(--cbnb-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--cbnb-navy);
  overflow: hidden;
}

.cbnb-photo-engine-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cbnb-photo-engine-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: start;
  gap: 4px 8px;
  min-width: 0;
}

.cbnb-photo-engine-row strong {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cbnb-photo-engine-status {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.cbnb-photo-engine-remove {
  grid-column: 2;
  grid-row: 1;
  margin-left: 0;
  border: 0;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  background: #fde8e8;
  color: var(--cbnb-error);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.cbnb-photo-engine-progress {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--cbnb-muted);
  margin-top: 8px;
}

.cbnb-photo-engine-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cbnb-gold);
  transition: width .18s ease;
}

.cbnb-photo-engine-item.is-error .cbnb-photo-engine-progress > span {
  background: var(--cbnb-error);
}

/* External link/button text resilience */
a[target="_blank"]::after {
  content: "";
}

/* Catalog filter UX */
.jet-remove-all-filters,
.jet-remove-all-filters__button,
#cbnb-clear-btn {
  cursor: pointer;
}

.cbnb-final-date-input::placeholder {
  color: rgba(0, 61, 91, .58);
}

/* Owner map nudge */
.cbnb-final-map-ready {
  min-height: 260px;
}

/* Yacht cards: one shared definition instead of allowing Elementor columns or
 * long listing data to stretch each card to a different size. */
.fleet-compay__item {
  border: 1px solid #e9e6e6;
  border-radius: 1.1111rem;
  overflow: hidden;
  background: #fff;
}

#sn-map .fleet-compay {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
}

#sn-map .fleet-compay__cont {
  padding: 1.111rem;
}

.fleet-compay__image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #edf2f4;
}

.fleet-compay__image picture,
.fleet-compay__image > img {
  display: block;
  width: 100%;
  height: 100%;
}

.fleet-compay__image > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fleet-compay__image-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #edf7fa, #dcebef);
}

.fleet-compay__image .fleet-compay__image-placeholder img {
  width: 46% !important;
  height: 46% !important;
  object-fit: contain !important;
  opacity: .55;
}

.fleet-compay__cont {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1.111rem;
}

.fleet-compay__favorite,
.fleet-compay__favorite_grey {
  position: absolute;
  top: 1.111rem;
  right: 1.111rem;
}

.fleet-compay__favorite_grey {
  filter: grayscale(1);
}

.fleet-compay__item svg {
  width: 1.1111rem;
  height: 1.1111rem;
}

.fleet-compay__img {
  display: block;
}

.fleet-compay__title {
  padding-right: 2rem;
  font-size: 1rem;
  font-weight: 600;
}

.fleet-compay__info span {
  font-size: .9rem;
}

.fleet-compay__info span span,
.fleet-compay__price-value {
  color: #999;
}

.fleet-compay__rating-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fleet-compay__price-text {
  font-weight: 600;
}

.fleet-compay__text {
  opacity: .4;
}

.service-list,
.service-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1rem;
}

.service-list__item {
  gap: .25rem .6rem;
}

.service-list svg,
.service-list__item svg {
  opacity: .5;
}

.fleet-compay__item .service-list,
.fleet-compay__item .service-list__item {
  margin-bottom: 0;
}

.home .cbnb-featured-boats-title {
  width: min(100%, 1300px);
  margin: 24px auto 15px;
}

.home .cbnb-featured-boats-title .elementor-heading-title {
  margin: 0;
  color: #333;
  font-size: 2.3333rem;
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

#yacht_cards .jet-listing-grid__items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 310px));
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  width: 100%;
  margin: 0;
}

#yacht_cards .jet-listing-grid__item {
  width: 100%;
  max-width: 310px;
  min-width: 0;
  padding: 0;
}

#yacht_cards .jet-listing-grid__item > .elementor,
#yacht_cards .jet-listing-grid__item > .elementor > .e-con {
  width: 100%;
  max-width: 100%;
  height: 100%;
}

#yacht_cards .jet-listing-grid__item > .elementor > .e-con {
  padding: 0;
}

#yacht_cards .elementor-widget-shortcode,
#yacht_cards .elementor-widget-shortcode > .elementor-widget-container,
#yacht_cards .elementor-shortcode {
  height: 100%;
}

#yacht_cards .fleet-compay__item {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
}

#yacht_cards .fleet-compay__image {
  flex: none;
}

#yacht_cards .fleet-compay__cont {
  flex: 1;
  min-width: 0;
}

#yacht_cards .fleet-compay__title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#yacht_cards .fleet-compay__info {
  height: 2.7em;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

#yacht_cards .fleet-compay__service {
  min-height: 1.1rem;
}

#yacht_cards .fleet-compay__rating-price {
  gap: .5rem;
  min-width: 0;
  margin-top: auto;
}

#yacht_cards .fleet-compay__price {
  white-space: nowrap;
}

/* JetEngine lazy-loads this row. Reserving one card row prevents the map and
 * following homepage sections from jumping while the request is in flight. */
#yacht_cards .jet-listing-grid__loader {
  min-height: 350px;
}

#yacht_cards .jet-listing-grid__loader-spinner {
  display: none !important;
}

#yacht_cards .jet-listing-grid__loader::before {
  content: "";
  display: block;
  width: min(100%, 310px);
  height: 330px;
  margin: 0 auto;
  border-radius: 1.1111rem;
  background: linear-gradient(100deg, #eef2f4 20%, #f8fafb 40%, #eef2f4 60%);
  background-size: 200% 100%;
  animation: cbnb-card-loading 1.25s ease-in-out infinite;
}

@keyframes cbnb-card-loading {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  #yacht_cards .jet-listing-grid__loader::before {
    animation: none;
  }
}

.cbnb-header-tooltip {
  position: fixed;
  z-index: 100000;
  max-width: min(240px, calc(100vw - 16px));
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: #003d5b;
  box-shadow: 0 8px 24px rgba(0, 32, 48, .22);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}

.cbnb-header-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #003d5b;
  border-left: 6px solid transparent;
  transform: translateX(-50%);
}

.cbnb-header-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.cbnb-header-tooltip.is-above::before {
  top: auto;
  bottom: -6px;
  border-top: 6px solid #003d5b;
  border-right: 6px solid transparent;
  border-bottom: 0;
  border-left: 6px solid transparent;
}

@media (prefers-reduced-motion: reduce) {
  .cbnb-header-tooltip {
    transition: none;
  }
}

/* Ratings MVP flag: keep pricing annotations and testimonial stars untouched. */
.cbnb-ratings-disabled .rating,
.cbnb-ratings-disabled .travelling-rating,
.cbnb-ratings-disabled .profile-user-info__rating,
.cbnb-ratings-disabled .fleet-compay__rating,
.cbnb-ratings-disabled .cbnb-api-card__rating,
.cbnb-ratings-disabled .cbnb-map-popup__rating {
  display: none !important;
}
