/*
 * Shared layout for tabbed settings-style panels (Profile, Term & Policies).
 * Loaded by landing/index.html and landing/sdk/sdk-widget.html so both surfaces
 * render the same chrome for the Term & Policies modal and any future
 * settings-tab modal.
 */

.profile-panel {
  --profile-field-inline-margin: clamp(0px, calc((100vw - 560px) * 0.083333), 20px);
  position: relative;
  height: calc(100dvh - 40px);
  max-height: calc(100dvh - 40px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
}

.flow-panel.profile-panel {
  padding: 30px clamp(18px, calc(18px + 6 * (100vw - 480px) / 280), 24px);
}

.profile-modal-title {
  width: min(100%, 960px);
  margin: 0 auto;
  font-size: clamp(1.8rem, 4vw, 2rem);
  line-height: 1.06;
  text-align: center;
}

.profile-settings-tabs {
  width: min(100%, 540px);
  margin: 0 auto 2px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.profile-settings-tab {
  appearance: none;
  min-width: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(229, 236, 255, 0.72);
  cursor: pointer;
  font: 800 0.88rem/1.2 var(--flow-font-family);
  letter-spacing: 0;
  text-align: center;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.profile-settings-tab[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(244, 247, 255, 0.96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.profile-settings-tab:focus-visible {
  outline: 2px solid rgba(154, 210, 255, 0.7);
  outline-offset: 2px;
}

.profile-settings-pane {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.profile-settings-pane[hidden] {
  display: none !important;
}

.settings-scroll-arrow,
.profile-scroll-arrow {
  position: absolute;
  left: 50%;
  z-index: 3;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 0.16s ease;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.36));
}

.settings-scroll-arrow.is-visible,
.profile-scroll-arrow.is-visible {
  opacity: 1;
}

.settings-scroll-arrow-top,
.profile-scroll-arrow-top {
  border-right: 7px solid transparent;
  border-bottom: 9px solid rgba(244, 247, 255, 0.5);
  border-left: 7px solid transparent;
}

.settings-scroll-arrow-bottom,
.profile-scroll-arrow-bottom {
  border-top: 9px solid rgba(244, 247, 255, 0.5);
  border-right: 7px solid transparent;
  border-left: 7px solid transparent;
}

#legal-modal .flow-legal-frame {
  flex: 1 1 auto;
  max-height: none;
  display: flex;
  flex-direction: column;
}

#legal-modal .flow-legal-panel-copy {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
}

#legal-modal .flow-actions {
  margin-top: 0;
}

#legal-modal .profile-settings-pane {
  position: relative;
}

.legal-close-button {
  min-width: 220px;
  padding-inline: 32px;
}

@media (max-width: 560px) {
  .profile-panel {
    --profile-field-inline-margin: 0px;
    height: calc(100dvh - 40px);
    max-height: calc(100dvh - 40px);
    padding: 30px 18px;
  }

  .profile-settings-tabs {
    width: 100%;
    gap: 4px;
  }

  .profile-settings-tab {
    padding: 0 8px;
  }
}
