/**
 * Mart-io social auth — boutons OAuth compacts (Google / Facebook côte à côte)
 */

.martio-social-auth {
  --msa-font: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --msa-text: #1d1d1f;
  --msa-muted: #86868b;
  --msa-border: #d2d2d7;
  --msa-surface: #ffffff;
  --msa-surface-hover: #f5f5f7;
  --msa-surface-active: #ebebed;
  --msa-radius: 10px;
  --msa-height: 40px;
  margin-top: 1rem;
  padding-top: 0.25rem;
  font-family: var(--msa-font);
}

.martio-social-auth__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--msa-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: lowercase;
}

.martio-social-auth__divider::before,
.martio-social-auth__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e5ea;
}

.martio-social-auth__divider > span {
  flex-shrink: 0;
  padding: 0 2px;
}

/* Boutons Google + Facebook sur une seule ligne */
.martio-social-auth__actions,
.martio-social-auth__actions--inline {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.martio-social-btn {
  position: relative;
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  width: auto;
  min-height: var(--msa-height);
  padding: 0 10px;
  border: 1px solid var(--msa-border);
  border-radius: var(--msa-radius);
  background: var(--msa-surface);
  color: var(--msa-text);
  font-family: var(--msa-font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.12s ease;
}

.martio-social-btn:hover,
.martio-social-btn:focus {
  text-decoration: none;
  color: var(--msa-text);
  background: var(--msa-surface-hover);
  border-color: #c7c7cc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.martio-social-btn:active {
  background: var(--msa-surface-active);
  transform: scale(0.985);
}

.martio-social-btn:focus-visible {
  outline: none;
  border-color: #007aff;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 0 0 3px rgba(0, 122, 255, 0.28);
}

.martio-social-btn__icon {
  position: static;
  transform: none;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.martio-social-btn__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.martio-social-btn__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  min-width: 0;
  gap: 0.2em;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Libellé court : icône + marque uniquement (aria-label sur le lien) */
.martio-social-btn__prefix {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.martio-social-btn__brand {
  font-weight: 600;
  color: var(--msa-text);
}

.martio-social-btn--google,
.martio-social-btn--facebook {
  background: var(--msa-surface);
  color: var(--msa-text);
  border-color: var(--msa-border);
}

.martio-social-btn--google:hover,
.martio-social-btn--google:focus,
.martio-social-btn--facebook:hover,
.martio-social-btn--facebook:focus {
  color: var(--msa-text);
}

.martio-social-auth__note {
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 400;
  color: var(--msa-muted);
  line-height: 1.45;
  text-align: center;
}

.martio-social-auth-flash {
  margin-bottom: 1rem;
}

/* ——— Connexion voyageur (authentication) ——— */

body#authentication.qmp-martio-ui #login_form .martio-social-auth,
body#authentication.qmp-martio-ui #create-account_form .martio-social-auth {
  margin: 0 0 16px;
  padding-bottom: 2px;
}

/* ——— Checkout OPC ——— */

#opc_new_account .martio-social-auth,
#login_form_content .martio-social-auth {
  margin-top: 0;
  margin-bottom: 1rem;
}

#guest-info-block .martio-social-auth__note {
  display: none;
}

/* ——— Inscription partenaire ——— */

#qmp-register .martio-social-auth {
  margin: 0 0 1rem;
}

#qmp-register .martio-social-auth + .qmp-form {
  margin-top: 0;
}

/* ——— Portail gérant ——— */

body.qmp-martio-ui.qmp-seller-portal #qmp-seller-login .qmp-seller-login__container {
  max-width: 420px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  box-sizing: border-box;
}

body.qmp-martio-ui.qmp-seller-portal #qmp-seller-login .qmp-seller-login__header {
  text-align: center;
  margin-bottom: 20px;
}

body.qmp-martio-ui.qmp-seller-portal #qmp-seller-login .qmp-seller-login__card {
  padding: 22px 18px;
}

body.qmp-martio-ui.qmp-seller-portal #qmp-seller-login .qmp-seller-login__card .martio-social-auth {
  margin-top: 0;
  margin-bottom: 1rem;
}

body.qmp-martio-ui.qmp-seller-portal #qmp-seller-login .qmp-seller-login__form {
  margin-top: 0.25rem;
}

body.qmp-martio-ui.qmp-seller-portal #qmp-seller-login .qmp-seller-login__forgot {
  margin: 0 0 0.875rem;
  text-align: right;
  font-size: 0.875rem;
}

body.qmp-martio-ui.qmp-seller-portal #qmp-seller-login .qmp-seller-login__actions .qmp-btn-primary {
  width: 100%;
  min-height: var(--msa-height);
  border-radius: var(--msa-radius);
  font-weight: 600;
}

body.qmp-martio-ui.qmp-seller-portal #qmp-seller-login .qmp-seller-login__footer {
  margin-top: 18px;
  text-align: center;
  font-size: 0.9375rem;
  color: #6b7280;
}

@media (max-width: 359px) {
  .martio-social-auth__actions,
  .martio-social-auth__actions--inline {
    gap: 6px;
  }

  .martio-social-btn {
    min-height: 38px;
    padding: 0 8px;
    font-size: 12px;
  }

  .martio-social-btn__icon,
  .martio-social-btn__icon svg {
    width: 16px;
    height: 16px;
  }
}
