.flowmeet-booking {
  --fm-accent: #f15d1f;
  --fm-accent-hover: #d04e18;
  --fm-accent-soft: #fff4ef;
  --fm-border: #e5e7eb;
  --fm-muted: #6b7280;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #111827;
  background: #fff;
  border: 1px solid var(--fm-border);
  border-radius: 16px;
  padding: 1.25rem;
  max-width: 960px;
}

.flowmeet-booking__eyebrow {
  margin: 0 0 .25rem;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fm-accent);
  font-weight: 600;
}

.flowmeet-booking__title {
  margin: 0 0 .5rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.flowmeet-booking__desc {
  margin: 0 0 .75rem;
  color: var(--fm-muted);
  font-size: .9rem;
  line-height: 1.5;
}

.flowmeet-booking__meta {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  gap: 1rem;
  font-size: .85rem;
  color: var(--fm-muted);
}

.flowmeet-booking__grid {
  display: grid;
  gap: 1rem;
}

.flowmeet-booking__schedule-row {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .flowmeet-booking__grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .flowmeet-booking__schedule-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Layout apilado: cuenta + widget */
.flowmeet-booking--stacked .flowmeet-booking__grid {
  grid-template-columns: 1fr;
}

.flowmeet-booking--stacked .flowmeet-booking__schedule-row {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.flowmeet-booking--stacked .flowmeet-booking__calendar,
.flowmeet-booking--stacked .flowmeet-booking__slots {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.flowmeet-booking--stacked .flowmeet-booking__slots {
  min-height: 0;
}

.flowmeet-booking--stacked .flowmeet-time-slots {
  flex: 1;
  max-height: none;
  min-height: 0;
}

.flowmeet-booking--stacked .flowmeet-booking__form-wrap {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .flowmeet-booking--stacked .flowmeet-booking__form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 .75rem;
  }

  .flowmeet-booking--stacked .flowmeet-booking__submit {
    grid-column: 1 / -1;
  }
}

@media (max-width: 639px) {
  .flowmeet-booking--stacked .flowmeet-booking__schedule-row {
    grid-template-columns: 1fr;
  }
}

.flowmeet-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.flowmeet-cal-nav__btn {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--fm-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.flowmeet-cal-nav__btn:hover {
  border-color: var(--fm-accent);
  color: var(--fm-accent);
}

.flowmeet-cal-nav__label {
  font-weight: 600;
  font-size: .95rem;
}

.flowmeet-cal-weekdays,
.flowmeet-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.flowmeet-cal-weekdays span {
  text-align: center;
  font-size: .7rem;
  color: var(--fm-muted);
  font-weight: 600;
}

.flowmeet-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: .85rem;
  border: none;
  background: transparent;
  cursor: default;
  color: #9ca3af;
}

.flowmeet-cal-day.is-available {
  color: #111827;
  cursor: pointer;
}

.flowmeet-cal-day.is-available:hover {
  background: var(--fm-accent-soft);
}

.flowmeet-cal-day.is-today {
  font-weight: 700;
}

.flowmeet-cal-day.is-selected {
  background: var(--fm-accent);
  color: #fff;
}

.flowmeet-booking__slots-title {
  margin: 0 0 .75rem;
  font-size: .95rem;
  font-weight: 600;
}

.flowmeet-time-slots {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-height: 320px;
  overflow-y: auto;
}

.flowmeet-booking--stacked .flowmeet-time-slots {
  max-height: 360px;
}

.flowmeet-time-slots__empty {
  color: var(--fm-muted);
  font-size: .85rem;
  margin: 0;
}

.flowmeet-time-slot {
  border: 1px solid var(--fm-border);
  border-radius: 10px;
  padding: .6rem .75rem;
  background: #fff;
  cursor: pointer;
  font-size: .9rem;
  text-align: left;
  transition: border-color .15s, background .15s;
}

.flowmeet-time-slot:hover,
.flowmeet-time-slot.is-selected {
  border-color: var(--fm-accent);
  background: var(--fm-accent-soft);
}

.flowmeet-booking__form-wrap .fw-field {
  margin-bottom: .75rem;
}

.flowmeet-booking__form-wrap label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  margin-bottom: .25rem;
}

.flowmeet-booking__form-wrap input {
  width: 100%;
  border: 1px solid var(--fm-border);
  border-radius: 8px;
  padding: .55rem .65rem;
  font-size: .9rem;
}

.flowmeet-booking__form-wrap input:focus {
  outline: none;
  border-color: var(--fm-accent);
  box-shadow: 0 0 0 3px rgba(241, 93, 31, .15);
}

.flowmeet-booking__submit {
  width: 100%;
  margin-top: .25rem;
}

.flowmeet-booking__success {
  text-align: center;
  padding: 2rem 1rem;
}

.flowmeet-booking__done {
  padding: 1rem 0 2rem;
}

.flowmeet-booking__done-card {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 1.5rem;
  border: 1px solid var(--fm-border);
  border-radius: 16px;
  background: #fff;
}

.flowmeet-booking__done-lead {
  color: var(--fm-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.flowmeet-booking__done-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 0;
}

.flowmeet-booking__done-actions .fw-btn {
  min-width: 160px;
}

.flowmeet-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, .45);
  padding: 1rem;
}

.flowmeet-modal[hidden] {
  display: none !important;
}

.flowmeet-modal__card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem 1.75rem;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
  animation: flowmeet-pop .25s ease;
}

.flowmeet-modal__card h3 {
  margin: 0 0 .5rem;
  font-size: 1.25rem;
}

.flowmeet-modal__card p {
  margin: 0;
  color: var(--fm-muted);
  font-size: .95rem;
  line-height: 1.5;
}

.flowmeet-modal__card--confirm {
  text-align: left;
  max-width: 420px;
}

.flowmeet-modal__lead {
  margin: 0.75rem 0 1.25rem;
}

.flowmeet-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

@keyframes flowmeet-pop {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: 1; transform: scale(1); }
}

.flowmeet-booking__success-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--fm-accent-soft);
  color: var(--fm-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Widget flotante */
.flowmeet-widget {
  --fm-accent: #f15d1f;
  --fm-accent-hover: #d04e18;
  --fm-accent-soft: #fff4ef;
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 99990;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.flowmeet-widget__btn {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: none;
  background: #f15d1f;
  color: #fff;
  box-shadow: 0 8px 24px rgba(241, 93, 31, .35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, background .2s;
}

.flowmeet-widget__btn:hover {
  transform: scale(1.05);
  background: #d04e18;
}

.flowmeet-widget__btn svg {
  width: 1.4rem;
  height: 1.4rem;
  stroke: #fff;
  fill: none;
}

.flowmeet-widget__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 0;
}

.flowmeet-widget__panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%) scale(.96);
  width: min(960px, calc(100vw - 2rem));
  height: min(92vh, 880px);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, transform .25s, visibility .25s;
  z-index: 1;
}

.flowmeet-widget.is-open {
  inset: 0;
  right: 0;
  bottom: 0;
  left: 0;
  top: 0;
}

.flowmeet-widget.is-open .flowmeet-widget__backdrop {
  opacity: 1;
  visibility: visible;
}

.flowmeet-widget.is-open .flowmeet-widget__panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.flowmeet-widget.is-open .flowmeet-widget__btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

.flowmeet-widget__panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  background: #fff;
}

.flowmeet-widget__panel-title {
  font-weight: 600;
  font-size: 1rem;
}

.flowmeet-widget__close {
  border: none;
  background: #f3f4f6;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flowmeet-widget__close:hover {
  background: var(--fm-accent-soft);
  color: var(--fm-accent);
}

.flowmeet-widget__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.flowmeet-widget__body .flowmeet-booking {
  border: none;
  border-radius: 0;
  max-width: none;
  height: 100%;
}

.flowmeet-widget__body .flowmeet-booking__schedule-row {
  grid-template-columns: 1fr 1fr;
}

.flowmeet-widget__body .flowmeet-booking {
  padding-bottom: 2rem;
}

.flowmeet-widget__body .flowmeet-booking__form-wrap {
  padding-bottom: 1.5rem;
}

.flowmeet-booking__done-calendar-note {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 0.9rem;
  line-height: 1.5;
}

.flowmeet-booking__reschedule-note {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.9rem;
}

.flowmeet-booking.is-rescheduling .flowmeet-booking__form .fw-field {
  display: none;
}

.flowmeet-booking__done-cancel {
  color: #b91c1c;
  border-color: #fecaca;
}

.flowmeet-widget__body .flowmeet-booking__submit {
  margin-bottom: .5rem;
}

.flowmeet-modal {
  z-index: 100001;
}

.flowmeet-booking--compact .flowmeet-booking__grid {
  grid-template-columns: 1fr;
}

.account-section--flowmeet .flowmeet-booking {
  max-width: none;
  border: 1px solid var(--fm-border);
}

.flowmeet-account-visual {
  position: relative;
  margin-top: 1rem;
}

.flowmeet-account-visual__intro {
  position: relative;
  z-index: 1;
}

@media (max-width: 1023px) {
  .account-section--flowmeet .flowmeet-account-visual__intro {
    padding-right: calc(min(280px, 42vw) + 1rem);
  }
}

.flowmeet-account-visual__hero {
  position: absolute;
  right: clamp(0.5rem, 4vw, 3rem);
  bottom: calc(100% - 30px);
  width: min(280px, 42vw);
  height: auto;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

.flowmeet-account-visual__card {
  position: relative;
  z-index: 1;
}

@media (max-width: 767px) {
  .flowmeet-account-visual__hero {
    width: min(200px, 55vw);
    right: 0.5rem;
    bottom: calc(100% - 22px);
  }

  .account-section--flowmeet .flowmeet-account-visual__intro {
    padding-right: calc(min(200px, 55vw) + 0.75rem);
  }
}

@media (max-width: 639px) {
  .flowmeet-widget__panel {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    top: 0;
    left: 0;
    transform: translateY(100%);
  }

  .flowmeet-widget.is-open .flowmeet-widget__panel {
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .flowmeet-widget:not(.is-open) {
    right: 1rem;
    bottom: 1rem;
  }
}

body.flowmeet-widget-open {
  overflow: hidden;
}
