.iti {
  width: 100%;
}
.mm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 992px) {
  .mm-grid {
    grid-template-columns: 2fr 1fr;
  }
}
.mm-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mm-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
}
.mm-row {
  margin-bottom: 12px;
}
.mm-input,
.mm-select,
.mm-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.mm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #111827;
  color: #fff;
  border: 0;
  width: 100%;
  text-align: center;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 20px 18px;
  cursor: pointer;
}

.mm-btn:hover {
  background: #1b2438;
}

.mm-btn .mm-btn__spinner {
  display: none;
}

.mm-btn--loading .mm-btn__spinner {
  display: block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mm-button-spin 0.8s linear infinite;
}

.mm-btn .mm-btn-icons {
  width: 20px;
  height: 20px;
}
.mm-btn--loading .mm-btn__text {
  display: none;
}

@keyframes mm-button-spin {
  to {
    transform: rotate(360deg);
  }
}

.mm-h {
  margin: 0.3rem 0 0.6rem;
  font-weight: 600;
}
.mm-help {
  color: #6b7280;
  font-size: 0.875rem;
}
.mm-right img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}
.mm-badge {
  display: inline-block;
  background: #111827;
  color: #fff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
}
.mm-success {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.mm-error {
  color: #b91c1c;
}
/* Loader overlay sur le bloc des 2 selects */
.mm-grid {
  position: relative;
}
.mm-loader[hidden] {
  display: none !important;
}
.mm-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(1px);
  z-index: 10;
  border-radius: 12px;
}
.mm-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e5e7eb;
  border-top-color: #111827; /* adapte à ta primary si besoin */
  border-radius: 50%;
  animation: mmspin 0.8s linear infinite;
}
@keyframes mmspin {
  to {
    transform: rotate(360deg);
  }
}

#mmbp-preview {
  height: fit-content;
  padding-inline: 20px;
}
.mm-help.mm-kicker {
  font-weight: bold;
  font-size: larger;
  color: #111827;
}
p.mm-help {
  margin: 0 !important;
}
.mm-loading .mm-select {
  opacity: 0.5;
  pointer-events: none;
}
.mm-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}
.mm-meta-row :last-child {
  font-weight: 600;
}
.mm-meta-row:last-child {
  border-bottom: none;
}
#mmbp-preview-title {
  margin-top: 5px;
}
.mm-cta {
  padding: 10px 20px;
  background-color: #edf9f8;
  border-radius: 15px;
}

.mm-filters {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

@media (min-width: 768px) {
  .mm-filters {
    grid-template-columns: 1fr 1fr;
  }
}
.mm-row button.iti__selected-country {
  background-color: transparent !important;
  padding: 0;
  border: none;
  border-radius: none;
}
.woocommerce-ordering {
  display: flex !important;
  align-items: center;
}
.mm-filters__row {
  margin-left: 10px;
  display: flex !important;
  gap: 10px;
  align-items: center;
  width: 100%;
}
.mm-filters__row .mm-select {
  min-width: auto;
}
.mm-filters__row label {
  font-weight: 600;
  font-size: 0.9rem;
}
.mm-input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15);
}

/** custom select */
.mm_custom-select-container {
  position: relative;
  width: 100%;
  /* Éviter que le container interfère avec le scroll */
  overflow: visible;
}

.mm_select-input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: max(16px, 1rem); /* Évite le zoom automatique sur iOS/Android */
  background: white;
  cursor: text;
  transition: all 0.3s ease;
  outline: none;
}

.mm_select-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mm_dropdown-arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: transform 0.3s ease;
  color: #666;
}

.mm_dropdown-arrow.open {
  transform: translateY(-50%) rotate(180deg);
}

.mm_options-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e1e5e9;
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 200px;

  /* FIXES CRITIQUES POUR LE SCROLL MOBILE ANDROID */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  touch-action: pan-y;

  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) translateZ(0);
  transition: all 0.3s ease;
}

.mm_options-container-android {
  max-height: none !important;
	height: fit-content;
}

.mm_options-container.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) translateZ(0);
}

.mm_option {
  padding: 12px 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
  /* Assurer que les options ne bloquent pas le scroll */
  position: relative;
  z-index: 1;
}

.mm_option:hover {
  background-color: #f8f9ff;
}
.mm_option:last-child {
  border-bottom: none;
}
.mm_option.selected {
  background-color: #667eea;
  color: white;
}

.mm_selected-values {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9ff;
  border-radius: 12px;
  border: 2px solid #e1e5e9;
  min-height: 60px;
}

.mm_selected-values h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 1rem;
}

.mm_value-tag {
  display: inline-block;
  background: white;
  color: black;
  padding: 6px 12px;
  margin: 3px 5px 3px 0;
  border-radius: 15px;
  font-size: 13px;
  position: relative;
  animation: slideIn 0.3s ease;
}

.mm_remove-tag {
  margin-left: 8px;
  cursor: pointer;
  font-weight: bold;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.mm_remove-tag:hover {
  opacity: 1;
}

.mm_no-values {
  color: #666;
  font-style: italic;
  font-size: 14px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mm_clear-all {
  background: #ff6b6b;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 8px;
  transition: background-color 0.3s ease;
}

.mm_clear-all:hover {
  background: #ff5252;
}

.mm_demo-section {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9ff;
  border-radius: 12px;
  border: 2px solid #e1e5e9;
}

.mm_demo-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.mm_demo-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.mm_demo-btn:hover {
  background: #5a6fd8;
}

@media (max-width: 900px) {
  .mm_form-grid {
    grid-template-columns: 1fr;
  }
  .mm_container {
    padding: 20px;
  }
  .mm_title {
    font-size: 1.5rem;
  }
}
/** form error */
.mm_error {
  border-color: #f24638 !important;
  box-shadow: 0 0 0 3px rgba(242, 70, 56, 0.15) !important;
}

/* Marquer tout le groupe (utile si tu veux styliser le label, etc.) */
.mm_has-error .mm_field-label::after {
  content: " *";
  color: #f24638;
  margin-left: 4px;
}
