/* MFV Provider Pages — Dashboard Tab Styles (v2) */

.mfv-pp-dashboard {
  max-width: 780px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Header                                                                    */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dash__header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid #e5e7eb; }
.mfv-pp-dash__title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mfv-pp-dash__title { font-size: 1.6rem; font-weight: 700; color: #111827; margin: 0; }
.mfv-pp-dash__tier-badge { padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.mfv-pp-dash__tier-badge--mid   { background: #e0f2fe; color: #0369a1; }
.mfv-pp-dash__tier-badge--elite { background: #fef3c7; color: #92400e; }

.mfv-pp-dash__live-link { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #6b7280; }
.mfv-pp-dash__subdomain-link { display: inline-flex; align-items: center; gap: 5px; color: var(--mfv-primary, #0e7490); font-weight: 600; text-decoration: none; }
.mfv-pp-dash__subdomain-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Site Switcher                                                             */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dash__site-switcher {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
}
.mfv-pp-dash__site-switcher .mfv-pp-dash__field-label {
  min-width: auto;
  white-space: nowrap;
  font-size: 0.88rem;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Sections                                                                  */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dash__section { margin-bottom: 32px; }
.mfv-pp-dash__section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--mfv-slate-700, #374151);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mfv-pp-dash__section-title svg { color: #9ca3af; flex-shrink: 0; }
.mfv-pp-dash__help { font-size: 0.85rem; color: #9ca3af; margin: 0 0 14px; }
.mfv-pp-dash__section--info { display: flex; gap: 10px; align-items: flex-start; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px; padding: 16px; }
.mfv-pp-dash__section--info svg { flex-shrink: 0; color: #0284c7; margin-top: 2px; }
.mfv-pp-dash__section--info p { margin: 0; font-size: 0.88rem; color: #0369a1; line-height: 1.5; }
.mfv-pp-dash__section--info a { color: var(--mfv-primary, #0e7490); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Input & Select                                                            */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dash__input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #111827;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.mfv-pp-dash__input:focus { outline: none; border-color: var(--mfv-primary, #0e7490); box-shadow: 0 0 0 3px rgba(var(--mfv-primary-rgb, 14,116,144),0.1); }

.mfv-pp-dash__select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #111827;
  background: #fff;
  cursor: pointer;
}
.mfv-pp-dash__select:focus { outline: none; border-color: var(--mfv-primary, #0e7490); }
.mfv-pp-dash__select--wide { width: 100%; max-width: 500px; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Subdomain Slug Input                                                      */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dash__slug-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.mfv-pp-dash__slug-prefix,
.mfv-pp-dash__slug-suffix {
  padding: 10px 12px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  color: #6b7280;
  white-space: nowrap;
}
.mfv-pp-dash__slug-prefix { border-radius: 8px 0 0 8px; border-right: 0; }
.mfv-pp-dash__slug-suffix { border-radius: 0 8px 8px 0; border-left: 0; }
.mfv-pp-dash__slug-input {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  font-size: 0.9rem;
  color: #111827;
  width: 180px;
  min-width: 120px;
  outline: none;
  transition: border-color 0.2s;
}
.mfv-pp-dash__slug-input:focus { border-color: var(--mfv-primary, #0e7490); box-shadow: 0 0 0 3px rgba(var(--mfv-primary-rgb, 14,116,144),0.1); }
.mfv-pp-dash__slug-status {
  margin-left: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}
.mfv-pp-dash__slug-status--ok { color: #16a34a; }
.mfv-pp-dash__slug-status--taken { color: var(--mfv-error, #dc2626); }
.mfv-pp-dash__slug-status--checking { color: #9ca3af; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Page Manager                                                              */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dash__page-section { margin-top: 12px; }

.mfv-pp-dash__page-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 20px;
}
.mfv-pp-dash__page-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: grab;
}
.mfv-pp-dash__page-item:hover { border-color: var(--mfv-primary, #0e7490); }
.mfv-pp-dash__page-item.mfv-dragging {
  opacity: 0.5;
  border-color: var(--mfv-primary, #0e7490);
  box-shadow: 0 4px 12px rgba(var(--mfv-primary-rgb, 14,116,144),0.15);
}
.mfv-pp-dash__page-item.mfv-drag-over {
  border-color: var(--mfv-primary, #0e7490);
  border-style: dashed;
}

.mfv-pp-dash__page-drag {
  cursor: grab;
  color: #9ca3af;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.mfv-pp-dash__page-drag:active { cursor: grabbing; }

.mfv-pp-dash__page-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mfv-pp-dash__page-type {
  font-size: 0.78rem;
  color: #9ca3af;
  flex-shrink: 0;
}

.mfv-pp-dash__page-remove {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.mfv-pp-dash__page-remove:hover { color: var(--mfv-error, #dc2626); background: #fef2f2; }

.mfv-pp-dash__page-add {
  margin-top: 8px;
}
.mfv-pp-dash__page-add .mfv-pp-dash__select {
  width: 100%;
  max-width: 500px;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Template Cards                                                            */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dash__templates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.mfv-pp-dash__template-card {
  cursor: pointer;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  position: relative;
}
.mfv-pp-dash__template-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.mfv-pp-dash__template-card:hover { border-color: var(--mfv-primary, #0e7490); }
.mfv-pp-dash__template-card--active { border-color: var(--mfv-primary, #0e7490); box-shadow: 0 0 0 3px rgba(var(--mfv-primary-rgb, 14,116,144),0.15); }
.mfv-pp-dash__template-card--locked { cursor: default; opacity: 0.6; }

.mfv-pp-dash__template-preview {
  height: 130px;
  position: relative;
  overflow: hidden;
  background: #f3f4f6;
}
.mfv-pp-dash__template-preview--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.mfv-pp-dash__template-info { padding: 10px 12px; }
.mfv-pp-dash__template-info strong { display: block; font-size: 0.9rem; color: #111827; margin-bottom: 2px; }
.mfv-pp-dash__template-info span { font-size: 0.78rem; color: #9ca3af; display: block; line-height: 1.4; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Section Toggles                                                           */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dash__toggles { display: flex; flex-direction: column; gap: 10px; }
.mfv-pp-dash__toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 8px 12px; border-radius: 8px; transition: background 0.15s; }
.mfv-pp-dash__toggle:hover { background: #f9fafb; }
.mfv-pp-dash__toggle--locked { opacity: 0.6; cursor: default; }
.mfv-pp-dash__toggle input[type="checkbox"] { display: none; }
.mfv-pp-dash__toggle-slider {
  width: 40px;
  height: 22px;
  background: #d1d5db;
  border-radius: 11px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}
.mfv-pp-dash__toggle-slider::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.mfv-pp-dash__toggle input:checked ~ .mfv-pp-dash__toggle-slider { background: var(--mfv-primary, #0e7490); }
.mfv-pp-dash__toggle input:checked ~ .mfv-pp-dash__toggle-slider::after { transform: translateX(18px); }
.mfv-pp-dash__toggle-label { font-size: 0.9rem; color: var(--mfv-slate-700, #374151); }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Color Picker                                                              */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dash__color-row { display: flex; align-items: center; gap: 12px; }
.mfv-pp-dash__color-input { width: 48px; height: 40px; padding: 2px; border: 1px solid #d1d5db; border-radius: 8px; cursor: pointer; }
.mfv-pp-dash__color-text { width: 110px; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.9rem; font-family: monospace; }
.mfv-pp-dash__elite-badge { background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 10px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Palette Swatches                                                          */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dash__palettes { display: flex; gap: 12px; flex-wrap: wrap; }
.mfv-pp-dash__palette-swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.mfv-pp-dash__palette-swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.mfv-pp-dash__palette-dot { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; transition: border-color 0.2s, transform 0.2s; display: block; }
.mfv-pp-dash__palette-swatch:hover .mfv-pp-dash__palette-dot { transform: scale(1.1); }
.mfv-pp-dash__palette-swatch--active .mfv-pp-dash__palette-dot { border-color: var(--mfv-primary, #0e7490); box-shadow: 0 0 0 3px rgba(var(--mfv-primary-rgb, 14,116,144),0.2); }
.mfv-pp-dash__palette-label { font-size: 0.72rem; color: #6b7280; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Field Rows (select dropdowns)                                             */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dash__field-row { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.mfv-pp-dash__field-label { font-size: 0.9rem; color: var(--mfv-slate-700, #374151); font-weight: 500; min-width: 140px; flex-shrink: 0; }
.mfv-pp-dash__help-inline { font-size: 0.8rem; color: #9ca3af; font-weight: 400; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Actions (Save button)                                                     */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dash__actions { display: flex; align-items: center; gap: 16px; margin-top: 32px; padding-top: 24px; border-top: 1px solid #e5e7eb; }
.mfv-pp-dash__save-btn {
  padding: 12px 28px;
  background: var(--mfv-primary, #0e7490);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s;
}
.mfv-pp-dash__save-btn:hover { filter: brightness(1.1); }
.mfv-pp-dash__save-btn:disabled { opacity: 0.6; cursor: not-allowed; filter: none; }
.mfv-pp-dash__save-status { font-size: 0.9rem; }
.mfv-pp-dash__save-status--success { color: #16a34a; }
.mfv-pp-dash__save-status--error   { color: var(--mfv-error, #dc2626); }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Upgrade Prompt                                                            */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-pp-dashboard--upgrade { text-align: center; }
.mfv-pp-dash__upgrade-lead { color: #6b7280; margin: 12px 0 32px; font-size: 1rem; line-height: 1.6; }
.mfv-pp-dash__upgrade-cta { padding: 32px; background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border-radius: 16px; }
.mfv-pp-dash__upgrade-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--mfv-primary, #0e7490);
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: filter 0.2s;
}
.mfv-pp-dash__upgrade-btn:hover { filter: brightness(1.1); color: #fff; text-decoration: none; }
.mfv-pp-dash__upgrade-note { margin-top: 12px; font-size: 0.85rem; color: #6b7280; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Responsive                                                                */
/* ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .mfv-pp-dash__slug-row { flex-wrap: wrap; }
  .mfv-pp-dash__slug-input { width: 100%; border-radius: 8px; margin-top: 6px; }
  .mfv-pp-dash__slug-prefix,
  .mfv-pp-dash__slug-suffix { display: none; }
  .mfv-pp-dash__slug-status { margin-left: 0; margin-top: 6px; }

  .mfv-pp-dash__field-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .mfv-pp-dash__field-label { min-width: auto; }

  .mfv-pp-dash__templates { grid-template-columns: 1fr; }

  .mfv-pp-dash__site-switcher { flex-direction: column; align-items: flex-start; gap: 8px; }
  .mfv-ct-tabs { flex-wrap: wrap; }
  .mfv-ct-field-wrap { flex-direction: column; align-items: flex-start; }
  .mfv-ct-field-wrap--textarea { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/*  Custom Text Page Tabs                                                      */
/* ═══════════════════════════════════════════════════════════════════════════ */
.mfv-ct-tabs {
  display: flex;
  gap: 4px;
  margin: 14px 0 18px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 4px;
}
.mfv-ct-tab {
  flex: 1;
  padding: 7px 12px;
  border: none;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
}
.mfv-ct-tab:hover { background: #e5e7eb; color: var(--mfv-slate-700, #374151); }
.mfv-ct-tab--active { background: #fff; color: var(--mfv-primary, #0e7490); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }

/* ── "← listing" button & field wrapper ─────────────────────────────────── */
.mfv-ct-field-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  width: 100%;
}
.mfv-ct-field-wrap .mfv-pp-dash__input { flex: 1; }
.mfv-ct-field-wrap--textarea { flex-direction: column; align-items: flex-start; }
.mfv-ct-field-wrap--textarea .mfv-pp-dash__textarea { width: 100%; }
.mfv-ct-from-listing {
  flex-shrink: 0;
  padding: 5px 10px;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #0369a1;
  background: #f0f9ff;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.mfv-ct-from-listing:hover { background: #e0f2fe; border-color: #7dd3fc; }
.mfv-ct-field-wrap--textarea .mfv-ct-from-listing { margin-top: 6px; }

/* ── Dashboard Sub-tabs ─────────────────────────────────────────────────── */
.mfv-pp-dash__subtabs {
  display: flex;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.mfv-pp-dash__subtabs::-webkit-scrollbar { display: none; }
.mfv-pp-dash__subtab {
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  color: #6b7280;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.mfv-pp-dash__subtab:hover { color: var(--mfv-slate-700, #374151); }
.mfv-pp-dash__subtab--active {
  border-bottom-color: #0d9488;
  color: #0d9488;
  font-weight: 600;
}
.mfv-pp-dash__panel { display: none; }
.mfv-pp-dash__panel--active { display: block; }

/* ── Outer tab bar: Pro Site | Biz Card ─────────────────────────────────── */
.mfv-pp-outer-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  border-bottom: 2px solid #e5e7eb;
}
.mfv-pp-outer-tab {
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  color: var(--mfv-slate-700, #374151);
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.mfv-pp-outer-tab:hover { color: #0d9488; }
.mfv-pp-outer-tab--active {
  border-bottom-color: #0d9488;
  color: #0d9488;
}
.mfv-pp-outer-pane { padding-top: 20px; }

/* Inner sub-tab bar sits flush under the Pro Site pane */
.mfv-pp-outer-pane .mfv-pp-dash__live-link { margin-bottom: 16px; }
