/*
 * Yuan Garden Fastbook
 * Version: 3.1
 * Shared stylesheet for WP Coder ID 5 (EN) and ID 6 (ID).
 *
 * Keep the `fb-host` class on the Elementor section that contains the
 * shortcode. All selectors are scoped to avoid Elementor Site Settings
 * overriding the booking widget.
 */

@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700&display=swap");

.fb-wrap {
  --r: 10px;
  --coral: #e8744f;
  --coral-light: #f8d2c5;
  --teal: #1e4040;
  --border: #e2e0db;
  --muted: #9a9890;
  --bg: #ffffff;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  font-family: "Work Sans", sans-serif;
  opacity: 0;
  transition: opacity 0.22s ease;
  will-change: opacity;
}

.fb-wrap.is-ready {
  opacity: 1;
}

.fb-wrap *,
.fb-wrap *::before,
.fb-wrap *::after {
  box-sizing: border-box;
}

/* Booking bar */

.fb-wrap .fb-bar {
  display: flex;
  align-items: stretch;
  width: 100%;
  gap: 8px;
}

.fb-wrap .fb-card {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fb-wrap .fb-card:hover {
  border-color: #bab8b2;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.fb-wrap .fb-card--sm {
  flex: 0 0 148px;
}

.fb-wrap .fb-card-inner {
  display: flex;
  align-items: center;
  height: 72px;
  gap: 12px;
  padding: 14px 18px;
}

.fb-wrap .fb-card--sm .fb-card-inner {
  gap: 8px;
  padding-right: 12px;
  padding-left: 12px;
}

.fb-wrap .fb-icon {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  overflow: visible;
}

.fb-wrap .fb-icon--duration {
  flex-basis: 20px;
  width: 20px;
  height: 20px;
}

.fb-wrap .fb-icon--sm {
  flex-basis: 20px;
  width: 20px;
  height: 20px;
}

.fb-wrap .fb-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}

.fb-wrap .fb-label {
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.fb-wrap .fb-row-label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.fb-wrap .fb-caret {
  flex: 0 0 10px;
  width: 10px;
  height: 7px;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.fb-wrap .fb-value {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fb-wrap .fb-value--empty {
  color: #c8c6c0;
  font-style: italic;
}

/* Submit button: specificity intentionally beats Elementor Site Settings. */

.fb-wrap .fb-submit {
  flex-shrink: 0;
  height: 72px;
  padding: 0 28px;
  appearance: none;
  background: var(--coral);
  border: 0;
  border-radius: var(--r);
  color: #ffffff;
  cursor: pointer;
  font-family: "Work Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}

.fb-wrap .fb-submit:hover,
.fb-wrap .fb-submit:focus {
  background: #d4633e;
  color: #ffffff;
}

.fb-wrap .fb-submit:active {
  transform: scale(0.98);
}

/* Calendar */

.fb-wrap .fb-cal-popup {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  z-index: 9999;
  display: none;
  width: 508px;
  padding: 20px 28px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.12);
}

.fb-wrap .fb-cal-popup.is-open {
  display: block;
}

.fb-wrap .fb-cal-head {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  margin-bottom: 46px;
}

.fb-wrap .fb-cal-title {
  color: var(--teal);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.fb-wrap .fb-cal-nav,
.fb-wrap .fb-day,
.fb-wrap .fb-counter-btn {
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  appearance: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  text-transform: none !important;
}

.fb-wrap .fb-cal-nav {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--teal) !important;
  cursor: pointer;
  line-height: 0 !important;
}

.fb-wrap .fb-cal-nav svg {
  display: block;
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.fb-wrap .fb-cal-dow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  column-gap: 22px;
  margin-bottom: 24px;
}

.fb-wrap .fb-cal-dow span {
  display: block;
  color: #2b2b2b;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.fb-wrap .fb-cal-dow .dow-sun {
  color: var(--coral);
}

.fb-wrap .fb-cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  column-gap: 22px;
  row-gap: 24px;
}

.fb-wrap .fb-day {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 50% !important;
  color: #232323 !important;
  cursor: pointer;
  font-family: "Work Sans", sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  transition: background 0.12s, color 0.12s;
}

.fb-wrap .fb-day:hover:not(:disabled):not(.fb-day--selected) {
  background: #f0eeeb !important;
}

.fb-wrap .fb-day:disabled {
  cursor: default;
  pointer-events: none;
}

.fb-wrap .fb-day--other,
.fb-wrap .fb-day--past {
  background: transparent !important;
  color: #a6a6a6 !important;
}

.fb-wrap .fb-day--sun:not(.fb-day--selected) {
  color: var(--coral) !important;
}

.fb-wrap .fb-day--today:not(.fb-day--selected) {
  box-shadow: inset 0 0 0 1.5px var(--teal) !important;
}

.fb-wrap .fb-day--selected {
  background: var(--teal) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

.fb-wrap .fb-day--range {
  background: #f7ddd4 !important;
  border-radius: 50% !important;
  color: var(--teal) !important;
}

/* Duration popup */

.fb-wrap .fb-dur-popup {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 9999;
  display: none;
  width: 200px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.fb-wrap .fb-dur-popup.is-open {
  display: block;
}

.fb-wrap .fb-dur-item {
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.12s;
}

.fb-wrap .fb-dur-item:hover,
.fb-wrap .fb-dur-item.is-active {
  background: #f5f4f1;
}

.fb-wrap .fb-dur-item-title {
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
}

.fb-wrap .fb-dur-item-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

/* Guest popup */

.fb-wrap .fb-guest-popup {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 9999;
  display: none;
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 18px 22px 20px;
  background: #fbfbfb;
  border: 0;
  border-radius: var(--r);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.fb-wrap .fb-guest-popup.is-open {
  display: block;
}

.fb-wrap .fb-guest-row {
  display: grid;
  grid-template-columns: 28px minmax(82px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0;
}

.fb-wrap .fb-guest-row .fb-icon--sm {
  flex-basis: 22px;
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}

.fb-wrap .fb-guest-divider {
  height: 1px;
  margin: 16px 0;
  background: transparent;
  border-top: 1px solid var(--border);
}

.fb-wrap .fb-guest-label {
  color: var(--teal);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.fb-wrap .fb-counter {
  display: grid;
  grid-template-columns: 32px 34px 32px;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.fb-wrap .fb-counter-val {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 32px;
  color: var(--teal);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.fb-wrap .fb-counter-val::after {
  position: absolute;
  right: 7px;
  bottom: 0;
  left: 7px;
  height: 2px;
  background: #8f8f8f;
  border-radius: 2px;
  content: "";
}

.fb-wrap .fb-counter-btn {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 2px solid currentColor !important;
  border-radius: 8px !important;
  cursor: pointer;
  line-height: 0 !important;
  transition: opacity 0.13s, color 0.13s, border-color 0.13s;
}

.fb-wrap .fb-counter-btn:hover {
  opacity: 0.86;
}

.fb-wrap .fb-counter-btn:active {
  opacity: 0.68;
}

.fb-wrap .fb-counter-btn:disabled {
  cursor: default;
  opacity: 1;
}

.fb-wrap .fb-counter-btn::before,
.fb-wrap .fb-counter-btn--plus::after {
  position: absolute;
  display: block;
  width: 13px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  content: "";
}

.fb-wrap .fb-counter-btn--plus::after {
  transform: rotate(90deg);
}

.fb-wrap .fb-counter-btn--minus {
  color: #8f8f8f !important;
}

.fb-wrap .fb-counter-btn--plus {
  color: var(--teal) !important;
}

/* Elementor host integration */

.fb-host {
  position: relative;
  z-index: 50 !important;
  overflow: visible !important;
}

.fb-host > .elementor-container,
.fb-host .elementor-column,
.fb-host .elementor-widget-wrap,
.fb-host .elementor-widget-shortcode,
.fb-host .elementor-widget-container,
.fb-host .elementor-shortcode {
  overflow: visible !important;
}

.fb-host .elementor-widget-shortcode {
  position: relative;
  z-index: 51 !important;
}

/* Responsive */

@media (max-width: 900px) {
  .fb-wrap .fb-card-inner {
    padding: 12px 14px;
  }

  .fb-wrap .fb-submit {
    padding: 0 18px;
    font-size: 14px;
  }

  .fb-wrap .fb-card--sm {
    flex: 0 0 120px;
  }

  .fb-wrap .fb-cal-popup {
    width: 440px;
    padding-right: 22px;
    padding-left: 22px;
  }

  .fb-wrap .fb-cal-dow,
  .fb-wrap .fb-cal-days {
    column-gap: 16px;
  }

  .fb-wrap .fb-guest-popup {
    width: 340px;
    padding: 18px 20px 20px;
  }

  .fb-wrap .fb-guest-row {
    grid-template-columns: 28px minmax(78px, 1fr) auto;
    gap: 10px;
  }

  .fb-wrap .fb-counter {
    grid-template-columns: 30px 32px 30px;
    gap: 9px;
  }

  .fb-wrap .fb-counter-val {
    min-width: 32px;
    height: 30px;
    font-size: 15px;
  }

  .fb-wrap .fb-counter-btn {
    width: 30px !important;
    height: 30px !important;
    border-width: 2px !important;
    border-radius: 7px !important;
  }
}

@media (max-width: 640px) {
  .fb-wrap .fb-bar {
    flex-direction: column;
    gap: 6px;
  }

  .fb-wrap .fb-card,
  .fb-wrap .fb-card--sm {
    flex: unset;
    width: 100%;
  }

  .fb-wrap .fb-submit {
    width: 100%;
    height: 54px;
  }

  .fb-wrap .fb-cal-popup {
    left: 50% !important;
    width: min(100%, calc(100vw - 32px));
    padding: 18px 18px 22px;
    transform: translateX(-50%);
  }

  .fb-wrap .fb-cal-head {
    margin-bottom: 32px;
  }

  .fb-wrap .fb-cal-dow,
  .fb-wrap .fb-cal-days {
    column-gap: 6px;
  }

  .fb-wrap .fb-cal-dow span,
  .fb-wrap .fb-day {
    font-size: 13px !important;
  }

  .fb-wrap .fb-day {
    width: 34px !important;
    height: 34px !important;
  }

  .fb-wrap .fb-dur-popup {
    width: 100%;
  }

  .fb-wrap .fb-guest-popup {
    right: 0;
    left: 0;
    width: 100%;
    padding: 18px 18px 20px;
  }

  .fb-wrap .fb-guest-row {
    grid-template-columns: 28px minmax(74px, 1fr) auto;
    gap: 10px;
  }

  .fb-wrap .fb-guest-divider {
    margin: 15px 0;
  }

  .fb-wrap .fb-counter-val::after {
    right: 6px;
    bottom: 0;
    left: 6px;
    height: 2px;
  }

  .fb-wrap .fb-counter-btn::before,
  .fb-wrap .fb-counter-btn--plus::after {
    width: 12px;
    height: 2px;
  }
}
