.subscription-policy-backdrop {
  position: fixed;
  z-index: 2147483647;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(1, 5, 12, 0.84);
}

.subscription-policy-backdrop[hidden] {
  display: none !important;
}

.subscription-policy-panel {
  width: min(620px, 100%);
  max-height: min(88dvh, 780px);
  overflow: auto;
  border: 1px solid #3d5875;
  border-radius: 18px;
  background: #0e1827;
  color: #f4f7fb;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}

.subscription-policy-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(128, 155, 185, 0.2);
}

.subscription-policy-eyebrow {
  margin: 0 0 6px;
  color: #39c5ff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 1.1px;
}

.subscription-policy-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.subscription-policy-close {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #33435a;
  border-radius: 11px;
  background: #172338;
  color: #f4f7fb;
  cursor: pointer;
  font: inherit;
  font-size: 23px;
}

.subscription-policy-close:hover:not(:disabled) {
  border-color: #71839c;
  background: #26384e;
  color: #ffffff;
}

.subscription-policy-close:active:not(:disabled) {
  background: #1c2d43;
  color: #ffffff;
}

.subscription-policy-close:focus-visible {
  outline: 2px solid #39c5ff;
  outline-offset: 3px;
}

.subscription-policy-close:disabled {
  border-color: #647184;
  background: #343f4e;
  color: #d1d9e3;
  cursor: not-allowed;
}

.subscription-policy-content {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.subscription-policy-content section {
  display: grid;
  gap: 5px;
}

.subscription-policy-content h3 {
  margin: 0;
  font-size: 13px;
}

.subscription-policy-content p {
  margin: 0;
  color: #b8c4d3;
  font-size: 12px;
  line-height: 1.65;
}

.premium-policy-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9fddff;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
}

.premium-policy-link:hover:not(:disabled),
.premium-policy-link:focus-visible {
  color: #c9f1ff;
}

.premium-policy-link:active:not(:disabled) {
  color: #71d9ff;
}

.premium-policy-link:focus-visible {
  outline: 2px solid #39c5ff;
  outline-offset: 3px;
}

.premium-policy-link:disabled {
  color: #74879a;
  cursor: not-allowed;
}

.premium-policy-agreement {
  margin: 4px 0 12px;
  color: #aeb8c8;
  font-size: 10px;
  line-height: 1.5;
}

#profilePanel {
  isolation: isolate;
}

#profilePanel > .profile-panel-background-video {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

#profilePanel[data-has-profile-background-video="true"] > .profile-panel-background-video {
  display: block;
}

#profilePanel::before {
  z-index: 1;
}

/* Keep uploaded background video visible behind profile details. */
#profilePanel[data-has-profile-background-video="true"] > .profile-panel-background-video,
.profile-edit-preview-card.profile-panel[data-has-profile-background-video="true"]
  > .profile-panel-background-video {
  filter: brightness(0.72) saturate(0.9);
  transform: scale(1.03);
  transform-origin: center;
}

/* Hide the fallback R whenever a profile background video is active. */
#profilePanel[data-has-profile-background-video="true"]::after,
.profile-edit-preview-card.profile-panel[data-has-profile-background-video="true"]::after {
  content: none !important;
  display: none !important;
}

#profilePanel > .profile-close {
  z-index: 3;
}

#profilePanel > .profile-panel-inner {
  position: relative;
  z-index: 2;
}

.profile-background-video-preview {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(91, 177, 221, 0.28);
  border-radius: 10px;
  background: rgba(5, 15, 27, 0.68);
}

.profile-background-video-preview[hidden],
.profile-background-video-actions[hidden],
.profile-background-video-help[hidden] {
  display: none !important;
}

.profile-background-video-preview video {
  display: block;
  width: 100%;
  max-height: 190px;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  background: #070d16;
  object-fit: cover;
}

.profile-background-video-preview video[hidden] {
  display: none !important;
}

.profile-background-video-preview span {
  color: #d5e1ed;
  font-size: 10px;
  line-height: 1.4;
}

.profile-background-video-preview span[data-state="error"] {
  color: #ffb8c9;
}

.profile-background-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-background-video-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(105, 140, 177, 0.38);
  border-radius: 9px;
  background: rgba(19, 35, 54, 0.92);
  color: #eaf2fb;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.profile-background-video-actions button:hover {
  border-color: #39c5ff;
}

.profile-background-video-actions button:active:not(:disabled) {
  background: rgba(35, 52, 73, 0.96);
  color: #ffffff;
}

.profile-background-video-actions button:focus-visible {
  outline: 2px solid #39c5ff;
  outline-offset: 3px;
}

.profile-background-video-actions button:disabled {
  border-color: #647184;
  background: #343f4e;
  color: #d1d9e3;
  cursor: not-allowed;
  opacity: 1;
}

.profile-background-video-actions .profile-background-remove-button {
  background: rgba(64, 30, 36, 0.92);
  color: #ffd8dc;
}

.profile-background-video-actions .profile-background-remove-button:disabled {
  background: #3b3035;
  color: #d7c2c6;
}

.profile-background-video-help {
  margin: 0;
  color: #aeb8c8;
  font-size: 10px;
  line-height: 1.55;
}

.profile-background-field[data-active-preview-kind="video"]
  #profileBackgroundUploadPreview,
.profile-background-field[data-active-preview-kind="video"]
  #removeProfileBackgroundButton {
  display: none !important;
}

#profileBackgroundVideoPreview[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .subscription-policy-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .subscription-policy-panel {
    max-height: 92dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
  }

  .subscription-policy-heading,
  .subscription-policy-content {
    padding-right: 15px;
    padding-left: 15px;
  }
}