.mbm-cred-trigger {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.mbm-cred-trigger:focus-visible {
  outline: 3px solid rgba(224, 36, 52, .36);
  outline-offset: 4px;
}

.credential-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(28, 30, 34, .72);
}

.credential-modal.open {
  display: flex;
}

.credential-modal-panel {
  position: relative;
  width: min(1120px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card-bg, #fff);
  color: var(--body-text, #50555C);
  border: 1px solid var(--cream-border, #e3d8c8);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .32);
}

.credential-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #9a8f86;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  padding: 4px 9px;
}

.credential-modal-close:hover,
.credential-modal-close:focus-visible {
  background: var(--cream-fade, #fdf0e9);
  color: var(--rust, #e02434);
  outline: 0;
}

.credential-modal h3 {
  margin: 0 42px 20px 0;
  font-size: clamp(22px, 3vw, 30px);
}

.credential-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.credential-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--cream-border, #e3d8c8);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .08);
}

.credential-gallery img {
  display: block;
  width: 100%;
  height: auto;
}

.credential-gallery figcaption {
  padding: 10px 12px 12px;
  color: var(--body-text, #50555C);
  font-size: 13px;
  line-height: 1.35;
}

:root[data-theme="dark"] .credential-modal-panel {
  background: #20242c;
  border-color: #3a3f4a;
}

:root[data-theme="dark"] .credential-gallery figure {
  border-color: #3a3f4a;
}

:root[data-theme="dark"] .credential-gallery figcaption {
  color: #c9ced6;
}

@media (max-width: 760px) {
  .credential-modal {
    padding: 14px;
  }

  .credential-modal-panel {
    padding: 22px 16px 18px;
  }

  .credential-gallery {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
