/* الملف العام — نفس لغة dash-pro (لوحة البائع) */

.seller-profile-page .seller-profile-canvas {
  margin: 0;
}

.seller-profile-pagehead {
  margin-bottom: calc(var(--dash-gap) + 4px);
}

.seller-profile-dual {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: var(--dash-gap);
  align-items: start;
}

.seller-profile-avatar-panel {
  padding-bottom: 18px;
}

.seller-profile-form-panel {
  min-width: 0;
  flex: 1;
  padding-bottom: 18px;
}

.seller-profile-avatar-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 14px;
  margin-top: 4px;
}

.seller-profile-avatar-caption {
  margin: 0;
  align-self: center;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--s-muted);
  letter-spacing: 0.02em;
}

/* معاينة الصورة */
.avatar-preview {
  box-sizing: border-box;
  align-self: center;
  width: 176px;
  height: 176px;
  max-width: 100%;
  border-radius: var(--dash-kpi-radius, 24px);
  border: 1px dashed var(--dash-line);
  background: var(--dash-soft);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.avatar-preview:focus-within,
.seller-profile-avatar-panel:focus-within .avatar-preview {
  border-color: rgba(63, 63, 70, 0.32);
}

.avatar-preview.has-image {
  border-style: solid;
  border-color: var(--dash-line);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.avatar-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: none;
}

.avatar-preview.has-image img {
  display: block;
}

.avatar-drop {
  position: relative;
  width: 100%;
  align-self: stretch;
  border-radius: var(--dash-kpi-radius, 24px);
  border: 1px dashed var(--dash-line);
  background: var(--dash-soft);
  min-height: 102px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.avatar-drop:hover {
  border-color: #a1a1aa;
  background: #f4f4f5;
}

.avatar-drop.is-dragover {
  border-color: var(--s-chart-line, #3f3f46);
  background: #fafafa;
  box-shadow: 0 0 0 3px rgba(63, 63, 70, 0.1);
}

.avatar-drop__surface {
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px 16px;
  min-height: 102px;
  box-sizing: border-box;
}

.avatar-drop__title {
  font-size: 0.84rem;
  font-weight: 750;
  color: var(--s-text);
  letter-spacing: -0.02em;
  line-height: 1.45;
}

.avatar-drop__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
  z-index: 1;
}

.avatar-drop__input:focus {
  outline: none;
}

.avatar-drop:focus-within {
  border-color: var(--s-chart-line, #3f3f46);
  box-shadow: 0 0 0 3px rgba(63, 63, 70, 0.08);
}

/* النموذج */
.seller-profile-form {
  display: flex;
  flex-direction: column;
  gap: var(--dash-gap);
  margin-top: 2px;
}

.seller-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  align-items: start;
}

.seller-profile-fields > .form-group {
  min-width: 0;
}

.seller-profile-fields > .form-group:first-child {
  grid-column: 1 / -1;
}

.seller-profile-form-panel .form-group label {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--s-text);
}

.seller-profile-label-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  min-height: 1.55rem;
  justify-content: flex-start;
  box-sizing: border-box;
}

.seller-profile-label-row label {
  margin: 0;
  line-height: 1.55rem;
  display: inline-flex;
  align-items: center;
}

.seller-profile-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.seller-profile-help__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid var(--dash-line);
  border-radius: 50%;
  background: var(--dash-soft);
  color: var(--s-muted);
  line-height: 0;
  cursor: help;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.seller-profile-help__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.875rem;
  height: 0.875rem;
  margin: 0;
  display: block;
  flex-shrink: 0;
  overflow: visible;
  transform: translate(-50%, -50%);
}

.seller-profile-help__btn:hover,
.seller-profile-help__btn:focus-visible {
  border-color: var(--dash-line-dark);
  background: #f4f4f5;
  color: var(--s-text);
  outline: none;
}

.seller-profile-help__btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.12);
}

.seller-profile-help__pop {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 11.5rem;
  max-width: min(20rem, 70vw);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--dash-line);
  background: var(--dash-paper);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--s-text);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, visibility 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

.seller-profile-help:hover .seller-profile-help__pop,
.seller-profile-help:focus-within .seller-profile-help__pop,
.seller-profile-help--open .seller-profile-help__pop {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .seller-profile-help__pop {
    transition: none;
    transform: none;
  }

  .seller-profile-help:hover .seller-profile-help__pop,
  .seller-profile-help:focus-within .seller-profile-help__pop,
  .seller-profile-help--open .seller-profile-help__pop {
    transform: none;
  }
}

.seller-profile-form-panel .form-control {
  border-radius: 14px;
  border-color: var(--dash-line);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.seller-profile-form-panel .form-group textarea.form-control {
  min-height: 140px;
  line-height: 1.55;
  resize: vertical;
  max-height: min(48vh, 320px);
  overflow-y: auto;
}

.seller-profile-form-panel .form-control:focus {
  border-color: var(--dash-line-dark);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.09);
  outline: none;
}

.form-hint {
  font-size: 0.74rem;
  color: var(--s-muted);
  line-height: 1.45;
}

.seller-profile-actions.form-actions {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--dash-line);
  display: flex;
  justify-content: stretch;
}

.seller-profile-actions .seller-profile-submit {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.seller-profile-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding-inline: 22px;
  border-radius: 14px;
  font-weight: 700;
}

.seller-profile-submit__spinner {
  display: none;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -10px 0 0 -10px;
  animation: seller-profile-submit-spin 0.65s linear infinite;
}

.seller-profile-submit.is-loading .seller-profile-submit__spinner {
  display: block;
}

.seller-profile-submit.is-loading .seller-profile-submit__text {
  opacity: 0;
}

.seller-profile-submit.is-loading {
  cursor: wait;
  pointer-events: none;
}

@keyframes seller-profile-submit-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .seller-profile-submit__spinner {
    animation: none;
    border-color: rgba(255, 255, 255, 0.55);
    border-top-color: transparent;
  }
}

.seller-profile-message.form-message,
.form-message.seller-profile-message {
  padding: 11px 14px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.84rem;
  display: none;
  margin: 0;
  border: 1px solid var(--dash-line);
  background: var(--dash-soft);
  color: var(--s-text);
}

.form-message.is-visible {
  display: block;
}

.form-message.success {
  border-color: var(--s-chart-line, #3f3f46);
  background: #fafafa;
}

.form-message.error {
  border-style: dashed;
  color: var(--s-muted);
}

@media (max-width: 900px) {
  .seller-profile-dual {
    grid-template-columns: 1fr;
    gap: var(--dash-gap);
  }

  .seller-profile-avatar-body {
    flex-direction: column;
  }

  .seller-profile-form-panel .form-group textarea.form-control {
    max-height: min(52vh, 360px);
  }
}

@media (max-width: 720px) {
  .seller-profile-fields {
    grid-template-columns: 1fr;
  }

  .seller-profile-avatar-body {
    align-items: stretch;
  }

  .avatar-preview {
    width: 152px;
    height: 152px;
  }
}
