/* Flyer — iPhone-style dock: AI Tools · Partner · Language (diamond) */

:root {
  --mim-iphone-teal: #197f8c;
  --mim-iphone-teal-dark: #0d6b7a;
  --mim-iphone-btn: 78px;
  --mim-iphone-dock-gap: 28px;
}

.mim-flyer__iphone-dock {
  position: absolute;
  left: 0;
  top: 0;
  bottom: auto;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.mim-flyer__iphone-dock.mim-flyer__iphone-dock--under-guide {
  opacity: 1;
  visibility: visible;
}

/* Keep dock hidden until the flyer has settled into its final scale. */
.mim-has-guide-map:not(.mim-flyer-ready) .mim-flyer__iphone-dock.mim-flyer__iphone-dock--under-guide {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.mim-flyer__iphone-dock--under-guide .mim-flyer__iphone-dock-panel {
  margin-top: var(--mim-iphone-dock-panel-top-gap, 96px);
}

.mim-flyer__iphone-dock-panel {
  pointer-events: auto;
  padding: 15px;
  border-radius: 27px;
  overflow: visible;
  background: linear-gradient(
    165deg,
    var(--mim-iphone-teal, #197f8c) 0%,
    var(--mim-iphone-teal-dark, #0d6b7a) 100%
  );
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(13, 107, 122, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.mim-flyer__iphone-dock-col,
.mim-flyer__iphone-dock-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--mim-iphone-dock-gap, 10px);
  width: var(--mim-iphone-btn);
  position: relative;
}

.mim-flyer__iphone-dock.is-ai-open .mim-flyer__iphone-dock-panel {
  min-width: 330px;
  padding: 15px 18px;
}

.mim-flyer__iphone-dock.is-ai-open .mim-flyer__iphone-dock-col,
.mim-flyer__iphone-dock.is-ai-open .mim-flyer__ai-tools-fan {
  align-items: stretch;
  width: 100%;
}

/* Compact fan: taller rows, clear spacing between tools. */
.mim-flyer__iphone-dock.is-ai-open .mim-flyer__ai-tools-fan {
  gap: 18px;
}

.mim-flyer__iphone-dock.is-ai-open .mim-iphone-tool-btn {
  width: 100%;
  height: calc(var(--mim-iphone-btn) * 1.4);
  min-height: calc(var(--mim-iphone-btn) * 1.4);
}

/* Keep icon circular (square box) — do not stretch to row height. */
.mim-flyer__iphone-dock.is-ai-open .mim-iphone-tool-btn__icon {
  width: var(--mim-iphone-btn);
  height: var(--mim-iphone-btn);
  flex-shrink: 0;
}

/* Shared dock button — circular, matching the round Unideals logo */
.mim-iphone-btn {
  appearance: none;
  border: none;
  margin: 0;
  padding: 0;
  width: var(--mim-iphone-btn);
  height: var(--mim-iphone-btn);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--mim-iphone-teal);
  transition: transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.mim-iphone-btn::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(25, 127, 140, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  z-index: 0;
}

.mim-iphone-btn:hover,
.mim-iphone-btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.mim-iphone-btn:hover::before,
.mim-iphone-btn:focus-visible::before {
  transform: scale(1.04);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(25, 127, 140, 0.18);
}

.mim-iphone-btn:active {
  transform: scale(0.96);
}

.mim-iphone-btn.is-active::before {
  background: linear-gradient(145deg, #ffffff 0%, #eef8fa 100%);
  box-shadow:
    0 0 0 2px var(--mim-iphone-teal),
    0 6px 18px rgba(25, 127, 140, 0.28);
}

.mim-iphone-btn i,
.mim-iphone-btn__diamond-inner {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.mim-iphone-btn i {
  font-size: 30px;
  line-height: 1;
}

.mim-iphone-btn__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Language button inner content (flag / code) */
.mim-iphone-btn--diamond {
  width: var(--mim-iphone-btn);
  height: var(--mim-iphone-btn);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  position: relative;
  z-index: 4;
  cursor: pointer;
}

.mim-iphone-btn--diamond .mim-iphone-btn__diamond-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--mim-iphone-teal);
}

.mim-iphone-btn--diamond .mim-iphone-btn__diamond-inner img {
  width: 62%;
  height: auto;
  max-width: 28px;
  max-height: 20px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  display: block;
}

.mim-iphone-btn--diamond .mim-iphone-btn__diamond-code {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

/* GTranslate mount — off-screen until language picker opens (keep real size for widget init) */
.mim-flyer__iphone-dock .mim-flyer__chrome-gtranslate {
  position: fixed !important;
  left: -9999px !important;
  top: 0 !important;
  width: 240px !important;
  height: auto !important;
  min-height: 44px !important;
  overflow: visible !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: auto !important;
  white-space: normal !important;
  z-index: -1 !important;
}

.mim-flyer__iphone-dock.is-lang-open .mim-flyer__chrome-gtranslate {
  display: none !important;
}

/* Portaled language panel — clean list below diamond (all viewports) */
#mimFlyerGtranslateMount.mim-flyer-gtranslate-portal {
  position: fixed !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  pointer-events: auto !important;
  clip: auto !important;
  overflow: visible !important;
  width: auto !important;
  height: auto !important;
  min-width: 200px !important;
  max-width: min(260px, calc(100vw - 24px)) !important;
  z-index: 100001 !important;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
}

#mimFlyerGtranslateMount.mim-flyer-gtranslate-portal #gt_float_wrapper,
#mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_float_switcher {
  display: block !important;
  visibility: visible !important;
  pointer-events: auto !important;
  position: relative !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  animation: none !important;
  backdrop-filter: none !important;
  perspective: none !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
  color: #1a3a40 !important;
}

#mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_float_switcher::before {
  display: none !important;
}

#mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt-selected {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

#mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options,
#mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options.gt-open {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  margin: 0 !important;
  padding: 6px !important;
  max-height: min(280px, 45vh) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  background: #ffffff !important;
  border-radius: 14px !important;
  border: 1px solid rgba(25, 127, 140, 0.18) !important;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.1),
    0 12px 36px rgba(13, 107, 122, 0.22) !important;
  backdrop-filter: none !important;
}

#mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 9px 12px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  color: #1a3a40 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  transform: none !important;
}

#mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options a:hover,
#mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options a:focus-visible {
  background: rgba(25, 127, 140, 0.1) !important;
  color: var(--mim-iphone-teal, #197f8c) !important;
  transform: none !important;
  box-shadow: none !important;
}

#mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options a.gt-current {
  background: rgba(25, 127, 140, 0.12) !important;
  color: var(--mim-iphone-teal, #197f8c) !important;
  font-weight: 600 !important;
}

#mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options img {
  width: 22px !important;
  height: 16px !important;
  margin: 0 !important;
  border-radius: 3px !important;
  object-fit: cover !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
  flex-shrink: 0 !important;
}

body.mim-lang-picker-open.mim-homepage-active .mim-has-guide-map .mim-flyer-slot {
  overflow: visible !important;
}

body.mim-lang-picker-open #mimFlyerGtranslateMount,
body.mim-lang-picker-open #mimFlyerGtranslateMount #gt_float_wrapper,
body.mim-lang-picker-open #mimFlyerGtranslateMount .gt_float_switcher,
body.mim-lang-picker-open #mimFlyerGtranslateMount .gt_options,
body.mim-lang-picker-open #mimFlyerGtranslateMount .gt_options a {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.mim-lang-picker-open #mimFlyerGtranslateMount .gt_float_switcher {
  display: block !important;
}

/* AI tools fan — hidden until AI Tools is opened */
.mim-flyer__ai-tools-fan {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: var(--mim-iphone-dock-gap, 10px);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease;
}

.mim-flyer__iphone-dock.is-ai-open .mim-flyer__ai-tools-fan {
  display: flex;
  max-height: var(--mim-ai-fan-max-height, min(520px, calc(100dvh - var(--mim-iphone-dock-panel-top-gap, 96px) - 220px)));
  opacity: 1;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
  pointer-events: auto;
  contain: paint;
  isolation: isolate;
  padding-bottom: 2px;
}

.mim-flyer__iphone-dock.is-ai-open .mim-flyer__ai-tools-fan::-webkit-scrollbar {
  width: 6px;
}

.mim-flyer__iphone-dock.is-ai-open .mim-flyer__ai-tools-fan::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.38);
  border-radius: 999px;
}

.mim-iphone-tool-btn {
  appearance: none;
  border: none;
  margin: 0;
  padding: 0 21px 0 0;
  min-width: var(--mim-iphone-btn);
  height: var(--mim-iphone-btn);
  border-radius: 21px;
  background: #ffffff;
  color: var(--mim-iphone-teal);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(25, 127, 140, 0.1);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  -webkit-tap-highlight-color: transparent;
}

.mim-iphone-tool-btn:hover,
.mim-iphone-tool-btn:focus-visible {
  transform: translateY(2px);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(25, 127, 140, 0.16);
  outline: none;
}

.mim-iphone-tool-btn__icon {
  position: relative;
  width: var(--mim-iphone-btn);
  height: var(--mim-iphone-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
}

.mim-iphone-tool-btn__icon::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: transparent;
  border-radius: 50%;
  box-shadow: none;
  z-index: 0;
}

.mim-iphone-tool-btn__icon i {
  position: relative;
  z-index: 1;
  font-size: 27px;
}

.mim-iphone-tool-btn__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  padding-right: 4px;
}

.mim-iphone-tool-btn__title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--mim-iphone-teal);
}

.mim-iphone-tool-btn__desc {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: rgba(25, 127, 140, 0.72);
}

/* Hide legacy travellers edge UI — iPhone dock replaces it */
body.mim-homepage-active .edge-button,
body.mim-homepage-active #widgetPanel,
body.mim-homepage-active .widget-panel {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Guide Tools modals opened from iPhone dock — must sit above flyer chrome */
body.mim-homepage-active .modal.show,
body.mim-homepage-active .unideals-gps-modal.show,
body.mim-homepage-active #translatorModal.show,
body.mim-homepage-active #guideGeekModal.show,
body.mim-homepage-active #emergencyModal.show,
body.mim-homepage-active #currencyModal.show,
body.mim-homepage-active #weatherModal.show,
body.mim-homepage-active #esimModal.show,
body.mim-homepage-active #itineraryModal.show,
body.mim-homepage-active #flightModal.show {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 100000 !important;
}

body.mim-homepage-active .modal.show .modal-content,
body.mim-homepage-active .unideals-gps-modal.show .unideals-gps-content,
body.mim-homepage-active #translatorModal.show .translator-modal-content,
body.mim-homepage-active #translatorModal.show .translator-body,
body.mim-homepage-active #translatorModal.show button,
body.mim-homepage-active #translatorModal.show textarea,
body.mim-homepage-active #translatorModal.show select,
body.mim-homepage-active #guideGeekModal.show .guide-geek-modal-content,
body.mim-homepage-active #guideGeekModal.show .guide-geek-body,
body.mim-homepage-active #guideGeekModal.show button,
body.mim-homepage-active #guideGeekModal.show textarea,
body.mim-homepage-active #guideGeekModal.show input,
body.mim-homepage-active #itineraryModal.show .itinerary-modal-content,
body.mim-homepage-active #itineraryModal.show .itinerary-body,
body.mim-homepage-active #itineraryModal.show button,
body.mim-homepage-active #itineraryModal.show input,
body.mim-homepage-active #itineraryModal.show .duration-card,
body.mim-homepage-active #itineraryModal.show .region-card,
body.mim-homepage-active #itineraryModal.show .interest-card,
body.mim-homepage-active #itineraryModal.show .pace-card {
  pointer-events: auto !important;
}
body.mim-homepage-active #flightModal.show .flight-modal-content,
body.mim-homepage-active #flightModal.show .flight-body,
body.mim-homepage-active #flightModal.show button,
body.mim-homepage-active #flightModal.show input,
body.mim-homepage-active #flightModal.show select,
body.mim-homepage-active #flightModal.show textarea,
body.mim-homepage-active #flightModal.show .form-tab,
body.mim-homepage-active #flightModal.show .view-pill,
body.mim-homepage-active #flightModal.show .calendar-cell:not(.empty) {
  pointer-events: auto !important;
}
body.mim-homepage-active #emergencyModal.show .emergency-modal-content,
body.mim-homepage-active #emergencyModal.show .emergency-body,
body.mim-homepage-active #emergencyModal.show button,
body.mim-homepage-active #emergencyModal.show .emergency-card,
body.mim-homepage-active #emergencyModal.show .emergency-action-btn,
body.mim-homepage-active #currencyModal.show .modal-content,
body.mim-homepage-active #currencyModal.show button,
body.mim-homepage-active #currencyModal.show input,
body.mim-homepage-active #currencyModal.show select,
body.mim-homepage-active #weatherModal.show .modal-content,
body.mim-homepage-active #weatherModal.show #weatherContent,
body.mim-homepage-active #weatherModal.show #weatherContent *,
body.mim-homepage-active #esimModal.show .modal-content,
body.mim-homepage-active #esimModal.show button,
body.mim-homepage-active #esimModal.show a,
body.mim-homepage-active #unidealsGpsModal.show .unideals-gps-content,
body.mim-homepage-active #unidealsGpsModal.show .unideals-gps-content * {
  pointer-events: auto !important;
}

.mim-flyer-map .mim-flyer-map__partner-anchor,
body.mim-homepage-active .mnpi-partner-widget,
body.mim-homepage-active #mnpiPartnerButton,
.mnpi-partner-widget.mnpi-partner-widget--flyer-inset {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Legacy chrome tools row replaced by dock */
.mim-flyer__chrome-tools:not(.mim-flyer__chrome-tools--legacy) {
  display: none;
}

@media (max-width: 1024px) {
  :root {
    --mim-iphone-btn: 104px;
    --mim-iphone-dock-gap: 20px;
  }

  /* Under-guide dock stays compact so it fits left of the "C" on touch. */
  .mim-flyer__iphone-dock.mim-flyer__iphone-dock--under-guide {
    --mim-iphone-btn: 92px;
    --mim-iphone-dock-gap: 26px;
    z-index: 80;
  }

  .mim-flyer__iphone-dock.mim-flyer__iphone-dock--under-guide .mim-flyer__iphone-dock-panel {
    padding: 13px;
    border-radius: 30px;
  }

  .mim-flyer__iphone-dock.mim-flyer__iphone-dock--under-guide .mim-iphone-btn i {
    font-size: 36px;
  }

  .mim-flyer__iphone-dock.mim-flyer__iphone-dock--under-guide .mim-iphone-btn--diamond .mim-iphone-btn__diamond-inner {
    font-size: 20px;
  }

  .mim-flyer__iphone-dock.mim-flyer__iphone-dock--under-guide .mim-iphone-btn::before,
  .mim-flyer__iphone-dock.mim-flyer__iphone-dock--under-guide .mim-iphone-tool-btn__icon::before {
    inset: 8px;
    border-radius: 50%;
  }

  body.mim-lang-picker-open .mim-flyer__iphone-dock.mim-flyer__iphone-dock--under-guide {
    z-index: 100000 !important;
  }

  .mim-flyer__iphone-dock-panel {
    padding: 20px;
    border-radius: 36px;
  }

  .mim-flyer__iphone-dock.is-ai-open .mim-flyer__iphone-dock-panel {
    min-width: 440px;
    padding: 20px 24px;
  }

  .mim-flyer__iphone-dock.is-ai-open .mim-flyer__ai-tools-fan {
    max-height: var(--mim-ai-fan-max-height, min(720px, calc(100dvh - var(--mim-iphone-dock-panel-top-gap, 96px) - 200px)));
  }

  .mim-iphone-btn::before,
  .mim-iphone-tool-btn__icon::before {
    inset: 8px;
    border-radius: 50%;
  }

  .mim-iphone-btn i {
    font-size: 40px;
  }

  .mim-iphone-btn--diamond .mim-iphone-btn__diamond-inner {
    font-size: 22px;
  }

  .mim-iphone-btn--diamond .mim-iphone-btn__diamond-inner img {
    max-width: 48px;
    max-height: 36px;
    border-radius: 6px;
  }

  .mim-iphone-btn--diamond .mim-iphone-btn__diamond-code {
    font-size: 20px;
  }

  .mim-iphone-tool-btn {
    padding: 0 28px 0 0;
    border-radius: 28px;
    gap: 20px;
  }

  .mim-iphone-tool-btn__icon i {
    font-size: 36px;
  }

  .mim-iphone-tool-btn__text {
    padding-right: 8px;
  }

  .mim-iphone-tool-btn__title {
    font-size: 24px;
  }

  .mim-iphone-tool-btn__desc {
    font-size: 20px;
  }

  #mimFlyerGtranslateMount.mim-flyer-gtranslate-portal {
    min-width: 400px !important;
    max-width: min(520px, calc(100vw - 24px)) !important;
  }

  #mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_float_switcher {
    font-size: 28px !important;
  }

  #mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options,
  #mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options.gt-open {
    padding: 12px !important;
    border-radius: 28px !important;
    max-height: min(560px, 45vh) !important;
  }

  #mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options a {
    gap: 20px !important;
    padding: 18px 24px !important;
    border-radius: 16px !important;
    font-size: 28px !important;
  }

  #mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options img {
    width: 44px !important;
    height: 32px !important;
    border-radius: 6px !important;
  }
}

@media (max-width: 767px) {
  :root {
    --mim-iphone-btn: 96px;
  }

  .mim-flyer__iphone-dock.mim-flyer__iphone-dock--under-guide {
    --mim-iphone-btn: 86px;
    --mim-iphone-dock-gap: 24px;
  }

  .mim-flyer__iphone-dock.mim-flyer__iphone-dock--under-guide .mim-flyer__iphone-dock-panel {
    padding: 11px;
    border-radius: 26px;
  }

  .mim-flyer__iphone-dock-panel {
    padding: 16px;
    border-radius: 32px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  :root {
    --mim-iphone-btn: 78px;
    --mim-iphone-dock-gap: 15px;
  }

  .mim-flyer__iphone-dock-panel {
    padding: 15px;
    border-radius: 27px;
  }

  .mim-flyer__iphone-dock.is-ai-open .mim-flyer__iphone-dock-panel {
    min-width: 330px;
    padding: 15px 18px;
  }

  .mim-flyer__iphone-dock.is-ai-open .mim-flyer__ai-tools-fan {
    max-height: var(--mim-ai-fan-max-height, min(540px, calc(100dvh - var(--mim-iphone-dock-panel-top-gap, 96px) - 200px)));
  }

  .mim-iphone-btn::before,
  .mim-iphone-tool-btn__icon::before {
    inset: 8px;
    border-radius: 50%;
  }

  .mim-iphone-btn i {
    font-size: 30px;
  }

  .mim-iphone-btn--diamond .mim-iphone-btn__diamond-inner {
    font-size: 17px;
  }

  .mim-iphone-btn--diamond .mim-iphone-btn__diamond-inner img {
    max-width: 36px;
    max-height: 27px;
    border-radius: 5px;
  }

  .mim-iphone-btn--diamond .mim-iphone-btn__diamond-code {
    font-size: 15px;
  }

  .mim-iphone-tool-btn {
    padding: 0 21px 0 0;
    border-radius: 21px;
    gap: 15px;
  }

  .mim-iphone-tool-btn__icon i {
    font-size: 27px;
  }

  .mim-iphone-tool-btn__text {
    padding-right: 6px;
  }

  .mim-iphone-tool-btn__title {
    font-size: 18px;
  }

  .mim-iphone-tool-btn__desc {
    font-size: 15px;
  }

  #mimFlyerGtranslateMount.mim-flyer-gtranslate-portal {
    min-width: 300px !important;
    max-width: min(390px, calc(100vw - 24px)) !important;
  }

  #mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_float_switcher {
    font-size: 21px !important;
  }

  #mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options,
  #mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options.gt-open {
    padding: 9px !important;
    border-radius: 21px !important;
    max-height: min(420px, 45vh) !important;
  }

  #mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options a {
    gap: 15px !important;
    padding: 14px 18px !important;
    border-radius: 12px !important;
    font-size: 21px !important;
  }

  #mimFlyerGtranslateMount.mim-flyer-gtranslate-portal .gt_options img {
    width: 33px !important;
    height: 24px !important;
    border-radius: 5px !important;
  }
}

html.mim-flyer-loading .mim-flyer__iphone-dock,
html.mim-flyer-loading .mim-flyer__ai-tools-fan,
.mim-has-guide-map.mim-flyer-pending .mim-flyer__iphone-dock,
.mim-has-guide-map.mim-flyer-pending .mim-flyer__ai-tools-fan,
body.mg-modal-open .mim-flyer__iphone-dock,
body.mg-dmodal-open .mim-flyer__iphone-dock,
body.mnpi-modal-open .mim-flyer__iphone-dock,
body.mim-didi-open .mim-flyer__iphone-dock {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Never show dock / AI fan at 0,0 before JS positions under Complete Guide */
.mim-flyer__iphone-dock:not(.mim-flyer__iphone-dock--under-guide),
.mim-flyer__iphone-dock:not(.mim-flyer__iphone-dock--under-guide) .mim-flyer__ai-tools-fan {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.mim-flyer__iphone-dock.mim-flyer__iphone-dock--under-guide:not(.is-ai-open) .mim-flyer__ai-tools-fan {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  max-height: 0 !important;
  pointer-events: none !important;
}
