/**
 * Via Firenze - Private Showroom & Fitting Booking Modal (Magnanni Style)
 */

:root {
  --vf-ink: #1e1611;
  --vf-text: #3a2f28;
  --vf-muted: #6e645e;
  --vf-accent: #8b4a24;
  --vf-accent-hover: #5c1f26;
  --vf-border: rgba(30, 22, 17, 0.14);
  --vf-border-light: rgba(30, 22, 17, 0.08);
  --vf-bg-soft: #faf9f7;
  --vf-font-heading: inherit;
  --vf-font-body: inherit;
}

/* Inherit typography directly from website theme */
.vf-modal-overlay,
.vf-modal-wrapper,
.vf-modal-wrapper input,
.vf-modal-wrapper button,
.vf-modal-wrapper textarea,
.vf-modal-wrapper select,
.vf-modal-wrapper h1,
.vf-modal-wrapper h2,
.vf-modal-wrapper h3,
.vf-modal-wrapper h4,
.vf-modal-wrapper p,
.vf-modal-wrapper span,
.vf-modal-wrapper strong,
.vf-modal-wrapper a {
  font-family: inherit !important;
}

/* Modal Overlay */
.vf-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 14, 11, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  padding: 20px;
  box-sizing: border-box;
}

.vf-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* Split Modal Card */
.vf-modal-wrapper {
  position: relative !important;
  width: 100% !important;
  max-width: 940px !important;
  max-height: 90vh !important;
  background: #ffffff !important;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28) !important;
  display: flex !important;
  flex-direction: row !important;
  overflow: hidden !important;
  border-radius: 2px !important;
  box-sizing: border-box !important;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.vf-modal-overlay.is-active .vf-modal-wrapper {
  transform: translateY(0) scale(1);
}

/* Close Button (Anchored firmly in top-right corner) */
.vf-modal-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  left: auto !important;
  bottom: auto !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.16) !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  z-index: 9999999 !important;
  color: var(--vf-ink) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  transform: none !important;
  float: none !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16) !important;
  transition: all 0.2s ease !important;
}

.vf-modal-close:hover {
  background: #1e1611 !important;
  color: #ffffff !important;
  transform: rotate(90deg) !important;
}

.vf-modal-close:hover svg line {
  stroke: #ffffff !important;
}

.vf-modal-close svg {
  width: 18px !important;
  height: 18px !important;
  stroke: #1e1611 !important;
  stroke-width: 2 !important;
  display: block !important;
  margin: 0 !important;
}

/* Left Column: Form & Calendar */
.vf-modal-col-content {
  flex: 1 1 54%;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  overflow-y: auto;
  max-height: 90vh;
  background: #ffffff;
  font-family: var(--vf-font-body);
}

/* Right Column: High-Res Handcrafted Leather Shoe Image */
.vf-modal-col-media {
  flex: 1 1 46%;
  position: relative;
  background: var(--vf-bg-soft);
  overflow: hidden;
  min-height: 100%;
  display: flex;
}

.vf-modal-col-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.vf-media-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.1) 60%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
}

.vf-media-caption {
  position: absolute;
  bottom: 22px;
  left: 20px;
  right: 20px;
  z-index: 5;
  color: #ffffff;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.9;
}

/* Header Text Blocks */
.vf-modal-header-block {
  text-align: center;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.vf-modal-header-block.is-compact {
  margin-bottom: 12px;
}
.vf-modal-header-block.is-compact .vf-modal-desc,
.vf-modal-header-block.is-compact .vf-modal-emblem {
  display: none !important;
}
.vf-modal-header-block.is-compact .vf-modal-title {
  font-size: 20px !important;
  margin-bottom: 2px !important;
}

.vf-modal-eyebrow {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--vf-muted);
  margin-bottom: 8px;
}

.vf-modal-title {
  font-family: var(--vf-font-heading) !important;
  font-size: 27px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.06em !important;
  color: var(--vf-ink) !important;
  text-transform: uppercase !important;
  margin: 0 0 10px 0 !important;
}

.vf-modal-desc {
  font-size: 12.5px;
  line-height: 1.6;
  color: #5a5048;
  margin: 0 auto;
  max-width: 380px;
  font-weight: 300;
}

.vf-modal-emblem {
  margin: 16px auto 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Step Panes */
.vf-step-pane {
  display: none;
  width: 100%;
}
.vf-step-pane.is-active {
  display: block;
  animation: vfFadeInStep 0.3s ease-out;
}

@keyframes vfFadeInStep {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Step 1 Form, Inputs & Buttons */
.vf-phone-form {
  max-width: 360px !important;
  width: 100% !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  box-sizing: border-box !important;
}

.vf-input-wrap {
  position: relative !important;
  margin-bottom: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.vf-luxury-input {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  line-height: 52px !important;
  border: 1.5px solid var(--vf-ink) !important;
  border-radius: 2px !important;
  background: #ffffff !important;
  padding: 0 16px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.05em !important;
  color: var(--vf-ink) !important;
  box-sizing: border-box !important;
  text-align: center !important;
  display: block !important;
  margin: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.vf-luxury-input::placeholder {
  color: #8c827a !important;
  letter-spacing: 0.04em !important;
  font-size: 12px !important;
  opacity: 0.9 !important;
}

.vf-luxury-input:focus {
  border-color: #000000 !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12) !important;
}

.vf-input-error {
  display: block !important;
  font-size: 11px !important;
  color: #c92a2a !important;
  margin-top: 5px !important;
  text-align: center !important;
  min-height: 16px !important;
}

.vf-luxury-btn {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  line-height: 52px !important;
  background: var(--vf-ink) !important;
  color: #ffffff !important;
  border: 1px solid var(--vf-ink) !important;
  border-radius: 2px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 24px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
}

.vf-luxury-btn:hover:not([disabled]) {
  background: #382c23 !important;
  border-color: #382c23 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.vf-luxury-btn[disabled] {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.vf-modal-subnote {
  font-size: 11px !important;
  color: var(--vf-muted) !important;
  text-align: center !important;
  margin-top: 14px !important;
  line-height: 1.5 !important;
  font-style: italic !important;
}

/* Step 2: Back Button */
.vf-step2-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.vf-back-btn {
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  font-family: var(--vf-font-body);
  font-size: 11px;
  color: var(--vf-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  transition: color 0.2s;
}
.vf-back-btn:hover { color: var(--vf-ink); }

/* Interactive Calendar */
.vf-calendar-container {
  background: var(--vf-bg-soft);
  border: 1px solid var(--vf-border);
  padding: 16px;
  border-radius: 2px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.vf-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.vf-cal-month-label {
  font-family: var(--vf-font-heading);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vf-ink);
}

.vf-cal-nav-btn {
  background: transparent !important;
  border: 1px solid var(--vf-border) !important;
  border-radius: 50% !important;
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  color: var(--vf-ink) !important;
  padding: 0 !important;
  transition: all 0.2s ease;
}
.vf-cal-nav-btn:hover:not([disabled]) {
  background: #ffffff !important;
  border-color: var(--vf-ink) !important;
}

.vf-cal-nav-btn[disabled],
.vf-cal-nav-btn.is-disabled {
  opacity: 0.22 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  border-color: transparent !important;
}

.vf-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--vf-muted);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

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

.vf-cal-day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  border-radius: 50%;
  cursor: default;
  transition: all 0.15s ease;
  user-select: none;
  box-sizing: border-box;
}

.vf-cal-day-cell.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.vf-cal-day-cell.is-disabled {
  color: #c4bebb;
  pointer-events: none;
  opacity: 0.45;
}

.vf-cal-day-cell.is-available {
  cursor: pointer;
  color: var(--vf-ink);
  background: #ffffff;
  border: 1px solid var(--vf-border);
}

.vf-cal-day-cell.is-available:hover {
  border-color: var(--vf-accent);
  color: var(--vf-accent);
  transform: scale(1.08);
}

.vf-cal-day-cell.is-selected {
  background: var(--vf-ink) !important;
  color: #ffffff !important;
  border-color: var(--vf-ink) !important;
  font-weight: 600 !important;
  transform: scale(1.06);
}

/* Time Slots */
.vf-slots-section {
  margin-bottom: 16px;
  transition: all 0.25s ease;
}
.vf-slots-section.is-hidden { display: none; }

.vf-slots-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vf-ink);
  margin: 0 0 8px 0;
}

.vf-slots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.vf-slot-btn {
  height: 38px;
  border: 1px solid var(--vf-border) !important;
  background: #ffffff !important;
  color: var(--vf-ink) !important;
  font-family: var(--vf-font-body);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.vf-slot-btn:hover:not([disabled]) {
  border-color: var(--vf-ink) !important;
}

.vf-slot-btn.is-selected {
  background: var(--vf-ink) !important;
  color: #ffffff !important;
  border-color: var(--vf-ink) !important;
  font-weight: 600;
}

.vf-slot-btn[disabled] {
  background: #f0eeeb !important;
  color: #a39b95 !important;
  border-color: transparent !important;
  cursor: not-allowed;
  text-decoration: line-through;
  opacity: 0.6;
}

.vf-form-feedback {
  margin-top: 10px;
  font-size: 11.5px;
  text-align: center;
  min-height: 18px;
  font-weight: 500;
}
.vf-form-feedback.is-error { color: #c92a2a; }
.vf-form-feedback.is-success { color: #2b8a3e; }

/* Confirmation Step 3 */
.vf-confirmation-card {
  text-align: center;
  padding: 10px 0;
}

.vf-confirm-icon {
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
}

.vf-confirm-title {
  font-family: var(--vf-font-heading);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vf-ink);
  margin: 0 0 10px 0;
}

.vf-confirm-desc {
  font-size: 12.5px;
  line-height: 1.6;
  color: #4a4038;
  margin: 0 auto 20px auto;
  max-width: 360px;
}

.vf-confirm-details {
  background: var(--vf-bg-soft);
  border: 1px solid var(--vf-border);
  padding: 16px 20px;
  border-radius: 2px;
  margin-bottom: 22px;
  text-align: left;
}

.vf-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--vf-border-light);
  font-size: 12px;
}
.vf-detail-row:last-child { border-bottom: none; }
.vf-detail-lbl { color: var(--vf-muted); }
.vf-detail-val { color: var(--vf-ink); font-weight: 600; }

.vf-wa-confirm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  background: #25d366;
  color: #ffffff;
  border-radius: 2px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.2s ease;
}
.vf-wa-confirm-btn:hover {
  background: #1eb855;
  color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE (SMARTPHONES & TABLETS)
   ========================================================================== */
@media (max-width: 768px) {
  .vf-modal-wrapper {
    flex-direction: column;
    max-width: 95vw;
    max-height: 92vh;
    border-radius: 3px;
  }

  .vf-modal-col-media {
    display: none; /* Hide on mobile so booking form fits cleanly without double scroll */
  }

  .vf-modal-col-content {
    flex: 1 1 100%;
    padding: 35px 22px 30px 22px;
    max-height: 92vh;
  }

  .vf-modal-title {
    font-size: 23px !important;
  }

  .vf-slots-grid {
    grid-template-columns: 1fr;
  }

  .vf-cal-day-cell {
    font-size: 11.5px;
  }
}
