:root {
  --mm-bg: #ffffff;
  --mm-fg: #111111;
  --mm-muted: #6b7280;
  --mm-border: #e5e7eb;
  --mm-primary: #E30613; /* default HEXIS red */
  --mm-radius: 16px;
  --mm-pad: 16px;
}
.matmak-card {
  background: var(--mm-bg);
  color: var(--mm-fg);
  border: 0px solid var(--mm-border);
  border-radius: var(--mm-radius);
  padding: calc(var(--mm-pad) * 1.25);
  max-width: 1100px;
  margin-inline: auto;
}
.matmak-card h3 { margin-top: 0; letter-spacing: -0.02em; font-weight: 700; }
.muted { color: var(--mm-muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.button { background: #f3f4f6; border:1px solid var(--mm-border); color:#111; padding:10px 14px; border-radius: 12px; cursor: pointer; }
.button.small { padding: 6px 10px; border-radius: 999px; }
.button.button-primary { background: var(--mm-primary); color:#fff; border:0; }
.button-link { background: transparent; border: 0; color: var(--mm-primary); cursor: pointer; font-size: 18px; }
.button.is-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important; /* Masque le texte */
}
.button.is-loading .button-text {
    visibility: hidden; /* Cache le texte mais garde l'espace */
}
.button.is-loading .button-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    animation: mm-pulse-drive 1.4s ease-in-out infinite;
}
.check { font-weight: 600; display: block !important;}
.matmak-form label { display:block; margin-bottom: 12px; font-weight: 600; }
.matmak-form label input, .matmak-form input, .matmak-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--mm-border);
  outline: none;
}
.matmak-form input:focus, .matmak-form select:focus { border-color: var(--mm-primary); box-shadow: 0 0 0 3px rgba(227,6,19,0.18); }

/* tabs */
.tabs { display:flex; gap:8px; margin: 8px 0 16px; flex-wrap: wrap; }
.tab { padding:8px 12px; border:1px solid var(--mm-border); border-radius: 999px; background:#fff; cursor:pointer; }
.tab.active { background: var(--mm-primary); color:#fff; border-color: var(--mm-primary); }
.tabpanes .tabpane {}

/* messages */
.matmak-feedback { display:none; margin-top: 10px; font-weight:600; text-align:center;}
.matmak-feedback.ok { color: #0a7a33; }
.matmak-feedback.err { color: #b00020; }

/* cards and lists */
.cards { display:grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 12px; }
.card { border:1px solid var(--mm-border); border-radius:14px; padding:12px; background:#fff; }
.card .title { font-weight:700; }
.card .price { font-weight:700; margin-top:6px; }
.list .row { border:1px solid var(--mm-border); border-radius:12px; padding:12px; margin-bottom:10px; background:#fff; }

/* lookup */
.matmak-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; margin-top: 16px; }
.mm-card { border:1px solid var(--mm-border); border-radius: 14px; overflow: hidden; background:#fff; cursor:pointer; }
.mm-thumb { aspect-ratio: 4/3; overflow:hidden; display:flex; align-items:center; justify-content:center; background:#f7f7f7; }
.mm-thumb img { max-width:100%; height:auto; display:block; }
.mm-title { font-weight:700; padding:10px 12px 0; }
.mm-meta { color:var(--mm-muted); padding: 0 12px 12px; font-size: 12px; }
.mm-badges { padding: 0 12px 12px; display:flex; gap:8px; flex-wrap: wrap; }
.mm-badges span { font-size: 11px; background:#f1f5f9; border-radius:999px; padding:4px 8px; border:1px solid #e5e7eb; }
.mm-spinner { padding: 24px; color: var(--mm-muted); }

/* modal */
dialog#mm-pattern-modal { border:0; border-radius: 18px; padding:0; width:min(100%, 980px); }
dialog#mm-flow-modal { border:0; border-radius: 18px; padding:0; width:min(100%, 500px); }
.mm-modal { padding: 12px; }
.mm-modal-header { display:flex; justify-content: space-between; align-items:center; gap:10px; border-bottom:1px solid var(--mm-border); padding-bottom:8px; }
.mm-modal-body { padding-top: 12px; }
.mm-modal-grid { display:grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.mm-thumb.lg { aspect-ratio: 4/3; margin-bottom: 8px; }
.mm-details div { margin-bottom: 6px; }
.mm-type-filters label {
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}
.chip { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--mm-border); padding: 6px 10px; border-radius: 999px; }
.chip.muted { color: var(--mm-muted); }
.phone-input-wrapper {
    display: flex;
    align-items: center;
}
.phone-input-wrapper input.phone-prefix {
    flex: 0 0 80px; /* Largeur fixe pour l'indicatif */
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    text-align: center;
}
.phone-input-wrapper input.phone-number {
    flex: 1 1 auto; /* Le champ du numéro prend le reste de la place */
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.phone-input-wrapper input.phone-prefix:focus {
    /* Empêche l'ombre de déborder sur le champ suivant */
    z-index: 2;
}

/* Cancellation Panel */
.mm-cancellation-panel {
  border: 1px solid var(--mm-border);
  border-radius: 14px;
  padding: 12px;
  margin-top: 20px;
}
.mm-cancellation-panel summary {
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
}
.mm-cancellation-panel summary h4 {
  margin: 0;
}
/* Styles pour le bouton d'abonnement personnalisé */
.mm-subscribe-btn-styled {
    background-color: var(--mm-primary);
    color: #ffffff;
    border: 2px solid var(--mm-primary);
    border-radius: 100px;
    box-shadow: none;
    cursor: pointer;
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 300;
    height: 48px;
    line-height: 24px;
    padding: 10px 40px;
    text-align: center;
    text-decoration: none;
    text-shadow: none;
    transition: background-color 0.3s, color 0.3s;
}

/* header */
.app-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.brand { font-weight:800; letter-spacing:-0.02em; display:flex; align-items:center; gap:10px; }
.brand-logo { height: 28px; }

@keyframes mm-pulse-drive {
    0%, 100% {
        transform: translate(-50%, -50%) translateX(0) scale(1);
    }
    25% {
        transform: translate(-50%, -50%) translateX(-3px) scale(1.05);
    }
    75% {
        transform: translate(-50%, -50%) translateX(3px) scale(1.05);
    }
}

@media (max-width: 920px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .mm-modal-grid { grid-template-columns: 1fr; }
}

.mm-download-user-invoice-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* Ambassador Free Access Users */
.mm-free-access {
  --fa-ink: #262A32;
  --fa-muted: #898A93;
  --fa-line: #E2E3E5;
  --fa-soft: #F7F7F8;
  --fa-red: #C90C0F;
  --fa-green: #0A7A33;
  --fa-radius: 8px;
  max-width: 100% !important;
  margin: 0;
  padding: 26px 14px 10px;
  color: var(--fa-muted);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.mm-fa-notice {
  max-width: 100% !important;
  color: var(--fa-ink);
}
.mm-fa-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.mm-fa-heading h3 {
  margin: 0;
  color: var(--fa-ink);
  font-size: 1.18rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
  text-shadow: none;
}
.mm-fa-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--fa-red);
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}
.mm-fa-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.mm-free-access .button,
.mm-fa-modal .button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  box-shadow: none;
  text-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}
.mm-free-access .button.button-primary,
.mm-fa-modal .button.button-primary {
  background: var(--fa-red);
  color: #fff;
  padding: 8px 16px;
}
.mm-free-access .button.button-primary:hover,
.mm-fa-modal .button.button-primary:hover {
  background: var(--fa-ink);
  color: #fff;
}
.mm-fa-secondary {
  background: #ECEDEF;
  color: var(--fa-ink);
  padding: 8px 13px;
}
.mm-fa-secondary:hover {
  background: var(--fa-ink);
  color: #fff;
}
.mm-free-access .button:disabled,
.mm-fa-table .button:disabled {
  opacity: .42;
  cursor: not-allowed;
}
.mm-fa-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .875fr) minmax(0, .875fr);
  gap: 12px;
  margin-bottom: 18px;
}
.mm-fa-metric {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #E4E5E8;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(38, 42, 50, .05);
}
.mm-fa-metric-capacity {
  gap: 14px;
}
.mm-fa-metric-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.mm-fa-metric-label,
.mm-fa-toolbar label > span:first-child {
  color: #757982;
  font-size: .64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.mm-fa-metric-value {
  display: block;
  margin-top: 8px;
  color: var(--fa-ink);
  font-size: 1.55rem;
  font-weight: 750;
  line-height: 1;
}
.mm-fa-metric-value small {
  color: #8F9299;
  font-size: .78rem;
  font-weight: 650;
}
.mm-fa-metric p {
  margin: 10px 0 0;
  color: #858992;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.35;
}
.mm-fa-progress {
  height: 6px;
  border-radius: 999px;
  background: #ECEDEF;
  overflow: hidden;
}
.mm-fa-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--fa-red);
  transition: width .2s ease;
}
.mm-fa-metric-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #757982;
  font-size: .76rem;
  font-weight: 600;
}
.mm-fa-metric-meta span span {
  color: var(--fa-ink);
  font-weight: 750;
}
.mm-fa-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .66rem;
  font-weight: 750;
  line-height: 1;
  border: 1px solid #E2E3E5;
  background: #F3F4F6;
  color: #555B66;
}
.mm-fa-badge.active {
  border-color: #BDE7CC;
  background: #EAF7EF;
  color: #0A7A33;
}
.mm-fa-badge.paused {
  border-color: #F4D39B;
  background: #FFF4E2;
  color: #9A5A00;
}
.mm-fa-badge.neutral {
  border-color: #DADDE2;
  background: #F3F4F6;
  color: #555B66;
}
.mm-fa-banner {
  margin-bottom: 14px;
  border-left: 3px solid var(--fa-red);
  border-radius: 0 var(--fa-radius) var(--fa-radius) 0;
  background: #fff;
  color: var(--fa-ink);
  padding: 11px 13px;
  box-shadow: 0 2px 10px rgba(0,0,0,.045);
}
.mm-fa-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(140px, 1fr) 90px auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(226, 227, 229, .92);
  border-radius: var(--fa-radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.mm-fa-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}
.mm-fa-toolbar input,
.mm-fa-toolbar select,
.mm-fa-modal input,
.mm-fa-modal select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #D7D9DC;
  border-radius: 7px;
  color: var(--fa-ink);
  background: #fff;
  padding: 8px 10px;
  box-shadow: none;
  font-size: .82rem;
}
.mm-fa-toolbar input:focus,
.mm-fa-toolbar select:focus,
.mm-fa-modal input:focus,
.mm-fa-modal select:focus {
  border-color: var(--fa-red);
  box-shadow: 0 0 0 3px rgba(201,12,15,.12);
  outline: 0;
}
.mm-fa-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
}
.mm-fa-tooltip-wrap::before {
  content: attr(data-hint);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: max-content;
  max-width: 220px;
  transform: translateX(-50%) translateY(4px);
  padding: 7px 10px;
  border: 1px solid #E2E3E5;
  border-radius: 7px;
  background: #FFFFFF;
  color: var(--fa-ink);
  box-shadow: 0 10px 28px rgba(38,42,50,.14);
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.mm-fa-tooltip-wrap::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  z-index: 21;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid #E2E3E5;
  border-bottom: 1px solid #E2E3E5;
  background: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}
.mm-fa-tooltip-wrap:hover::before,
.mm-fa-tooltip-wrap:focus-within::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.mm-fa-tooltip-wrap:hover::after,
.mm-fa-tooltip-wrap:focus-within::after {
  opacity: 1;
}
.mm-fa-add-tooltip {
  position: relative;
  display: inline-flex;
  justify-content: center;
  overflow: visible;
}
.mm-fa-add-tooltip::before {
  content: attr(data-hint);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 24;
  width: max-content;
  max-width: 260px;
  transform: translateX(-50%) translateY(4px);
  padding: 8px 11px;
  border: 1px solid #E2E3E5;
  border-radius: 7px;
  background: #FFFFFF;
  color: var(--fa-ink);
  box-shadow: 0 10px 28px rgba(38,42,50,.14);
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.mm-fa-add-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  z-index: 25;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid #E2E3E5;
  border-bottom: 1px solid #E2E3E5;
  background: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}
.mm-fa-add-tooltip.is-limit:hover::before,
.mm-fa-add-tooltip.is-limit:focus-within::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.mm-fa-add-tooltip.is-limit:hover::after,
.mm-fa-add-tooltip.is-limit:focus-within::after {
  opacity: 1;
}
.mm-fa-table-wrap {
  overflow-x: visible;
  background: #fff;
  border: 1px solid rgba(226, 227, 229, .92);
  border-radius: var(--fa-radius);
  box-shadow: 0 3px 14px rgba(0,0,0,.055);
}
.mm-fa-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff !important;
}
.mm-fa-table thead th {
  padding: 12px 14px;
  text-align: center;
  color: var(--fa-red);
  background: #F8F8F9 !important;
  border: none !important;
  border-bottom: 1px solid var(--fa-line) !important;
  font-size: .66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  cursor: pointer;
}
.mm-fa-table th:nth-child(1),
.mm-fa-table td:nth-child(1) {
  width: 30%;
}
.mm-fa-table th:nth-child(2),
.mm-fa-table td:nth-child(2) {
  width: 16%;
}
.mm-fa-table th:nth-child(3),
.mm-fa-table td:nth-child(3) {
  width: 11%;
}
.mm-fa-table th:nth-child(4),
.mm-fa-table td:nth-child(4) {
  width: 14%;
}
.mm-fa-table th:nth-child(5),
.mm-fa-table td:nth-child(5) {
  width: 14%;
}
.mm-fa-table th:nth-child(6),
.mm-fa-table td:nth-child(6) {
  width: 15%;
}
.mm-fa-table thead th:last-child {
  text-align: center;
  cursor: default;
}
.mm-fa-table th.is-sorted::after {
  content: '';
  display: inline-block;
  margin-left: 5px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  vertical-align: middle;
}
.mm-fa-table th.is-sorted.asc::after {
  border-bottom: 5px solid var(--fa-red);
}
.mm-fa-table th.is-sorted.desc::after {
  border-top: 5px solid var(--fa-red);
}
.mm-fa-table tbody td {
  padding: 13px 12px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fa-ink);
  background: #fff !important;
  border: none !important;
  border-bottom: 1px solid #ECEDEF !important;
  font-size: .82rem;
  vertical-align: middle;
}
.mm-fa-table tbody tr:last-child td {
  border-bottom: 0 !important;
}
.mm-fa-table tbody tr:hover td {
  background: #FCFCFD !important;
}
.mm-fa-table td:first-child {
  min-width: 0;
}
.mm-fa-table td:first-child strong,
.mm-fa-table td:first-child span,
.mm-fa-empty strong,
.mm-fa-empty span {
  display: block;
}
.mm-fa-table td:first-child strong {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fa-ink);
  font-weight: 650;
}
.mm-fa-table td:first-child span,
.mm-fa-empty span {
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
  color: var(--fa-muted);
  font-size: .74rem;
  word-break: break-all;
}
.mm-fa-table .mm-fa-badge {
  display: inline-flex !important;
  width: auto !important;
  min-width: 72px;
  color: #555B66 !important;
  border-color: #E2E3E5 !important;
  background: #F3F4F6 !important;
}
.mm-fa-table .mm-fa-badge.active {
  border-color: #BDE7CC !important;
  background: #EAF7EF !important;
  color: #0A7A33 !important;
}
.mm-fa-table .mm-fa-badge.paused {
  border-color: #F4D39B !important;
  background: #FFF4E2 !important;
  color: #9A5A00 !important;
}
.mm-fa-table td:last-child {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  white-space: normal;
}
.mm-fa-table td:last-child .button {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  min-height: 32px;
  margin: 0 auto;
  padding: 6px 0;
  background: #fff;
  color: var(--fa-red);
  border: 1px solid rgba(201, 12, 15, .58);
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 750;
  text-align: center;
}
.mm-fa-table .button:hover:not(:disabled) {
  background: var(--fa-red);
  border-color: var(--fa-red);
  color: #fff;
}
.mm-fa-actions-toggle::after {
  content: '';
  display: inline-block;
  margin-left: 7px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: middle;
}
.mm-fa-actions-toggle.is-open::after {
  transform: rotate(180deg);
}
.mm-fa-actions-menu {
  position: fixed;
  z-index: 100000;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 6px;
  width: 142px;
  min-width: 142px;
  padding: 8px;
  overflow: visible;
  border: 1px solid rgba(222, 224, 228, .98);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 24, 32, .14);
  opacity: 0;
  transform: translateY(-4px) scale(.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.mm-fa-actions-menu[hidden] {
  display: none !important;
}
.mm-fa-actions-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.mm-fa-actions-menu.is-dropup {
  transform: translateY(4px) scale(.98);
  transform-origin: bottom right;
}
.mm-fa-actions-menu.is-dropup.is-open {
  transform: translateY(0) scale(1);
}
.mm-fa-menu-item {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 26px;
  margin: 0 !important;
  padding: 4px 7px;
  border: 1px solid rgba(201, 12, 15, .58);
  border-radius: 6px;
  background: #fff;
  color: var(--fa-red);
  font-size: .66rem;
  font-weight: 750;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}
.mm-fa-menu-item:hover:not(:disabled),
.mm-fa-menu-item:focus-visible:not(:disabled) {
  outline: none;
  background: var(--fa-red);
  border-color: var(--fa-red);
  color: #fff;
}
.mm-fa-menu-item:disabled {
  cursor: not-allowed;
  color: #A4A8B0;
  border-color: #E1E3E7;
  background: #F7F8FA;
}
.mm-fa-menu-item::before,
.mm-fa-menu-item::after {
  position: absolute;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.mm-fa-menu-item::before {
  content: '';
  right: calc(100% + 4px);
  top: 50%;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 5px solid #fff;
  filter: drop-shadow(1px 0 0 rgba(222, 224, 228, .98));
  transform: translateY(-50%) translateX(4px);
}
.mm-fa-menu-item::after {
  content: attr(data-hint);
  right: calc(100% + 9px);
  top: 50%;
  width: max-content;
  max-width: 230px;
  padding: 8px 10px;
  border: 1px solid rgba(222, 224, 228, .98);
  border-radius: 7px;
  background: #fff;
  color: #3F4650;
  box-shadow: 0 14px 30px rgba(18, 24, 32, .16);
  font-size: .71rem;
  font-weight: 620;
  line-height: 1.32;
  white-space: normal;
  text-align: left;
  transform: translateY(-50%) translateX(4px);
}
.mm-fa-menu-item:hover::before,
.mm-fa-menu-item:focus-visible::before,
.mm-fa-menu-item:hover::after,
.mm-fa-menu-item:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
@media (max-width: 767px) {
  .mm-fa-actions-menu {
    width: 156px;
    min-width: 156px;
  }
  .mm-fa-menu-item::before {
    display: none;
  }
  .mm-fa-menu-item::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: calc(100% + 8px);
    max-width: min(230px, calc(100vw - 32px));
    transform: translateX(-50%) translateY(4px);
  }
  .mm-fa-menu-item:hover::after,
  .mm-fa-menu-item:focus-visible::after {
    transform: translateX(-50%) translateY(0);
  }
}
.mm-fa-empty td {
  padding: 24px 14px !important;
  text-align: center;
}
.mm-fa-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--fa-muted);
  font-size: .82rem;
}
.mm-fa-pagination > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
dialog#mm-fa-user-modal,
dialog#mm-fa-usage-modal,
dialog#mm-fa-resend-modal,
dialog#mm-fa-confirm-modal {
  border: 0;
  border-radius: var(--fa-radius);
  padding: 0;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  box-shadow: 0 16px 48px rgba(0,0,0,.18);
}
.mm-fa-confirm {
  width: auto;
  max-width: 480px;
  box-sizing: border-box;
  padding: 22px;
}
.mm-fa-confirm-head {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--fa-line);
}
.mm-fa-confirm-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #FDEBEC;
  color: var(--fa-red);
  font-size: 1rem;
  font-weight: 800;
}
.mm-fa-confirm h4 {
  margin: 0;
  color: var(--fa-ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}
.mm-fa-confirm p {
  margin: 7px 0 0;
  color: #6F7480;
  font-size: .84rem;
  line-height: 1.45;
}
.mm-fa-confirm-user {
  margin: 16px 0 2px;
  padding: 13px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #FAFAFB;
}
.mm-fa-confirm-user strong,
.mm-fa-confirm-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mm-fa-confirm-user strong {
  color: var(--fa-ink);
  font-size: .88rem;
  font-weight: 700;
}
.mm-fa-confirm-user span {
  margin-top: 3px;
  color: #777B84;
  font-size: .78rem;
}
.mm-fa-confirm #mm-fa-confirm-submit {
  min-width: 112px;
}
.mm-fa-confirm #mm-fa-confirm-submit.mm-fa-confirm-danger {
  background: var(--fa-red);
  color: #fff;
}
.mm-fa-confirm #mm-fa-confirm-submit.mm-fa-confirm-success {
  background: var(--fa-ink);
  color: #fff;
}
.mm-fa-confirm #mm-fa-confirm-submit:hover {
  background: var(--fa-red);
  color: #fff;
}
.mm-fa-modal {
  padding: 20px;
  background: #fff;
  color: var(--fa-ink);
}
.mm-fa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--fa-line);
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.mm-fa-modal-header h4 {
  margin: 0;
  color: var(--fa-ink);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0;
}
.mm-fa-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.mm-fa-usage-title {
  margin-bottom: 14px;
}
.mm-fa-usage-title strong,
.mm-fa-usage-title span {
  display: block;
}
.mm-fa-usage-title span {
  color: var(--fa-muted);
  font-size: .82rem;
}
.mm-fa-usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.mm-fa-usage-grid div {
  border: 1px solid var(--fa-line);
  border-radius: var(--fa-radius);
  padding: 12px;
}
.mm-fa-usage-grid span,
.mm-fa-usage-grid strong {
  display: block;
}
.mm-fa-usage-grid span {
  color: var(--fa-muted);
  font-size: .66rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.mm-fa-usage-grid strong {
  margin-top: 5px;
  color: var(--fa-ink);
  font-weight: 650;
}
@media (max-width: 900px) {
  .mm-fa-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .mm-fa-summary {
    grid-template-columns: 1fr;
  }
  .mm-free-access {
    padding: 18px 10px 4px;
  }
  .mm-fa-topbar,
  .mm-fa-actions,
  .mm-fa-pagination,
  .mm-fa-pagination > div {
    align-items: stretch;
    flex-direction: column;
  }
  .mm-fa-toolbar {
    grid-template-columns: 1fr;
  }
  .mm-fa-metric,
  .mm-fa-toolbar {
    padding: 12px;
  }
  .mm-fa-table {
    min-width: 0;
  }
  .mm-fa-table,
  .mm-fa-table thead,
  .mm-fa-table tbody,
  .mm-fa-table tr,
  .mm-fa-table td {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
  }
  .mm-fa-table thead {
    display: none;
  }
  .mm-fa-table tbody tr {
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    overflow: hidden;
    border-bottom: 1px solid var(--fa-line);
  }
  .mm-fa-table tbody tr:last-child {
    border-bottom: 0;
  }
  .mm-fa-table tbody td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    overflow: visible;
    text-overflow: clip;
    border-bottom: 0 !important;
    font-size: .76rem;
  }
  .mm-fa-table tbody td::before {
    content: attr(data-label);
    color: var(--fa-muted);
    font-weight: 650;
  }
  .mm-fa-table td:first-child,
  .mm-fa-table td:last-child,
  .mm-fa-empty td {
    display: block;
    text-align: center;
    min-width: 0;
  }
  .mm-fa-table td:first-child::before,
  .mm-fa-table td:last-child::before,
  .mm-fa-empty td::before {
    display: none;
  }

  .mm-fa-table td:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .mm-fa-table td:last-child .button {
    margin: 0 auto;
  }
  .mm-fa-usage-grid,
  .mm-fa-modal .grid-2 {
    grid-template-columns: 1fr;
  }
}

.mm-fa-phone-wrapper {
    position: relative;
}

.mm-fa-country-code {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
    user-select: none;
}

.mm-fa-phone-wrapper input {
    padding-left: 55px !important;
}

/* Free Access actions menu final override: protect against global Elementor button styles. */
.mm-free-access #mm-fa-actions-menu.mm-fa-actions-menu {
  display: grid !important;
  grid-template-columns: 1fr !important;
  row-gap: 6px !important;
  width: 142px !important;
  min-width: 142px !important;
  padding: 8px !important;
  background: #fff !important;
  border: 1px solid rgba(222, 224, 228, .98) !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 28px rgba(18, 24, 32, .14) !important;
}
.mm-free-access #mm-fa-actions-menu.mm-fa-actions-menu[hidden] {
  display: none !important;
}
.mm-free-access #mm-fa-actions-menu .mm-fa-menu-item {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 1px solid rgba(201, 12, 15, .62) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--fa-red) !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-transform: none !important;
  white-space: nowrap !important;
}
.mm-free-access #mm-fa-actions-menu .mm-fa-menu-item:hover:not(:disabled),
.mm-free-access #mm-fa-actions-menu .mm-fa-menu-item:focus-visible:not(:disabled) {
  background: var(--fa-red) !important;
  border-color: var(--fa-red) !important;
  color: #fff !important;
  outline: none !important;
}
.mm-free-access #mm-fa-actions-menu .mm-fa-menu-item:disabled {
  background: #F7F8FA !important;
  border-color: #E1E3E7 !important;
  color: #A4A8B0 !important;
}

/* Registration phone field: one field, split into country code and number. */
.matmak-card[data-matmak="register-flow"] #matmak-register-form .matmak-phone-field {
  grid-area: phone;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
  margin-bottom: 12px;
  color: var(--c-text, #898A93);
  font-size: 1em;
  font-weight: 600;
  line-height: 1.1;
}

.matmak-card[data-matmak="register-flow"] #matmak-register-form .matmak-phone-title {
  display: block;
  margin: 0;
}

.matmak-card[data-matmak="register-flow"] #matmak-register-form .matmak-phone-control {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--hpl-radius-pill, 100px);
  background: var(--c-field, #DDDFE0);
  box-shadow: inset 0 -1px rgba(0, 0, 0, .06);
  box-sizing: border-box;
  transition: box-shadow .2s ease;
}

.matmak-card[data-matmak="register-flow"] #matmak-register-form .matmak-phone-control:focus-within {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .04), inset 0 0 0 2px rgba(0, 0, 0, .08);
}

.matmak-card[data-matmak="register-flow"] #matmak-register-form .matmak-phone-control input {
  display: block;
  height: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 10px 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--c-field-text, #262A32);
  font: inherit;
  font-weight: 400;
  line-height: 1.2;
  appearance: none;
  box-sizing: border-box;
}

.matmak-card[data-matmak="register-flow"] #matmak-register-form .matmak-phone-code {
  flex: 0 0 88px !important;
  width: 88px !important;
  padding-right: 12px !important;
  border-right: 1px solid rgba(38, 42, 50, .18) !important;
  text-align: center;
}

.matmak-card[data-matmak="register-flow"] #matmak-register-form .matmak-phone-number {
  flex: 1 1 auto !important;
  width: auto !important;
  padding-left: 18px !important;
}

.matmak-card[data-matmak="register-flow"] #matmak-register-form .matmak-phone-control input::placeholder {
  color: var(--c-field-text, #262A32);
  opacity: .8;
}

@media (max-width: 420px) {
  .matmak-card[data-matmak="register-flow"] #matmak-register-form .matmak-phone-control input {
    padding-inline: 12px !important;
  }

  .matmak-card[data-matmak="register-flow"] #matmak-register-form .matmak-phone-code {
    flex-basis: 78px !important;
    width: 78px !important;
  }
}
