/* ============================================================
   My Profile  —  mp-* namespace
   Scoped under .my_profile_wrapper
   Depends on: variables.css loaded first
   ============================================================ */

/* ── Page header ─────────────────────────────────────────── */

.my_profile_wrapper .mp-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: var(--clr-white);
  border: 1px solid rgba(205, 205, 205, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

/* inline-start accent bar */
.my_profile_wrapper .mp-page-header::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-navy);
  border-radius: 4px 0 0 4px;
}

[dir="rtl"] .my_profile_wrapper .mp-page-header::before {
  border-radius: 0 4px 4px 0;
}

.my_profile_wrapper .mp-page-header__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--grad-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.my_profile_wrapper .mp-page-header__text {
  flex: 1;
  min-width: 0;
}

.my_profile_wrapper .mp-page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--clr-navy-text);
  margin: 0 0 2px;
  line-height: 1.2;
}

.my_profile_wrapper .mp-page-subtitle {
  font-size: 12.5px;
  color: var(--clr-text-muted);
  margin: 0;
  font-weight: 500;
}

/* ── Avatar ────────────────────────────────────────────── */

.my_profile_wrapper .mp-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.my_profile_wrapper .mp-avatar-label {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  cursor: pointer;
  display: block;
}

.my_profile_wrapper .mp-avatar-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: contain;
  border: 3px solid var(--clr-border-mid);
  display: block;
}

.my_profile_wrapper .mp-avatar-fallback {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--clr-bg-input);
  border: 3px solid var(--clr-border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-muted);
}

.my_profile_wrapper .mp-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(15, 22, 48, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity var(--trans-fast);
}

.my_profile_wrapper .mp-avatar-label:hover .mp-avatar-overlay {
  opacity: 1;
}

/* ── Form grid ─────────────────────────────────────────── */

.my_profile_wrapper .mp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 24px;
}

@media (max-width: 640px) {
  .my_profile_wrapper .mp-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Form actions ──────────────────────────────────────── */

.my_profile_wrapper .mp-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

[dir="rtl"] .my_profile_wrapper .mp-form-actions {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.my_profile_wrapper .mp-save-btn {
  background: var(--grad-navy);
  color: var(--clr-white);
  border: none;
  padding: 11px 34px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity var(--trans-fast);
}

.my_profile_wrapper .mp-save-btn:hover {
  opacity: 0.88;
}

.my_profile_wrapper .mp-discard-btn {
  background: transparent;
  color: var(--clr-navy);
  border: 1.5px solid var(--clr-navy);
  padding: 10px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--trans-fast), color var(--trans-fast);
}

.my_profile_wrapper .mp-discard-btn:hover {
  background: var(--clr-navy);
  color: var(--clr-white);
}
