@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600;700&display=swap');

/*
 * Outer band is transparent so any theme spacing above/side/below shows THE SITE’S own background.
 * Forcing #000 on html/body made a pure-black strip that didn’t match the theme and exposed “margins”.
 * The delivery UI lives inside .mbtn-pd-email-container — that card stays dark unchanged.
 */

.mbtn-pd-legacy-page,
.mbtn-pd-legacy-page * {
  box-sizing: border-box;
}

/* Break out of theme column; full width; no competing fill color */
.mbtn-pd-legacy-page {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 48px
    max(16px, env(safe-area-inset-left));
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  background: transparent;
  font-family: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
  color: #ffffff;
}

.entry-content .mbtn-pd-legacy-page,
.wp-site-blocks .mbtn-pd-legacy-page {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}

.mbtn-pd-email-container {
  max-width: min(960px, 100%);
  margin: 0 auto;
  background: linear-gradient(180deg, #0a0a0c 0%, #060608 100%);
  border: 2px solid #667eea;
  border-radius: 22px;
  padding: 36px 32px 40px;
  box-shadow:
    0 0 28px rgba(102, 126, 234, 0.45),
    0 18px 50px rgba(0, 0, 0, 0.75);
}

.mbtn-pd-email-container .email-header {
  text-align: center;
  margin-bottom: 22px;
}

.mbtn-pd-email-container .email-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 900;
  color: #667eea;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 0;
  text-shadow: 0 0 18px rgba(102, 126, 234, 0.55);
}

.mbtn-pd-email-container .greeting {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.75;
  margin: 16px 0 22px;
}

.mbtn-pd-email-container .greeting p {
  margin: 0 0 10px;
}

.mbtn-pd-email-container .greeting p:last-child {
  margin-bottom: 0;
}

.mbtn-pd-email-container .greeting strong {
  color: #667eea;
  font-weight: 700;
}

.mbtn-pd-email-container .greeting.delivery-error {
  color: #fca5a5;
}

.pd-hero {
  text-align: center;
  margin: 28px 0;
}

.pd-hero img {
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  vertical-align: middle;
}

.mbtn-pd-email-container .product-info {
  border-radius: 14px;
  padding: 22px 20px;
  margin: 20px 0;
}

/* Product summary — quieter so credentials read as the “main event” */
.pd-card--general.product-info {
  background: rgba(12, 13, 18, 0.72);
  border: 1px solid rgba(102, 126, 234, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.pd-card--general.product-info .info-label {
  color: rgba(255, 204, 136, 0.58);
}

.pd-card--general.product-info .info-value,
.pd-card--general.product-info .mbtn-pd-value-text {
  color: rgba(255, 255, 255, 0.82);
}

/* Credentials — strongest frame + glow */
.pd-card--credentials.product-info {
  margin-top: 22px;
  background: linear-gradient(165deg, rgba(26, 28, 46, 0.96) 0%, rgba(14, 16, 28, 0.98) 100%);
  border: 2px solid rgba(147, 165, 255, 0.88);
  box-shadow:
    0 0 48px rgba(102, 126, 234, 0.42),
    0 16px 42px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.pd-card--credentials.product-info .pd-cred-label {
  color: #ffd9a8;
}

/* Sub-groups inside credentials — two lighter inner “containers” (account vs email) */
.pd-cred-subcard--account {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.06) 100%);
  border: 1px solid rgba(198, 206, 255, 0.55);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 6px 22px rgba(0, 0, 0, 0.2);
}

.pd-cred-subcard--email {
  background: linear-gradient(180deg, rgba(255, 238, 220, 0.14) 0%, rgba(255, 255, 255, 0.07) 100%);
  border: 1px solid rgba(255, 210, 150, 0.55);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 6px 22px rgba(0, 0, 0, 0.18);
}

.pd-cred-subcard--launcher {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(164, 176, 255, 0.42);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.pd-cred-group.pd-cred-subcard + .pd-cred-group.pd-cred-subcard {
  margin-top: 18px;
}

.pd-cred-platform-banner + .pd-cred-subcard--account {
  margin-top: 6px;
}

.pd-cred-group--gift + .pd-cred-platform-banner {
  margin-top: 16px;
}

/* Groups without subcard styling (gift codes, misc) */
.pd-cred-group:not(.pd-cred-subcard) + .pd-cred-group:not(.pd-cred-subcard) {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(167, 180, 255, 0.38);
}

.pd-cred-subcard .pd-cred-row:first-child {
  margin-top: 0;
}

.pd-cred-subcard .pd-cred-row:last-child {
  margin-bottom: 0;
}

/* Notes / disclaimer — most subdued */
.pd-card--notes.product-info {
  margin-top: 22px;
  background: rgba(10, 10, 14, 0.45);
  border: 1px dashed rgba(102, 126, 234, 0.22);
  box-shadow: none;
}

.pd-card--notes.product-info .pd-notes-disclaimer {
  color: rgba(184, 197, 217, 0.72);
}

.pd-card--notes.product-info .pd-notes-dynamic strong {
  color: rgba(255, 204, 136, 0.55);
}

.pd-card--notes.product-info .pd-notes-dynamic p {
  color: rgba(232, 234, 239, 0.78);
}

.mbtn-pd-email-container .info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 13px 0;
  color: #ffffff;
  font-size: 15px;
}

.mbtn-pd-email-container .info-row:first-child {
  margin-top: 0;
}

.mbtn-pd-email-container .info-row:last-child {
  margin-bottom: 0;
}

.mbtn-pd-email-container .info-label {
  color: #ffcc88;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.mbtn-pd-email-container .info-value {
  color: #ffffff;
  font-weight: 400;
  text-align: right;
  word-break: break-word;
  min-width: 0;
}

.pd-cred-platform-banner {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a5b4fc;
  text-align: center;
  margin: 2px 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(147, 165, 255, 0.42);
  text-shadow: 0 0 16px rgba(102, 126, 234, 0.45);
}

/* Credential rows */
.pd-cred-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 16px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(102, 126, 234, 0.22);
}

.pd-cred-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pd-cred-label {
  color: #ffcc88;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  font-size: 14px;
  flex: 0 0 min(38%, 150px);
  min-width: 0;
}

.pd-cred-value-wrap {
  flex: 1 1 160px;
  min-width: 0;
  text-align: right;
}

.pd-cred-value {
  display: inline-block;
  max-width: 100%;
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
  unicode-bidi: plaintext;
}

.pd-cred-row.pd-cred-row--masked .pd-cred-value {
  filter: blur(5px);
  opacity: 0.88;
  user-select: none;
}

.pd-cred-actions {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

@media (min-width: 560px) {
  .pd-cred-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    width: auto;
    margin-left: auto;
  }

  .pd-cred-row {
    flex-wrap: nowrap;
    align-items: center;
  }

  .pd-cred-value-wrap {
    text-align: right;
    flex: 1 1 auto;
  }
}

.pd-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: #e8ecff;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.pd-icon-btn:hover {
  background: rgba(102, 126, 234, 0.35);
  border-color: rgba(102, 126, 234, 0.65);
}

.pd-reveal-btn[aria-pressed='true'] {
  border-color: rgba(250, 204, 136, 0.55);
  color: #ffcc88;
}

.pd-ico {
  display: block;
}

.pd-reveal-btn .pd-ico-eye-off {
  display: none;
}

.pd-cred-row:not(.pd-cred-row--masked) .pd-reveal-btn .pd-ico-eye-open {
  display: none;
}

.pd-cred-row:not(.pd-cred-row--masked) .pd-reveal-btn .pd-ico-eye-off {
  display: block;
}

.pd-open-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(102, 126, 234, 0.55);
  background: rgba(102, 126, 234, 0.12);
  color: #93c5fd !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
}

.pd-open-link:hover {
  background: rgba(102, 126, 234, 0.25);
  color: #bfdbfe !important;
}

/* Notes */
.pd-notes-disclaimer {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.65;
  color: #b8c5d9;
}

.pd-notes-dynamic {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(102, 126, 234, 0.35);
}

.pd-notes-dynamic strong {
  display: block;
  color: #ffcc88;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.pd-notes-dynamic p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #e8eaef;
}

/* Primary actions */
.pd-actions-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 28px 0 12px;
}

.pd-action-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 26px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.pd-action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(102, 126, 234, 0.5);
}

.pd-action-primary:active {
  transform: translateY(0);
}

.pd-action-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 204, 136, 0.45);
  color: #ffcc88;
  box-shadow: none;
}

.pd-action-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 18px rgba(255, 204, 136, 0.12);
}

.delivery-toast {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
  font-size: 14px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}

.delivery-toast[hidden] {
  display: none;
}

.mbtn-pd-sample-code {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid #3d3d46;
  border-radius: 10px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  color: #c7d2fe;
  word-break: break-all;
  line-height: 1.45;
  text-align: left;
}

.mbtn-pd-email-container .footer {
  text-align: center;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid #333333;
  color: #cccccc;
  font-size: 14px;
}

.mbtn-pd-email-container .footer p {
  margin: 0 0 10px;
}

.mbtn-pd-footer-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 14px 16px;
  margin: 18px 0 20px;
}

.mbtn-pd-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none !important;
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 6px 22px rgba(0, 0, 0, 0.45),
    0 2px 10px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.mbtn-pd-social-btn:hover {
  transform: translateY(-3px) scale(1.03);
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.25),
    0 10px 28px rgba(0, 0, 0, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.4);
}

.mbtn-pd-social-btn:active {
  transform: translateY(-1px) scale(1.01);
}

.mbtn-pd-social-btn .mbtn-pd-social-ico {
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.mbtn-pd-social-btn__label {
  white-space: nowrap;
}

.mbtn-pd-social-btn--facebook {
  background: linear-gradient(165deg, #2d88ff 0%, #1877f2 45%, #0c63d4 100%);
  border-color: rgba(130, 190, 255, 0.65);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.mbtn-pd-social-btn--instagram {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 22%,
    #dc2743 45%,
    #cc2366 68%,
    #bc1888 100%
  );
  border-color: rgba(255, 200, 220, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

@media only screen and (max-width: 600px) {
  .mbtn-pd-email-container {
    padding: 26px 18px 32px;
  }

  .mbtn-pd-email-container .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .mbtn-pd-email-container .info-value {
    text-align: left;
  }

  .pd-cred-value-wrap {
    text-align: left;
    flex-basis: 100%;
  }

  .pd-cred-actions {
    justify-content: flex-start;
    flex-basis: 100%;
    width: 100%;
  }

  .pd-cred-label {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-action-primary:hover {
    transform: none;
  }

  .mbtn-pd-social-btn:hover {
    transform: none;
    filter: none;
  }
}
