/* Public provider profile — final identity and responsive layer. */

body.page-provider-detail {
  --pdp-ink: #17213d;
  --pdp-muted: #69758b;
  --pdp-purple: #6940bd;
  --pdp-purple-deep: #4e278c;
  --pdp-teal: #23b8b2;
  --pdp-teal-deep: #147d7b;
  --pdp-orange: #f2a15d;
  --pdp-border: rgba(74, 49, 117, .12);
  --pdp-surface: rgba(255, 255, 255, .96);
  --pdp-surface-soft: rgba(250, 248, 253, .92);
  --pdp-shadow: 0 24px 60px -28px rgba(48, 29, 83, .32), 0 10px 24px -18px rgba(48, 29, 83, .22);
}

html[data-theme="dark"] body.page-provider-detail {
  --pdp-ink: #f7f4ff;
  --pdp-muted: #b6acc9;
  --pdp-purple: #b08cf1;
  --pdp-purple-deep: #9d75e7;
  --pdp-teal: #66d8d2;
  --pdp-teal-deep: #58c9c3;
  --pdp-orange: #ffc286;
  --pdp-border: rgba(206, 190, 235, .15);
  --pdp-surface: rgba(27, 21, 43, .96);
  --pdp-surface-soft: rgba(34, 27, 53, .92);
  --pdp-shadow: 0 28px 70px -26px rgba(0, 0, 0, .72), 0 12px 30px -20px rgba(0, 0, 0, .62);
}

body.page-provider-detail .pd-page-premium,
body.page-provider-detail .pd-content-shell,
body.page-provider-detail .pd-loading-shell {
  background:
    radial-gradient(850px 420px at 95% 2%, rgba(105,64,189,.09), transparent 62%),
    radial-gradient(700px 380px at 0% 34%, rgba(35,184,178,.07), transparent 62%),
    linear-gradient(180deg, #f7f6fa 0%, #f4f7f8 48%, #f7f5fb 100%) !important;
}

html[data-theme="dark"] body.page-provider-detail :is(.pd-page-premium, .pd-content-shell, .pd-loading-shell) {
  background:
    radial-gradient(850px 420px at 95% 2%, rgba(125,80,210,.16), transparent 62%),
    radial-gradient(700px 380px at 0% 34%, rgba(35,184,178,.07), transparent 62%),
    linear-gradient(180deg, #100c19 0%, #101722 48%, #14101e 100%) !important;
}

body.page-provider-detail .pd-content-shell,
body.page-provider-detail .pd-loading-shell {
  width: min(1240px, calc(100% - 44px)) !important;
  margin-inline: auto !important;
}

body.page-provider-detail .pd-content-shell > .container,
body.page-provider-detail .pd-loading-shell > .container {
  width: 100%;
  max-width: none;
}

/* Profile hero */
body.page-provider-detail .pd-hero {
  margin-top: 18px;
  border-radius: 32px;
}

body.page-provider-detail .pd-hero::after {
  height: 96px;
  background: linear-gradient(180deg, transparent, rgba(247,246,250,.82) 74%, #f7f6fa 100%);
}

html[data-theme="dark"] body.page-provider-detail .pd-hero::after {
  background: linear-gradient(180deg, transparent, rgba(16,12,25,.82) 74%, #100c19 100%);
}

body.page-provider-detail .pd-cover {
  height: clamp(250px, 28vw, 340px) !important;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 32px !important;
  background:
    radial-gradient(420px 260px at 84% 8%, rgba(255,255,255,.15), transparent 65%),
    linear-gradient(135deg, #3d2073, #6940b6 56%, #257f89) !important;
  box-shadow: 0 28px 68px -28px rgba(42,23,73,.52) !important;
}

body.page-provider-detail .pd-cover .pd-cover-media { object-fit: cover !important; }
body.page-provider-detail .pd-cover-gradient {
  height: 80%;
  background: linear-gradient(0deg, rgba(17,10,31,.62), rgba(17,10,31,.08) 66%, transparent);
}

body.page-provider-detail .pd-cover-btn {
  width: 43px;
  height: 43px;
  border: 1px solid rgba(255,255,255,.30);
  border-radius: 14px;
  background: rgba(20,12,36,.42);
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
  backdrop-filter: blur(14px);
}

body.page-provider-detail .pd-cover-btn:hover {
  border-color: rgba(255,255,255,.52);
  background: rgba(255,255,255,.20);
  transform: translateY(-1px);
}

body.page-provider-detail .pd-avatar-area {
  margin-top: -60px !important;
  margin-bottom: 8px !important;
}

body.page-provider-detail.page-provider-detail-premium .pd-avatar-wrap {
  width: 124px !important;
  height: 124px !important;
}

body.page-provider-detail .pd-avatar {
  border: 5px solid rgba(255,255,255,.98) !important;
  background: linear-gradient(135deg, #704bc0, #23b8b2) !important;
  box-shadow: 0 20px 40px -14px rgba(57,32,99,.46) !important;
}

html[data-theme="dark"] body.page-provider-detail .pd-avatar { border-color: #1b152b !important; }

body.page-provider-detail .pd-badge-row { margin-top: 9px; }

body.page-provider-detail.page-provider-detail-premium .pd-identity {
  position: relative;
  width: min(760px, calc(100% - 32px)) !important;
  margin: 0 auto 24px !important;
  padding: 21px 24px 19px !important;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.84) !important;
  border-radius: 28px !important;
  background: var(--pdp-surface) !important;
  color: var(--pdp-ink);
  box-shadow: var(--pdp-shadow) !important;
  backdrop-filter: blur(16px);
}

body.page-provider-detail.page-provider-detail-premium .pd-identity::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 20%;
  height: 3px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, #5f86f9, #9461e1 42%, #ed759d 72%, #f3a05e);
}

html[data-theme="dark"] body.page-provider-detail.page-provider-detail-premium .pd-identity {
  border-color: var(--pdp-border) !important;
  background: linear-gradient(180deg, rgba(31,24,49,.97), rgba(24,19,39,.96)) !important;
}

body.page-provider-detail .pd-name {
  color: var(--pdp-ink) !important;
  font-size: clamp(27px, 3vw, 38px) !important;
  font-weight: 950 !important;
  line-height: 1.22 !important;
}

body.page-provider-detail .pd-handle { color: var(--pdp-muted) !important; }
body.page-provider-detail .pd-category-text { color: var(--pdp-purple) !important; font-weight: 850; }

body.page-provider-detail .pd-social-follow-btn {
  min-width: 132px;
  min-height: 42px;
  border: 1px solid rgba(105,64,189,.18);
  background: linear-gradient(135deg, rgba(105,64,189,.09), rgba(255,255,255,.86));
  color: var(--pdp-purple-deep);
  box-shadow: 0 12px 24px -16px rgba(71,39,126,.32);
}

html[data-theme="dark"] body.page-provider-detail .pd-social-follow-btn {
  background: rgba(176,140,241,.10);
  color: var(--pdp-purple);
}

/* Overview and primary actions */
body.page-provider-detail .pd-discovery-shell {
  grid-template-columns: minmax(0, 1.42fr) minmax(310px, .68fr) !important;
  align-items: start;
  gap: 22px !important;
  margin-bottom: 24px;
}

body.page-provider-detail .pd-profile-summary-card {
  gap: 14px !important;
  padding: 20px !important;
  border: 1px solid rgba(255,255,255,.82) !important;
  border-radius: 28px !important;
  background: var(--pdp-surface) !important;
  box-shadow: var(--pdp-shadow) !important;
}

html[data-theme="dark"] body.page-provider-detail .pd-profile-summary-card {
  border-color: var(--pdp-border) !important;
  background: var(--pdp-surface) !important;
}

body.page-provider-detail .pd-profile-summary-card::before {
  inset-inline: 28px;
  background: linear-gradient(90deg, transparent, var(--pdp-teal), var(--pdp-purple), transparent);
}

.pd-summary-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--pdp-border);
}

.pd-summary-head-icon,
.pd-card-heading-icon,
.pd-trust-note-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(105,64,189,.08);
  color: var(--pdp-purple);
}

.pd-summary-head svg,
.pd-card-heading svg,
.pd-trust-note svg,
.pd-load-error svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pd-summary-head strong,
.pd-summary-head small { display: block; }
.pd-summary-head strong { color: var(--pdp-ink); font-size: 14px; font-weight: 950; }
.pd-summary-head small { margin-top: 3px; color: var(--pdp-muted); font-size: 10.5px; font-weight: 700; }

body.page-provider-detail .pd-profile-summary-card .pd-overview-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.page-provider-detail .pd-profile-summary-card .pd-overview-card {
  min-height: 88px;
  padding: 13px !important;
  border: 1px solid var(--pdp-border);
  border-radius: 18px !important;
  background: linear-gradient(145deg, rgba(105,64,189,.045), rgba(35,184,178,.035));
  box-shadow: none;
}

body.page-provider-detail .pd-overview-icon {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: rgba(35,184,178,.10);
  color: var(--pdp-teal-deep);
  box-shadow: none;
}

body.page-provider-detail .pd-overview-label { color: var(--pdp-muted) !important; }
body.page-provider-detail .pd-overview-value { color: var(--pdp-ink) !important; font-weight: 950; }

body.page-provider-detail .pd-profile-summary-card .pd-stats-card {
  width: 100%;
  max-width: none;
  padding: 14px 10px;
  border: 1px solid var(--pdp-border);
  border-radius: 20px;
  background: var(--pdp-surface-soft);
  box-shadow: none;
}

body.page-provider-detail .pd-stat-value { color: var(--pdp-purple) !important; }
body.page-provider-detail .pd-stat-label { color: var(--pdp-muted) !important; }

body.page-provider-detail .pd-profile-summary-card .pd-connections-row {
  padding: 5px 8px;
  border: 1px solid var(--pdp-border);
  border-radius: 18px;
  background: var(--pdp-surface-soft);
  box-shadow: none;
}

body.page-provider-detail .pd-connections-btn { border-radius: 13px; }
body.page-provider-detail .pd-connections-btn:hover { background: rgba(105,64,189,.06); }

body.page-provider-detail .pd-discovery-side .pd-actions {
  position: sticky;
  top: calc(var(--navbar-height, 72px) + 16px);
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 28px;
  background: var(--pdp-surface);
  box-shadow: var(--pdp-shadow);
}

html[data-theme="dark"] body.page-provider-detail .pd-discovery-side .pd-actions {
  border-color: var(--pdp-border);
  background: var(--pdp-surface);
}

body.page-provider-detail .pd-action-primary {
  min-height: 72px;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 18px;
  background: linear-gradient(112deg, #54309b 0%, #7449c5 68%, #24aaa6 135%);
  color: #fff;
  box-shadow: 0 18px 34px -15px rgba(83,48,155,.50);
}

body.page-provider-detail .pd-action-primary:hover {
  filter: saturate(1.06);
  transform: translateY(-2px);
}

body.page-provider-detail .pd-actions-contact-card {
  padding: 14px;
  border: 1px solid var(--pdp-border);
  border-radius: 20px;
  background: var(--pdp-surface-soft);
  box-shadow: none;
}

body.page-provider-detail .pd-actions-contact-title { color: var(--pdp-ink); }
body.page-provider-detail .pd-actions-contact-note { color: var(--pdp-muted); }

body.page-provider-detail .pd-actions-grid { grid-template-columns: 1fr; gap: 8px; }
body.page-provider-detail .pd-action-tile {
  min-height: 66px;
  padding: 10px 11px;
  align-items: center;
  border: 1px solid var(--pdp-border);
  border-radius: 15px;
  background: rgba(255,255,255,.72);
  box-shadow: none;
}

html[data-theme="dark"] body.page-provider-detail .pd-action-tile { background: rgba(255,255,255,.035); }

body.page-provider-detail .pd-action-tile-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(105,64,189,.08);
  color: var(--pdp-purple);
}

body.page-provider-detail .pd-action-whatsapp .pd-action-tile-icon { background: rgba(34,197,94,.10); color: #159447; }
body.page-provider-detail .pd-action-copy strong { color: var(--pdp-ink); }
body.page-provider-detail .pd-action-copy small { color: var(--pdp-muted); }

.pd-trust-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(35,184,178,.16);
  border-radius: 16px;
  background: rgba(35,184,178,.055);
}

.pd-trust-note-icon { width: 34px; height: 34px; flex-basis: 34px; background: rgba(35,184,178,.11); color: var(--pdp-teal-deep); }
.pd-trust-note span:last-child { min-width: 0; }
.pd-trust-note strong,
.pd-trust-note small { display: block; }
.pd-trust-note strong { color: var(--pdp-ink); font-size: 11.5px; font-weight: 900; }
.pd-trust-note small { margin-top: 3px; color: var(--pdp-muted); font-size: 9.5px; font-weight: 700; line-height: 1.7; }

/* Highlights, tabs, and profile cards */
body.page-provider-detail .pd-highlights-section,
body.page-provider-detail .pd-tabs-shell {
  border: 1px solid rgba(255,255,255,.82) !important;
  border-radius: 28px !important;
  background: var(--pdp-surface) !important;
  box-shadow: var(--pdp-shadow) !important;
}

html[data-theme="dark"] body.page-provider-detail :is(.pd-highlights-section, .pd-tabs-shell) {
  border-color: var(--pdp-border) !important;
}

body.page-provider-detail .pd-highlights-section { margin-bottom: 22px; padding: 18px; }
body.page-provider-detail .pd-section-title { color: var(--pdp-ink); }
body.page-provider-detail .pd-section-hint { color: var(--pdp-muted); }

body.page-provider-detail .pd-tabs-shell { padding: 15px 18px 20px !important; }
body.page-provider-detail .pd-tabs-shell .pd-tabs {
  gap: 8px;
  margin-bottom: 14px;
  padding: 0 0 13px !important;
  border-bottom: 1px solid var(--pdp-border) !important;
}

body.page-provider-detail .pd-tab {
  min-height: 48px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--pdp-muted);
}

body.page-provider-detail .pd-tab.active {
  border-color: rgba(105,64,189,.20);
  background: linear-gradient(135deg, #5a329f, #764dc5);
  color: #fff;
  box-shadow: 0 12px 25px -13px rgba(84,46,153,.50);
}

body.page-provider-detail .pd-tabs-shell .pd-tab-content {
  padding: 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.page-provider-detail #tab-profile.pd-panel.active {
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}

body.page-provider-detail .pd-card {
  border: 1px solid var(--pdp-border);
  border-radius: 20px !important;
  background: var(--pdp-surface-soft);
  box-shadow: none !important;
}

body.page-provider-detail .pd-card:hover { border-color: rgba(105,64,189,.20); box-shadow: 0 14px 28px -22px rgba(62,36,105,.28) !important; }

.pd-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pdp-border);
}

.pd-card-heading-icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 11px; }
.pd-card-heading h4 { margin: 0; color: var(--pdp-ink); font-size: 13px; font-weight: 950; }
body.page-provider-detail .pd-field-label { color: var(--pdp-muted); }
body.page-provider-detail .pd-field-value { color: var(--pdp-ink); font-weight: 850; }

/* Explicit load failure instead of a blank page. */
body.page-provider-detail .pd-load-error {
  width: min(560px, calc(100% - 32px));
  min-height: 360px;
  margin: 72px auto;
  padding: 40px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 30px;
  background: var(--pdp-surface);
  color: var(--pdp-ink);
  box-shadow: var(--pdp-shadow);
  text-align: center;
}

body.page-provider-detail .pd-load-error.hidden { display: none !important; }
.pd-load-error-icon { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 21px; background: rgba(242,161,93,.12); color: #c57029; }
.pd-load-error-icon svg { width: 31px; height: 31px; }
.pd-load-error-copy h1 { margin: 0; color: var(--pdp-ink); font-size: 24px; font-weight: 950; }
.pd-load-error-copy p { max-width: 42ch; margin: 8px auto 0; color: var(--pdp-muted); font-size: 13px; font-weight: 700; line-height: 1.8; }
.pd-load-retry {
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #57309d, #7448c2);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 14px 28px -13px rgba(84,46,153,.50);
  cursor: pointer;
}

body.page-provider-detail :is(button, a):focus-visible {
  outline: 3px solid rgba(35,184,178,.36) !important;
  outline-offset: 3px !important;
}

@media (max-width: 1023px) {
  body.page-provider-detail .pd-content-shell,
  body.page-provider-detail .pd-loading-shell { width: 100% !important; }

  body.page-provider-detail .pd-discovery-shell { grid-template-columns: 1fr !important; }
  body.page-provider-detail .pd-discovery-side .pd-actions { position: static; }
  body.page-provider-detail .pd-actions-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  body.page-provider-detail .pd-action-tile { min-height: 76px; align-items: flex-start; }
}

@media (max-width: 760px) {
  body.page-provider-detail .pd-hero { margin-top: 0; border-radius: 0; }
  body.page-provider-detail .pd-cover { height: 220px !important; border-width: 0; border-radius: 0 0 25px 25px !important; }
  body.page-provider-detail .pd-cover-actions { top: max(12px, env(safe-area-inset-top, 0px)); }
  body.page-provider-detail .pd-avatar-area { margin-top: -54px !important; }

  body.page-provider-detail.page-provider-detail-premium .pd-avatar-wrap { width: 110px !important; height: 110px !important; }
  body.page-provider-detail.page-provider-detail-premium .pd-identity { width: calc(100% - 24px) !important; margin-bottom: 17px !important; padding: 18px 16px 16px !important; border-radius: 23px !important; }
  body.page-provider-detail .pd-name { font-size: clamp(24px, 7vw, 30px) !important; }

  body.page-provider-detail .pd-content-shell > .container { padding-inline: 12px; }
  body.page-provider-detail .pd-profile-summary-card { padding: 14px !important; border-radius: 23px !important; }
  body.page-provider-detail .pd-profile-summary-card .pd-overview-strip { grid-template-columns: 1fr !important; }
  body.page-provider-detail .pd-profile-summary-card .pd-overview-card { min-height: 68px; }
  body.page-provider-detail .pd-profile-summary-card .pd-stats-card { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  body.page-provider-detail .pd-profile-summary-card .pd-stat { min-height: 62px; border: 1px solid var(--pdp-border); border-radius: 14px; justify-content: center; background: rgba(255,255,255,.45); }
  body.page-provider-detail .pd-profile-summary-card .pd-stat-divider { display: none; }

  body.page-provider-detail .pd-discovery-side .pd-actions { padding: 14px; border-radius: 23px; }
  body.page-provider-detail .pd-actions-grid { grid-template-columns: 1fr; }
  body.page-provider-detail .pd-action-tile { min-height: 62px; align-items: center; }
  body.page-provider-detail .pd-highlights-section,
  body.page-provider-detail .pd-tabs-shell { border-radius: 23px !important; }
  body.page-provider-detail .pd-tabs-shell { padding: 12px 10px 16px !important; }
  body.page-provider-detail .pd-tabs-shell .pd-tabs { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; }
  body.page-provider-detail .pd-tab { min-width: max-content; }
  body.page-provider-detail #tab-profile.pd-panel.active { grid-template-columns: 1fr; }
  body.page-provider-detail .pd-card { border-radius: 18px !important; }
}

@media (max-width: 420px) {
  .pd-summary-head small { max-width: 29ch; }
  body.page-provider-detail .pd-profile-summary-card .pd-connections-row { grid-template-columns: 1fr; }
  body.page-provider-detail .pd-load-error { min-height: 320px; margin-block: 32px; padding: 28px 18px; border-radius: 24px; }
  .pd-load-error-copy h1 { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  body.page-provider-detail *,
  body.page-provider-detail *::before,
  body.page-provider-detail *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
