/* ============================================================
   mtp.css — Meta Tech Provider Capabilities Page
   Companion to style.css — imported only on meta-tech-provider.php
   ============================================================ */

/* ── MTP HERO ─────────────────────────────────────────────── */
.mtp-hero {
  min-height: 52vh;
  padding: 110px 6vw 72px;
  display: flex;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.mtp-hero-inner {
  animation: fadeUp 0.6s ease both;
}

.mtp-hero-inner h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.07;
  letter-spacing: -0.025em;
  color: var(--body);
  margin-top: 20px;
}

.mtp-hero-inner h1 em {
  font-style: italic;
  color: var(--accent);
}

.mtp-hero-chips {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  animation: fadeUp 0.6s 0.18s ease both;
}

/* ── SHARED SECTION WRAPPER ───────────────────────────────── */
.mtp-section,
.mtp-demo-section {
  padding: 80px 6vw;
}

.mtp-demo-alt {
  background: var(--off);
  border-top: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
}

.mtp-inner {
  max-width: 1080px;
  margin: 0 auto;
}

/* ── CAPABILITY MAP ───────────────────────────────────────── */
.cap-map {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2px;
  background: var(--stone);
  border-radius: var(--radius);
  overflow: hidden;
}

.cap-map-group {
  background: var(--white);
  padding: 30px 26px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: background 0.2s;
}

.cap-map-group:hover {
  background: var(--off);
}

.cap-map-icon {
  font-size: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cap-map-group h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--body);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.cap-map-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cap-map-group li {
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.5;
  padding-left: 14px;
  position: relative;
}

.cap-map-group li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
}

@media (max-width: 700px) {
  .cap-map { grid-template-columns: 1fr; }
}

/* ── DEMO SECTION HEADER ──────────────────────────────────── */
.mtp-demo-header {
  margin-bottom: 36px;
}

.demo-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ── DEMO CARD ────────────────────────────────────────────── */
.mtp-demo-card {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

/* Endpoint bar */
.mtp-demo-endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  background: var(--body);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 10px;
}

.mtp-demo-endpoint code {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-family: 'SF Mono', 'Fira Code', monospace;
  word-break: break-all;
}

.method-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
  background: #25d366;
  color: #fff;
  flex-shrink: 0;
}

.method-badge.method-get {
  background: var(--accent);
}

/* Demo body: two-column layout */
.mtp-demo-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

@media (max-width: 720px) {
  .mtp-demo-body { grid-template-columns: 1fr; }
}

.mtp-form-col {
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid var(--stone);
}

@media (max-width: 720px) {
  .mtp-form-col { border-right: none; border-bottom: 1px solid var(--stone); }
}

.mtp-result-col {
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mtp-result-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mtp-result {
  flex: 1;
  background: #0d0d12;
  color: #a8ffb0;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.65;
  padding: 16px;
  border-radius: 10px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 160px;
  max-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: color 0.2s;
}

.mtp-result.mtp-result-error {
  color: #ff7b72;
}

/* ── FORM ELEMENTS ────────────────────────────────────────── */
.mtp-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: -6px;
}

.mtp-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--stone);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--sans);
  color: var(--body);
  background: var(--off);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  appearance: none;
}

.mtp-input:focus {
  border-color: var(--accent);
  background: var(--white);
}

.mtp-input::placeholder {
  color: #b0b0b8;
}

.mtp-textarea {
  resize: vertical;
  min-height: 80px;
}

.mtp-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236e6e73' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.mtp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
  white-space: nowrap;
}

.mtp-btn:hover:not(:disabled) {
  background: #0077ed;
  transform: scale(1.025);
}

.mtp-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mtp-btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.mtp-btn-outline:hover:not(:disabled) {
  background: rgba(0, 113, 227, 0.07);
}

.mtp-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--body);
  border: none;
  border-radius: 980px;
  font-size: 13px;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.2s;
}

.mtp-btn-ghost:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.09);
}

.mtp-btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mtp-btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* Spinner inside button */
.mtp-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mtp-spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes mtp-spin {
  to { transform: rotate(360deg); }
}

/* ── OTP DEMO SPECIFIC ────────────────────────────────────── */
.otp-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.otp-step-hidden {
  display: none !important;
}

.otp-hint {
  font-size: 13px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.5;
}

.otp-input-row {
  display: flex;
  gap: 8px;
}

.otp-digit {
  width: 44px !important;
  height: 52px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 500;
  padding: 0 !important;
  border-radius: 10px !important;
  border: 2px solid var(--stone) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.otp-digit:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15) !important;
}

.otp-timer-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.otp-timer {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.otp-success {
  padding: 20px;
  background: #f0fff4;
  border: 1px solid #34c759;
  border-radius: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.otp-success-icon {
  font-size: 2rem;
}

.otp-success strong {
  font-size: 16px;
  color: #1a7a3f;
}

.otp-success p {
  font-size: 13px;
  color: #2d6a4f;
  font-weight: 300;
}

/* ── WEBHOOK DEMO SPECIFIC ────────────────────────────────── */
.mtp-webhook-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: 400px;
}

@media (max-width: 800px) {
  .mtp-webhook-layout { grid-template-columns: 1fr; }
}

.webhook-info-col {
  padding: 28px 24px;
  border-right: 1px solid var(--stone);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 800px) {
  .webhook-info-col { border-right: none; border-bottom: 1px solid var(--stone); }
}

.webhook-info-box {
  background: var(--off);
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--stone);
}

.webhook-info-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--body);
  margin-bottom: 12px;
}

.webhook-steps {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.webhook-steps li {
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.5;
}

.webhook-number-badge {
  margin-top: 14px;
  padding: 8px 12px;
  background: rgba(0, 113, 227, 0.07);
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 8px;
  font-size: 12px;
  color: var(--accent);
}

.webhook-event-types {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.webhook-event-types ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.webhook-event-types li {
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.evt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.evt-dot.evt-msg       { background: var(--accent); }
.evt-dot.evt-sent      { background: #aaa; }
.evt-dot.evt-delivered { background: #34c759; }
.evt-dot.evt-read      { background: #00b8d9; }
.evt-dot.evt-failed    { background: #e74c3c; }

/* Feed */
.webhook-feed-col {
  display: flex;
  flex-direction: column;
}

.webhook-feed-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--stone);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--body);
}

.wf-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c759;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

.webhook-feed {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  background: #0d0d12;
}

.webhook-empty {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  margin: auto;
  font-weight: 300;
}

.wf-event {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: bubbleIn 0.2s ease both;
}

.wf-event-read      { border-left: 3px solid #00b8d9; }
.wf-event-delivered { border-left: 3px solid #34c759; }
.wf-event-sent      { border-left: 3px solid #aaa; }
.wf-event-failed    { border-left: 3px solid #e74c3c; }
.wf-event-message   { border-left: 3px solid var(--accent); }

.wf-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a8ffb0;
}

.wf-from {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.wf-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  font-variant-numeric: tabular-nums;
}

.wf-payload {
  font-size: 11px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: rgba(255, 255, 255, 0.55);
  white-space: pre-wrap;
  word-break: break-all;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 10px;
  border-radius: 6px;
  max-height: 120px;
  overflow-y: auto;
}

/* ── INTERACTIVE BUTTONS DEMO ─────────────────────────────── */
.btn-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── TEMPLATE DEMO ────────────────────────────────────────── */
.template-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

/* ── BUSINESS PROFILE DISPLAY ─────────────────────────────── */
.mtp-profile-layout {
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-card-display {
  background: var(--off);
  border: 1px solid var(--stone);
  border-radius: 14px;
  overflow: hidden;
}

.pc-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--stone);
}

.pc-row:last-child {
  border-bottom: none;
}

.pc-key {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  min-width: 120px;
  flex-shrink: 0;
}

.pc-val {
  font-size: 14px;
  color: var(--body);
  font-weight: 300;
  word-break: break-word;
}

/* ── INLINE CODE ──────────────────────────────────────────── */
code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.88em;
  background: rgba(0, 113, 227, 0.08);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 5px;
}

/* Override inside endpoint bar */
.mtp-demo-endpoint code {
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  padding: 0;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 520px) {
  .mtp-hero      { padding: 90px 5vw 52px; }
  .mtp-section,
  .mtp-demo-section { padding: 56px 5vw; }
  .mtp-form-col,
  .mtp-result-col { padding: 20px 18px; }
  .otp-input-row  { gap: 5px; }
  .otp-digit      { width: 38px !important; height: 46px; font-size: 1.1rem; }
}