/* ============================================================
   profile.css — My Profile Page Styles
   Dr. Jaspal Singh Website — jaspalsingh.in
   ============================================================ */

/* ── Hero strip ─────────────────────────────────────────────── */

.profile-hero {
  background: linear-gradient(135deg, #1A1A2E 0%, #16213E 55%, #0c2d58 100%);
  padding: calc(var(--header-h, 72px) + 40px) 0 44px;
  box-shadow: 0 4px 32px rgba(26,26,46,0.18);
}

.profile-hero-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  flex-shrink: 0;
}

.profile-avatar-icon {
  font-size: 76px;
  color: var(--magenta, #C81240);
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(200,18,64,0.4));
}

.profile-name {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
}

.profile-meta-line {
  font-size: 15px;
  color: rgba(255,255,255,0.78);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-logout-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 50px;
  background: rgba(255,255,255,0.10) !important;
  border: 1.5px solid rgba(255,255,255,0.45) !important;
  color: #fff !important;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  box-shadow: none !important;
}
.profile-logout-btn:hover {
  background: #fff !important;
  border-color: #fff !important;
  color: #C81240 !important;
}

/* ── Body layout ─────────────────────────────────────────────── */

.profile-body {
  padding: 40px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 820px;
  margin: 0 auto;
}

/* ── Card ────────────────────────────────────────────────────── */

.profile-card {
  background: #ffffff;
  border: 1.5px solid rgba(26,26,46,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(26,26,46,0.06);
}

.profile-card-header {
  padding: 20px 28px;
  border-bottom: 1.5px solid rgba(26,26,46,0.07);
}

.profile-card-header h2 {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 18px;
  font-weight: 800;
  color: #1A1A2E;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-card-header h2 i {
  color: var(--magenta, #C81240);
}

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

.profile-form {
  padding: 28px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .profile-form-grid { grid-template-columns: 1fr; }
  .pf-field--full   { grid-column: 1; }
}

.pf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pf-field--full {
  grid-column: 1 / -1;
}

.pf-field label {
  font-size: 13px;
  font-weight: 700;
  color: #1A1A2E;
  letter-spacing: 0.02em;
}

.pf-required {
  color: var(--magenta, #C81240);
}

.pf-optional {
  font-weight: 400;
  opacity: 0.6;
  font-size: 12px;
}

.pf-field input,
.pf-field select {
  background: #ffffff;
  border: 1.5px solid rgba(26,26,46,0.14);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  color: #1A1A2E;
  font-family: inherit;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.pf-field input::placeholder { color: #9999b0; }

.pf-field input:focus,
.pf-field select:focus {
  outline: none;
  border-color: var(--magenta, #C81240);
}

.pf-field input:disabled {
  background: #f4f4f8;
  color: #8888a0;
  cursor: not-allowed;
}

.pf-field select option {
  background: #ffffff;
  color: #1A1A2E;
}

.pf-hint {
  font-size: 11px;
  color: #9999b0;
}

.profile-form-actions {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
}

/* ── Form message ────────────────────────────────────────────── */

.profile-msg {
  margin: 0 28px 4px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.profile-msg--success {
  background: rgba(16,185,129,0.15);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.3);
}

.profile-msg--error {
  background: rgba(200,18,64,0.12);
  color: var(--magenta, #C81240);
  border: 1px solid rgba(200,18,64,0.25);
}

/* ── Download table ──────────────────────────────────────────── */

.dl-table-wrap {
  overflow-x: auto;
  padding: 4px 0;
}

.dl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.dl-table th,
.dl-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(26,26,46,0.07);
  color: #4A4A68;
}

.dl-table th {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9999b0;
}

.dl-table tr:last-child td { border-bottom: none; }

.dl-title {
  font-weight: 700;
  color: #1A1A2E;
  display: block;
  margin-bottom: 3px;
}

.dl-sub {
  font-size: 12px;
  color: #9999b0;
}

.dl-date {
  white-space: nowrap;
  font-size: 13px;
  color: #4A4A68;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ── Empty / skeleton states ─────────────────────────────────── */

.profile-empty {
  text-align: center;
  padding: 40px 20px;
  color: #9999b0;
  font-size: 15px;
  line-height: 1.8;
}

.profile-empty a {
  color: var(--magenta, #C81240);
  text-decoration: none;
}

.profile-skeleton-list {
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pskel {
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.pskel:nth-child(2) { width: 75%; }
.pskel:nth-child(3) { width: 55%; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Guard page ──────────────────────────────────────────────── */

.profile-guard {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Learner header UI (My Profile link) ─────────────────────── */

.learner-header-ui {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 6px;
  padding-left: 10px;
  border-left: 1px solid rgba(26,26,46,0.12);
}

.learner-greeting {
  font-size: 13px;
  font-weight: 600;
  color: var(--heading-color, #1A1A2E);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.learner-greeting i {
  color: var(--magenta, #C81240);
  font-size: 16px;
}

.learner-profile-link {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  padding: 6px 14px;
  background: var(--gradient, linear-gradient(135deg,#C81240,#A60F35));
  border-radius: 20px;
  transition: box-shadow 0.2s, transform 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(200,18,64,0.28);
}

.learner-profile-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(200,18,64,0.4);
  color: #fff;
}

.learner-logout {
  font-size: 12px;
  font-weight: 600;
  color: var(--body-color, #4A4A68);
  background: none;
  border: 1px solid rgba(26,26,46,0.15);
  border-radius: 16px;
  cursor: pointer;
  padding: 5px 11px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.learner-logout:hover {
  background: rgba(200,18,64,0.07);
  border-color: rgba(200,18,64,0.3);
  color: var(--magenta, #C81240);
}

/* ── Avatar with photo upload ───────────────────────────────── */
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar-circle {
  width: 88px; height: 88px; border-radius: 50%;
  background: linear-gradient(135deg, #C81240, #9B1230);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading, sans-serif);
  font-size: 28px; font-weight: 800; color: #fff;
  overflow: hidden; border: 3px solid rgba(255,255,255,.2);
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.profile-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; color: #1A1A2E;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  border: 2px solid rgba(26,26,46,.1);
  transition: background .15s;
}
.profile-avatar-edit:hover { background: #f0f0f6; }

/* ── Enrolled programs ───────────────────────────────────────── */
.enrolled-grid { display: flex; flex-direction: column; gap: 12px; }
.enrolled-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px; border: 1.5px solid rgba(26,26,46,.07);
  border-radius: 12px; background: #fafafa;
  transition: box-shadow .2s;
}
.enrolled-card:hover { box-shadow: 0 4px 16px rgba(26,26,46,.1); }
.enrolled-thumb {
  width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: rgba(255,255,255,.9);
}
.enrolled-info { flex: 1; }
.enrolled-name { font-family: var(--font-heading, sans-serif); font-size: 14px; font-weight: 700; color: #1A1A2E; margin-bottom: 6px; }
.enrolled-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.enrolled-status--paid { font-size: 11px; font-weight: 700; color: #15803d; background: rgba(22,163,74,.10); padding: 3px 10px; border-radius: 20px; }
.enrolled-date, .enrolled-amount { font-size: 12px; color: #9999b0; }
.enrolled-link { font-size: 12px; font-weight: 700; color: #C81240; text-decoration: none; }
.enrolled-link:hover { text-decoration: underline; }
