/**
 * VPM — User account page
 */

.vpm-account-hub {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.vpm-account-hub__intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.vpm-account-hub__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--vpm-ds-text, #fff);
}

.vpm-account-hub__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--vpm-ds-text-muted, rgba(255, 255, 255, 0.72));
}

.vpm-account-hub__profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.vpm-account-hub__avatar-wrap {
  position: relative;
}

.vpm-account-hub__avatar {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 9999px;
  object-fit: cover;
}

.vpm-account-hub__name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--vpm-ds-text, #fff);
}

.vpm-account-hub__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .vpm-account-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .vpm-account-hub__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.vpm-account-setting-card {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  width: 100%;
  min-height: 72px;
  padding: 8px 16px;
  border: 1px solid var(--vpm-ds-border, hsl(0 0% 20%));
  border-radius: 8px;
  background: var(--vpm-ds-surface, hsl(0 0% 9%));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  color: inherit;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.vpm-account-setting-card:hover {
  background: var(--vpm-ds-accent, rgba(255, 255, 255, 0.06));
  border-color: rgba(249, 115, 22, 0.35);
}

.vpm-account-setting-card:focus-visible {
  outline: 2px solid var(--vpm-primary, #f97316);
  outline-offset: 2px;
}

.vpm-account-setting-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--vpm-account-icon-bg, #525298);
}

.vpm-account-setting-card__icon .material-icons {
  font-size: 30px;
  width: 30px;
  height: 30px;
  color: #fff;
}

.vpm-account-setting-card__title {
  color: var(--vpm-primary, #f97316);
  font-weight: 500;
}

[data-theme='light'] .vpm-account-hub__title,
[data-theme='light'] .vpm-account-hub__name {
  color: #111;
}

[data-theme='light'] .vpm-account-hub__desc {
  color: #666;
}

[data-theme='light'] .vpm-account-setting-card {
  background: #fff;
  border-color: #e5e5e5;
}

[data-theme='light'] .vpm-account-setting-card:hover {
  background: #f8f8f8;
}

.vpm-push-notifications {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.vpm-push-notifications__intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.vpm-push-notifications__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--vpm-ds-text, #fff);
}

.vpm-push-notifications__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--vpm-ds-text-muted, rgba(255, 255, 255, 0.72));
}

.vpm-push-notifications__card-wrap {
  width: 100%;
  border: 1px solid var(--vpm-ds-border, hsl(0 0% 20%));
  border-radius: 12px;
  background: var(--vpm-ds-surface, hsl(0 0% 9%));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.vpm-push-notifications__card {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.vpm-push-notifications__note,
.vpm-push-notifications__status {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--vpm-ds-text-muted, rgba(255, 255, 255, 0.72));
}

.vpm-push-notifications__status {
  text-transform: capitalize;
}

.vpm-push-notifications__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.vpm-push-notifications__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vpm-push-notifications__label {
  padding: 0 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: var(--vpm-ds-text-muted, rgba(255, 255, 255, 0.72));
}

.vpm-push-notifications__select {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--vpm-ds-border, hsl(0 0% 20%));
  border-radius: 6px;
  background: transparent;
  color: var(--vpm-ds-text-muted, rgba(255, 255, 255, 0.72));
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.vpm-push-notifications__select:focus {
  outline: 2px solid var(--vpm-primary, #f97316);
  outline-offset: 2px;
}

.vpm-push-notifications__select--error {
  border-color: #ef4444;
}

.vpm-push-notifications__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: var(--vpm-primary, #f97316);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: background-color 200ms ease;
}

.vpm-push-notifications__submit:hover {
  background: #ea580c;
}

[data-theme='light'] .vpm-push-notifications__title {
  color: #111;
}

[data-theme='light'] .vpm-push-notifications__desc,
[data-theme='light'] .vpm-push-notifications__note,
[data-theme='light'] .vpm-push-notifications__status,
[data-theme='light'] .vpm-push-notifications__label {
  color: #666;
}

[data-theme='light'] .vpm-push-notifications__card-wrap {
  background: #fff;
  border-color: #e5e7eb;
}

[data-theme='light'] .vpm-push-notifications__select {
  color: #333;
  border-color: #e5e7eb;
  background-color: #fff;
}

.vpm-account-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--vpm-space-2);
  padding-bottom: var(--vpm-space-2);
  border-bottom: 1px solid var(--vpm-border);
}

.vpm-account-nav a {
  padding: 8px 14px;
  font-size: var(--vpm-text-sm);
  font-weight: var(--vpm-weight-medium);
  color: var(--vpm-text-muted);
  text-decoration: none;
  border-radius: var(--vpm-radius-md);
  border: 1px solid transparent;
  transition: color var(--vpm-duration) var(--vpm-ease-out),
    background var(--vpm-duration) var(--vpm-ease-out),
    border-color var(--vpm-duration) var(--vpm-ease-out);
}

.vpm-account-nav a:hover {
  color: var(--vpm-text);
  background: var(--vpm-surface-elevated);
  border-color: var(--vpm-border);
}

.vpm-account-sections {
  display: flex;
  flex-direction: column;
  gap: var(--vpm-space-2);
  max-width: 720px;
}

.vpm-account-section {
  scroll-margin-top: calc(var(--vpm-topnav-h, 56px) + 16px);
}

.vpm-account-form__grid {
  display: grid;
  gap: var(--vpm-space-2);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .vpm-account-form__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .vpm-account-form__full {
    grid-column: 1 / -1;
  }
}

.vpm-account-photo {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--vpm-space-2);
}

.vpm-account-photo__preview {
  flex-shrink: 0;
}

.vpm-account-photo__img {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--vpm-border);
}

.vpm-avatar--lg {
  width: 80px;
  height: 80px;
  font-size: 24px;
}

.vpm-account-photo__actions {
  flex: 1;
  min-width: 220px;
}

.vpm-account-meta {
  margin: 0 0 12px;
  font-size: var(--vpm-text-sm);
  color: var(--vpm-text-muted);
}

.vpm-account-meta--pending {
  padding: 10px 12px;
  border-radius: var(--vpm-radius-md);
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  color: var(--vpm-text);
}

.vpm-verification-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vpm-verification-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--vpm-border);
  border-radius: var(--vpm-radius-lg);
  background: var(--vpm-surface-elevated);
}

.vpm-verification-item__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vpm-notification-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vpm-notification-toggle {
  padding: 12px 14px;
  border: 1px solid var(--vpm-border);
  border-radius: var(--vpm-radius-md);
  background: var(--vpm-surface-elevated);
}

.vpm-notification-toggle strong {
  display: block;
  font-weight: var(--vpm-weight-medium);
}

.vpm-field--checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.vpm-field--checkbox input[type='checkbox'] {
  margin-top: 4px;
  accent-color: var(--vpm-cta);
}

.vpm-avatar--link {
  text-decoration: none;
  overflow: hidden;
}

.vpm-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
