/* =========================================================
   FRC – VRC FALLBACK SEARCH (single source of truth)
   Applies ONLY when JS adds: body.frc-vrc-fallback
========================================================= */

body.frc-vrc-fallback .wrap.plugin-container{
  --frc-glass: rgba(7, 28, 51, 0.65);
  --frc-border: rgba(255,255,255,.12);
  --frc-white: #fff;
  --frc-muted: rgba(255,255,255,.72);
  --frc-green: #0B8F3D;
  --frc-radius: 14px;
}

/* hide Vik default title blocks */
body.frc-vrc-fallback .wrap.plugin-container .vrc-main-title,
body.frc-vrc-fallback .wrap.plugin-container .vrc-intro-main,
body.frc-vrc-fallback .wrap.plugin-container .vrc-closing-main{
  display:none !important;
}

/* error message */
body.frc-vrc-fallback .wrap.plugin-container .err{
  margin: 0 0 14px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,0.10) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  color: var(--frc-white) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}

/* container glass */
body.frc-vrc-fallback .wrap.plugin-container .vrcdivsearch.vrcdivsearch-noresults{
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}
body.frc-vrc-fallback .wrap.plugin-container .vrcdivsearch-inner{
  background: var(--frc-glass) !important;
  border: 1px solid var(--frc-border) !important;
  border-radius: var(--frc-radius) !important;
  padding: 18px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.18) !important;
}

/* hide category ONLY in fallback */
body.frc-vrc-fallback .wrap.plugin-container .vrc-searchf-section-categories,
body.frc-vrc-fallback .wrap.plugin-container .frc-hide-cat{
  display:none !important;
}

/* one-row layout (like home) */
body.frc-vrc-fallback .wrap.plugin-container .vrcdivsearch-inner form{
  display: flex !important;
  align-items: flex-end !important;
  gap: 18px !important;
  flex-wrap: nowrap !important;
}

/* flatten Vik sections (so fields become direct flex items) */
body.frc-vrc-fallback .wrap.plugin-container .vrc-searchf-section-locations,
body.frc-vrc-fallback .wrap.plugin-container .vrc-searchf-section-datetimes,
body.frc-vrc-fallback .wrap.plugin-container .vrc-searchf-section-sbmt{
  display: contents !important;
}

/* location fields (keep wider) */
body.frc-vrc-fallback .wrap.plugin-container .vrc-searchf-section-locations .vrcsfentrycont{
  display:flex !important;
  flex-direction: column !important;
  min-width: 170px !important;
  margin: 0 !important;
}

/* IMPORTANT: date+time groups in Vik are nested:
   .vrc-searchf-section-datetimes > .vrcsfentrycont holds BOTH (date + time)
   Make that wrapper "transparent" so date/time become separate flex items.
*/
body.frc-vrc-fallback .wrap.plugin-container .vrc-searchf-section-datetimes > .vrcsfentrycont{
  display: contents !important;
}

/* now style date blocks and time blocks as own flex items */
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrylabsel,
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrytime{
  display:flex !important;
  flex-direction: column !important;
  margin: 0 !important;
}

/* ===== SHRINK (≈66%) ===== */
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrylabsel{
  min-width: 115px !important;
  max-width: 115px !important;
}
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrytime{
  min-width: 95px !important;
  max-width: 95px !important;
}

/* labels */
body.frc-vrc-fallback .wrap.plugin-container label{
  display:block !important;
  margin: 0 0 6px !important;
  color: var(--frc-muted) !important;
  font-size: 12px !important;
  letter-spacing: .02em !important;
  font-weight: 700 !important;
}

/* inputs/selects base */
body.frc-vrc-fallback .wrap.plugin-container select,
body.frc-vrc-fallback .wrap.plugin-container input[type="text"]{
  width: 100% !important;
  height: 36px !important;
  padding: 6px 10px !important;
  border-radius: 10px !important;

  background: rgba(255,255,255,.10) !important;
  border: 1px solid rgba(255,255,255,.16) !important;

  color: var(--frc-white) !important;
  font-weight: 600 !important;
  font-size: 14px !important;

  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* custom time select (your injected one) */
body.frc-vrc-fallback .wrap.plugin-container .frc-time-select{
  width: 100% !important;
  height: 36px !important;
  padding: 6px 10px !important;
  border-radius: 10px !important;

  background: rgba(255,255,255,.10) !important;
  border: 1px solid rgba(255,255,255,.16) !important;

  color: var(--frc-white) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}

/* date icon */
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrydate{
  position: relative !important;
}
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrydate .vrc-caltrigger{
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: rgba(255,255,255,.75) !important;
  pointer-events:none !important;
  font-size: 14px !important;
}

/* dropdown options readability (Windows/Chrome) */
body.frc-vrc-fallback .wrap.plugin-container select option{
  color: #111 !important;
  background: #fff !important;
}

/* hide native selects that you marked */
body.frc-vrc-fallback .wrap.plugin-container .frc-native-hidden{
  display:none !important;
}

/* submit button */
body.frc-vrc-fallback .wrap.plugin-container .vrc-searchf-section-sbmt .vrcsfentrycont{
  display:flex !important;
  flex-direction: column !important;
  min-width: 220px !important;
  margin: 0 !important;
}
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrysubmit input[type="submit"]{
  width: 100% !important;
  height: 44px !important;
  border-radius: 12px !important;
  border: 0 !important;
  background: var(--frc-green) !important;
  color: #fff !important;
  font-weight: 800 !important;
  letter-spacing: .02em !important;
  cursor: pointer !important;
}

/* responsive */
@media (max-width: 1200px){
  body.frc-vrc-fallback .wrap.plugin-container .vrcdivsearch-inner form{
    flex-wrap: wrap !important;
  }
}
/* STEP 3 – STOP overflow to the right (keep 1 row) */
body.frc-vrc-fallback .wrap.plugin-container,
body.frc-vrc-fallback .wrap.plugin-container *{
  box-sizing: border-box !important;
}

body.frc-vrc-fallback .wrap.plugin-container .vrcdivsearch-inner{
  max-width: 100% !important;
  overflow: hidden !important;
}

/* keep 1 row but allow shrinking */
body.frc-vrc-fallback .wrap.plugin-container .vrcdivsearch-inner form{
  width: 100% !important;
  max-width: 100% !important;
  flex-wrap: nowrap !important;
  min-width: 0 !important;
}

/* every field MUST be allowed to shrink */
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrycont,
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrylabsel,
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrytime{
  min-width: 0 !important;
}

/* Locations: flexible */
body.frc-vrc-fallback .wrap.plugin-container .vrc-searchf-section-locations .vrcsfentrycont{
  flex: 1 1 clamp(140px, 18vw, 190px) !important;
}

/* Dates: smaller, can shrink */
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrylabsel{
  flex: 0 1 clamp(92px, 10vw, 120px) !important;
  max-width: clamp(92px, 10vw, 120px) !important;
}

/* Times: smaller, can shrink */
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrytime{
  flex: 0 1 clamp(82px, 9vw, 110px) !important;
  max-width: clamp(82px, 9vw, 110px) !important;
}

/* Button: fixed-ish, but still safe */
body.frc-vrc-fallback .wrap.plugin-container .vrc-searchf-section-sbmt .vrcsfentrycont{
  flex: 0 0 clamp(160px, 18vw, 220px) !important;
  min-width: 160px !important;
}
/* DATE FIELDS – fallback / step 3 */
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrydate,
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrydate input[type="text"]{
  border-radius: 12px !important;
}

body.frc-vrc-fallback .wrap.plugin-container #pickupdate,
body.frc-vrc-fallback .wrap.plugin-container #releasedate{
  background: #ffffff !important;
  color: #061A2B !important;
  -webkit-text-fill-color: #061A2B !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  padding: 6px 34px 6px 12px !important;
}

/* calendar icon visible on white */
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrydate .vrc-caltrigger{
  color: #061A2B !important;
  opacity: .75 !important;
}
/* calendar icon in stanga, nu in dreapta */
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrydate{
  position: relative !important;
}

body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrydate .vrc-caltrigger{
  left: 10px !important;
  right: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #061A2B !important;
  opacity: .75 !important;
  pointer-events: none !important;
}

body.frc-vrc-fallback .wrap.plugin-container #pickupdate,
body.frc-vrc-fallback .wrap.plugin-container #releasedate{
  padding-left: 32px !important;
  padding-right: 10px !important;
}

/* custom dropdown cards for locations */
body.frc-vrc-fallback .wrap.plugin-container .frc-dd{
  position: relative;
  width: 100%;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__btn{
  width: 100%;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.10);
  color: #fff;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  cursor: pointer;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__panel{
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 100%;
  min-width: 260px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
  padding: 8px;
  z-index: 50;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd.is-open .frc-dd__panel{
  display: block;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__item{
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: #061A2B;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__item:hover{
  background: #F3F6FA;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__item .muted{
  font-size: 12px;
  line-height: 1.35;
  color: #5C6B7A;
}

/* location card dropdown */
body.frc-vrc-fallback .wrap.plugin-container .frc-loc-dd{
  position: relative;
  width: 100%;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-loc-dd__btn{
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.10);
  color: #fff;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  cursor: pointer;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-loc-dd__panel{
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(0,0,0,.22);
  padding: 8px;
  z-index: 1000;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-loc-dd.is-open .frc-loc-dd__panel{
  display: block;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-loc-dd__item{
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: #061A2B;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-loc-dd__item:hover{
  background: #F3F6FA;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-loc-dd__meta{
  font-size: 12px;
  color: #5B6876;
  line-height: 1.35;
  margin-top: 2px;
}
body.frc-vrc-fallback .wrap.plugin-container .vrc-main-title,
body.frc-vrc-fallback .wrap.plugin-container .vrc-intro-main,
body.frc-vrc-fallback .wrap.plugin-container .vrc-closing-main,
body.frc-vrc-fallback .wrap.plugin-container .frc-hide-cat,
body.frc-vrc-fallback .wrap.plugin-container .frc-native-hidden {
  display: none !important;
}

body.frc-vrc-fallback .wrap.plugin-container {
  font-family: Inter, sans-serif !important;
}

body.frc-vrc-fallback .wrap.plugin-container .err {
  margin: 0 0 14px !important;
  padding: 12px 16px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.10) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

body.frc-vrc-fallback .wrap.plugin-container .vrcdivsearch-inner {
  background: rgba(7, 28, 51, 0.65) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 18px !important;
  padding: 18px 18px !important;
  box-shadow: none !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-home-fallback-row {
  display: grid !important;
  grid-template-columns: 1.15fr 1.15fr 1.05fr 1.05fr 170px;
  gap: 16px !important;
  align-items: end !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-field label,
body.frc-vrc-fallback .wrap.plugin-container .frc-datetime-card > label {
  display: block !important;
  margin: 0 0 8px !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .01em !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__btn,
body.frc-vrc-fallback .wrap.plugin-container .frc-date-display,
body.frc-vrc-fallback .wrap.plugin-container .frc-time-select {
  height: 52px !important;
  border-radius: 18px !important;
  border: 0 !important;
  background: #fff !important;
  color: #061A2B !important;
  font-size: 16px !important;
  font-weight: 500 !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd {
  position: relative !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__btn {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 18px !important;
  cursor: pointer !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__txt {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__caret {
  color: rgba(6,26,43,.65) !important;
  margin-left: 10px !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__panel {
  position: absolute !important;
  left: 0 !important;
  top: calc(100% + 8px) !important;
  width: 100% !important;
  background: #fff !important;
  color: #061A2B !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.18) !important;
  overflow: hidden !important;
  display: none !important;
  z-index: 40 !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd.is-open .frc-dd__panel {
  display: block !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__item {
  padding: 12px 14px !important;
  cursor: pointer !important;
  border-bottom: 1px solid rgba(6,26,43,.08) !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__item:last-child {
  border-bottom: 0 !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__item strong {
  display: block !important;
  color: #061A2B !important;
  font-size: 15px !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__item .muted {
  color: rgba(6,26,43,.72) !important;
  font-size: 12px !important;
  margin-top: 2px !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__item:hover {
  background: #f4f6f8 !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-datetime-shell {
  display: grid !important;
  grid-template-columns: 1fr 124px !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  background: #fff !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-date-display {
  width: 100% !important;
  padding: 0 18px !important;
  text-align: left !important;
  border-right: 1px solid rgba(6,26,43,.12) !important;
  cursor: pointer !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-time-select {
  width: 100% !important;
  padding: 0 14px !important;
  appearance: none !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-time-select option {
  color: #061A2B !important;
  background: #fff !important;
}

body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrysubmit,
body.frc-vrc-fallback .wrap.plugin-container .frc-field--submit {
  width: 100% !important;
}

body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrysubmit input[type="submit"],
body.frc-vrc-fallback .wrap.plugin-container .vrcsfentrysubmit button {
  width: 100% !important;
  height: 52px !important;
  border-radius: 18px !important;
  border: 0 !important;
  background: #0B8F3D !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

@media (max-width: 1180px) {
  body.frc-vrc-fallback .wrap.plugin-container .frc-home-fallback-row {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ===== FLATPICKR + DROPDOWNS OVERLAY FIX ===== */

body.frc-vrc-fallback .wrap.plugin-container,
body.frc-vrc-fallback .wrap.plugin-container .vrcdivsearch,
body.frc-vrc-fallback .wrap.plugin-container .vrcdivsearch-inner,
body.frc-vrc-fallback .wrap.plugin-container .frc-home-fallback-row,
body.frc-vrc-fallback .wrap.plugin-container .frc-field,
body.frc-vrc-fallback .wrap.plugin-container .frc-dd {
  overflow: visible !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd {
  position: relative !important;
  z-index: 30 !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-dd__panel {
  z-index: 9999 !important;
}

/* flatpickr */
.flatpickr-calendar {
  z-index: 10000 !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.22) !important;
}

.flatpickr-calendar.inline,
.flatpickr-calendar.open {
  display: block !important;
}

.flatpickr-months {
  background: #061A2B !important;
}

.flatpickr-current-month,
.flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year,
.flatpickr-weekday,
.flatpickr-prev-month,
.flatpickr-next-month {
  color: #fff !important;
  fill: #fff !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #0B8F3D !important;
  border-color: #0B8F3D !important;
}

.flatpickr-day.inRange {
  background: rgba(11,143,61,.14) !important;
  border-color: rgba(11,143,61,.14) !important;
  box-shadow: none !important;
}

.flatpickr-day.today {
  border-color: #0B8F3D !important;
}

body.frc-vrc-fallback .wrap.plugin-container .frc-date-display {
  cursor: pointer !important;
}
/* Let overlays be visible */
body.frc-vrc-fallback .wrap.plugin-container .vrcdivsearch-inner{
  overflow: visible !important;
}

/* Prevent layout from causing horizontal scroll */
body.frc-vrc-fallback{
  overflow-x: hidden;
}

/* Make sure dropdown and calendar stay on top */
body.frc-vrc-fallback .wrap.plugin-container .frc-dd__panel{
  z-index: 99999 !important;
}

.flatpickr-calendar{
  z-index: 100000 !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.22) !important;
}
