/* MoroccoPlan Premium Booking Form — single-page widget */

.mpeb-widget {
  --mpeb-primary: #0f766e;
  --mpeb-btn-bg: #111827;
  --mpeb-btn-bg-hover: #1f2937;
  --mpeb-btn-color: #ffffff;
  --mpeb-text: #111827;
  --mpeb-text-secondary: #6b7280;
  --mpeb-text-muted: #9ca3af;
  --mpeb-border: #e5e7eb;
  --mpeb-bg: #ffffff;
  --mpeb-whatsapp: #25d366;
  --mpeb-whatsapp-hover: #1da851;
  --mpeb-radius: 16px;
  --mpeb-radius-sm: 12px;
  --mpeb-shadow: 0 8px 30px rgba(17, 24, 39, 0.08);
  --mpeb-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mpeb-ease: cubic-bezier(0.16, 1, 0.3, 1);

  font-family: var(--mpeb-font);
  color: var(--mpeb-text);
  background: var(--mpeb-bg);
  border-radius: var(--mpeb-radius);
  box-shadow: var(--mpeb-shadow);
  border: 1px solid var(--mpeb-border);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  max-width: 480px;
  width: 100%;
  min-width: 0;
  position: relative;
  box-sizing: border-box;
}

.mpeb-widget *,
.mpeb-widget *::before,
.mpeb-widget *::after {
  box-sizing: border-box;
}

.mpeb-widget__inner {
  padding: 24px;
}

.mpeb-header-price {
  font-size: 14px;
  color: var(--mpeb-text-secondary);
  margin-bottom: 4px;
}

.mpeb-header-price strong {
  font-size: 26px;
  font-weight: 800;
  color: var(--mpeb-text);
  letter-spacing: -0.02em;
}

.mpeb-section {
  margin-bottom: 22px;
}

.mpeb-widget h3.mpeb-section__title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  padding: 0;
  color: var(--mpeb-text);
  display: block;
  line-height: 1.4;
}

/* Options */
.mpeb-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mpeb-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--mpeb-border);
  border-radius: var(--mpeb-radius-sm);
  cursor: pointer;
  transition: border-color 0.2s var(--mpeb-ease), background 0.2s var(--mpeb-ease);
}

.mpeb-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mpeb-option:hover {
  border-color: #d1d5db;
}

.mpeb-option.is-selected {
  border-color: var(--mpeb-primary);
  background: rgba(15, 118, 110, 0.04);
}

.mpeb-option__radio {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}

.mpeb-option.is-selected .mpeb-option__radio {
  border-color: var(--mpeb-primary);
}

.mpeb-option.is-selected .mpeb-option__radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--mpeb-primary);
  border-radius: 50%;
}

.mpeb-option__label {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mpeb-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: #d1fae5;
  color: #065f46;
}

.mpeb-option__price {
  font-weight: 700;
  font-size: 14px;
}

/* Text inputs */
.mpeb-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 11px 14px;
  border: 1.5px solid var(--mpeb-border);
  border-radius: var(--mpeb-radius-sm);
  font-family: var(--mpeb-font);
  font-size: 14px;
  background: var(--mpeb-bg);
  color: var(--mpeb-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.mpeb-input:focus {
  border-color: var(--mpeb-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.mpeb-input.is-invalid {
  border-color: #dc2626;
}

.mpeb-field__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mpeb-text-secondary);
  margin-bottom: 6px;
  display: block;
}

/* ─── Date picker (incremental — matches option card style) ─── */
.mpeb-date-picker {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.mpeb-widget button.mpeb-date-trigger {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--mpeb-border);
  border-radius: var(--mpeb-radius-sm);
  background: var(--mpeb-bg);
  color: var(--mpeb-text);
  font-family: var(--mpeb-font);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s var(--mpeb-ease), box-shadow 0.2s var(--mpeb-ease);
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  margin: 0;
}

.mpeb-date-trigger__icon {
  flex-shrink: 0;
  display: flex;
  color: var(--mpeb-primary);
}

.mpeb-date-trigger__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.mpeb-date-trigger__text.is-placeholder {
  color: var(--mpeb-text);
  font-weight: 500;
}

.mpeb-date-trigger__arrow {
  flex-shrink: 0;
  display: flex;
  color: var(--mpeb-text-secondary);
  transition: transform 0.2s var(--mpeb-ease);
}

.mpeb-widget button.mpeb-date-trigger:hover {
  border-color: #d1d5db;
}

.mpeb-widget button.mpeb-date-trigger.is-open,
.mpeb-widget button.mpeb-date-trigger:focus-visible {
  border-color: var(--mpeb-primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}

.mpeb-date-trigger.is-open .mpeb-date-trigger__arrow {
  transform: rotate(180deg);
  color: var(--mpeb-primary);
}

.mpeb-widget button.mpeb-date-trigger.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.mpeb-calendar {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--mpeb-bg);
  border: 1.5px solid var(--mpeb-border);
  border-radius: var(--mpeb-radius-sm);
  box-shadow: 0 12px 40px rgba(17, 24, 39, 0.12);
  padding: 16px;
}

.mpeb-calendar[hidden] {
  display: none !important;
}

.mpeb-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}

.mpeb-calendar__title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}

.mpeb-widget button.mpeb-calendar__nav {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1.5px solid var(--mpeb-border);
  border-radius: 50%;
  background: var(--mpeb-bg);
  color: var(--mpeb-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}

.mpeb-widget button.mpeb-calendar__nav:hover:not(:disabled) {
  border-color: var(--mpeb-primary);
  background: rgba(15, 118, 110, 0.06);
}

.mpeb-widget button.mpeb-calendar__nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.mpeb-calendar__dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}

.mpeb-calendar__dow span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--mpeb-primary);
  padding: 4px 0;
}

.mpeb-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.mpeb-widget button.mpeb-calendar__day {
  aspect-ratio: 1;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--mpeb-text);
  font-family: var(--mpeb-font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}

.mpeb-widget button.mpeb-calendar__day:hover:not(:disabled):not(.is-selected) {
  background: rgba(15, 118, 110, 0.08);
  color: var(--mpeb-primary);
}

.mpeb-widget button.mpeb-calendar__day.is-selected {
  background: var(--mpeb-primary);
  color: #fff;
  font-weight: 700;
}

.mpeb-widget button.mpeb-calendar__day:disabled {
  color: var(--mpeb-text-muted);
  cursor: not-allowed;
  opacity: 0.45;
}

.mpeb-widget button.mpeb-calendar__day.is-sold-out {
  color: #b45309;
  opacity: 0.85;
  font-weight: 600;
  position: relative;
}

.mpeb-widget button.mpeb-calendar__day.is-sold-out::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70%;
  height: 1px;
  background: #b45309;
  transform: translate(-50%, -50%) rotate(-45deg);
  pointer-events: none;
}

.mpeb-widget button.mpeb-calendar__day.is-blackout,
.mpeb-widget button.mpeb-calendar__day.is-closed {
  opacity: 0.35;
}

/* Guests */
.mpeb-guests {
  border: 1.5px solid var(--mpeb-border);
  border-radius: var(--mpeb-radius-sm);
  overflow: hidden;
}

.mpeb-guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--mpeb-border);
}

.mpeb-guest-row:last-child {
  border-bottom: none;
}

.mpeb-guest-row__title {
  font-weight: 700;
  font-size: 14px;
}

.mpeb-guest-row__age {
  font-size: 12px;
  color: var(--mpeb-text-muted);
  margin-top: 2px;
}

.mpeb-stepper {
  display: flex;
  align-items: center;
}

.mpeb-widget button.mpeb-stepper__btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1.5px solid var(--mpeb-border) !important;
  border-radius: 50%;
  background: var(--mpeb-bg) !important;
  background-image: none !important;
  color: var(--mpeb-primary) !important;
  font-size: 18px;
  font-family: var(--mpeb-font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  line-height: 1;
}

.mpeb-widget button.mpeb-stepper__btn:hover:not(:disabled) {
  border-color: var(--mpeb-primary);
  background: rgba(15, 118, 110, 0.06);
}

.mpeb-widget button.mpeb-stepper__btn:disabled {
  color: var(--mpeb-text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.mpeb-stepper__value {
  min-width: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
}

/* Extras */
.mpeb-extras {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mpeb-extra {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--mpeb-border);
  border-radius: var(--mpeb-radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.mpeb-extra input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mpeb-extra:hover {
  border-color: #d1d5db;
}

.mpeb-extra.is-checked {
  border-color: var(--mpeb-primary);
  background: rgba(15, 118, 110, 0.04);
}

.mpeb-extra__check {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 5px;
  flex-shrink: 0;
  position: relative;
}

.mpeb-extra.is-checked .mpeb-extra__check {
  background: var(--mpeb-primary);
  border-color: var(--mpeb-primary);
}

.mpeb-extra.is-checked .mpeb-extra__check::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.mpeb-extra__name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.mpeb-extra__price {
  font-weight: 700;
  font-size: 13px;
  color: var(--mpeb-text-secondary);
}

/* Custom fields */
.mpeb-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mpeb-field textarea.mpeb-input {
  min-height: 80px;
  resize: vertical;
}

/* Summary */
.mpeb-summary {
  border-top: 1.5px solid var(--mpeb-border);
  padding-top: 20px;
  margin-top: 4px;
}

.mpeb-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mpeb-total__label {
  font-size: 16px;
  font-weight: 700;
}

.mpeb-total__price {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: transform 0.2s var(--mpeb-ease);
}

.mpeb-total__price.is-updating {
  animation: mpebPricePop 0.3s var(--mpeb-ease);
}

@keyframes mpebPricePop {
  0% { transform: scale(1.06); color: var(--mpeb-primary); }
  100% { transform: scale(1); }
}

/* Buttons — theme isolation on named classes only */
.mpeb-widget button.mpeb-btn,
.mpeb-widget a.mpeb-btn {
  width: 100%;
  padding: 15px 24px;
  border: none;
  border-radius: var(--mpeb-radius-sm);
  font-family: var(--mpeb-font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.2;
}

.mpeb-widget button.mpeb-btn--primary,
.elementor-widget-mpeb-booking .mpeb-widget button.mpeb-btn--primary {
  background-color: var(--mpeb-btn-bg) !important;
  background-image: none !important;
  color: var(--mpeb-btn-color) !important;
}

.mpeb-widget button.mpeb-btn--primary:hover,
.elementor-widget-mpeb-booking .mpeb-widget button.mpeb-btn--primary:hover {
  background-color: var(--mpeb-btn-bg-hover) !important;
  color: var(--mpeb-btn-color) !important;
}

@media (hover: hover) and (pointer: fine) {
  .mpeb-widget button.mpeb-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  }
}

.mpeb-widget button.mpeb-btn--primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.mpeb-widget button.mpeb-btn--primary svg {
  stroke: currentColor;
  fill: none;
}

/* WhatsApp button — incremental improvement */
.mpeb-widget a.mpeb-btn--whatsapp,
.elementor-widget-mpeb-booking .mpeb-widget a.mpeb-btn--whatsapp {
  margin-top: 12px;
  background-color: var(--mpeb-whatsapp) !important;
  background-image: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: background-color 0.2s var(--mpeb-ease), transform 0.2s var(--mpeb-ease), box-shadow 0.2s var(--mpeb-ease);
}

.mpeb-widget a.mpeb-btn--whatsapp:hover,
.elementor-widget-mpeb-booking .mpeb-widget a.mpeb-btn--whatsapp:hover {
  background-color: var(--mpeb-whatsapp-hover) !important;
  color: #ffffff !important;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

.mpeb-widget a.mpeb-btn--whatsapp:active {
  transform: translateY(0);
}

.mpeb-btn__icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mpeb-btn__icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.mpeb-trust {
  text-align: center;
  font-size: 12px;
  color: var(--mpeb-text-muted);
  margin: 10px 0 0;
  line-height: 1.5;
}

/* Mobile sticky bar */
.mpeb-sticky {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--mpeb-border);
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 9999;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.mpeb-sticky.is-hidden {
  opacity: 0;
  transform: translateY(110%);
  visibility: hidden;
  pointer-events: none;
}

.mpeb-sticky__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.mpeb-sticky__price {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--mpeb-text);
}

.mpeb-sticky__summary {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--mpeb-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mpeb-sticky__summary:empty {
  display: none;
}

.mpeb-widget .mpeb-sticky button.mpeb-btn.mpeb-sticky__cta,
.mpeb-widget[data-mpeb-config] .mpeb-sticky button.mpeb-btn.mpeb-sticky__cta {
  flex: 0 0 auto;
  width: 200px;
  min-width: 180px;
  max-width: 220px;
  padding: 12px 20px;
  font-size: 15px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform: none !important;
  cursor: pointer;
}

.mpeb-widget .mpeb-sticky button.mpeb-btn.mpeb-sticky__cta:hover,
.mpeb-widget .mpeb-sticky button.mpeb-btn.mpeb-sticky__cta:active {
  transform: none !important;
  box-shadow: none;
}

@media (max-width: 767px) {
  .mpeb-widget[data-mpeb-config] .mpeb-sticky {
    display: flex;
  }

  .mpeb-widget__inner {
    padding-bottom: 88px;
  }
}

/* Elementor column shrink fix */
.elementor-widget-mpeb-booking {
  min-width: 0;
  max-width: 100%;
}

.elementor-widget-mpeb-booking .elementor-widget-container {
  min-width: 0;
  max-width: 100%;
}

.mpeb-placeholder {
  padding: 24px;
  text-align: center;
  color: var(--mpeb-text-secondary);
  border: 2px dashed var(--mpeb-border);
  border-radius: var(--mpeb-radius-sm);
}
