/*
 * Felhasznaloi profil oldal stilusai
 * - SĂ¶tĂ©t kĂˇrtyĂˇk vilĂˇgos hĂˇttĂ©ren
 * - Inline szerkesztĂ©s
 * - Avatar modal
 */

/* ===== ALAP LAYOUT, HĂTTĂ‰R ===== */

.user-profile-page {
  padding-top: 32px;
  padding-bottom: 72px;
  background: #f6f7f9;
}

.user-profile-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* ===== ALERT BOXOK ===== */

.user-profile-alert {
  border-radius: 999px;
  padding: 10px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.user-profile-alert-success {
  background: #dff7ea;
  color: #02321a;
  border: 1px solid rgba(0, 90, 50, 0.12);
}

.user-profile-alert-error {
  background: rgba(255, 90, 90, 0.12);
  color: #fed7d7;
  border: 1px solid rgba(255, 90, 90, 0.5);
}

.user-profile-alert.is-fading {
  opacity: 0;
  transform: translateY(-4px);
}

/* ===== FELSĹ PROFILKĂRTYA ===== */

.user-profile-card {
  width: 100%;
  margin: 0 0 24px 0;
  box-sizing: border-box;
  background:
    radial-gradient(circle at top left, rgba(77, 255, 199, 0.06), transparent 55%),
    radial-gradient(circle at top right, rgba(0, 122, 255, 0.12), transparent 60%),
    #050816;
  border-radius: 24px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 18px 45px rgba(3, 8, 16, 0.45),
    0 8px 20px rgba(255, 255, 255, 0.02) inset,
    0 -6px 30px rgba(255, 255, 255, 0.015) inset;
  position: relative;
  z-index: 1;
}

.user-profile-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.user-profile-avatar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.user-profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  padding: 3px;
  background: conic-gradient(from 180deg, #1dd1a1, #0abde3, #576574, #1dd1a1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.user-profile-avatar-actions {
  display: flex;
  justify-content: center;
}

.user-profile-avatar-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 20, 40, 0.9);
  color: #e2e8f0;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.08s ease, box-shadow 0.12s ease;
}

.user-profile-avatar-btn:hover {
  background: rgba(36, 99, 235, 0.8);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.user-profile-avatar-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.user-profile-main {
  flex: 1;
}

.user-profile-title {
  font-size: 24px;
  font-weight: 600;
  color: #f9fafb;
  margin: 4px 0 10px;
}

.user-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 14px;
  color: #cbd5f5;
}

.user-profile-meta-item {
  display: flex;
  gap: 6px;
}

.user-profile-meta-label {
  color: #9ca3af;
}

.user-profile-social-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-profile-social-link {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  text-decoration: none;
}

.user-profile-social-link:hover {
  border-color: rgba(56, 189, 248, 0.7);
}

.user-profile-intro-card {
  margin-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 16px;
}

.user-profile-subtitle {
  font-size: 16px;
  font-weight: 500;
  color: #e5e7eb;
  margin-bottom: 8px;
}

.user-profile-intro-text {
  font-size: 14px;
  color: #cbd5f5;
}

.user-profile-intro-empty {
  color: #6b7280;
}

/* ===== ALSĂ“ LAYOUT: SZERKESZTĂ‰S + AKTIVITĂS ===== */

.profile-page-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
}

/* Bal oldali kĂˇrtya: fix 380px kĂ¶rĂĽl */

.profile-data-block {
  flex: 0 0 380px;
  max-width: 380px;
  box-sizing: border-box;
  min-width: 0;
}

/* Jobb oszlop: kitĂ¶lti a maradĂ©kot */

.recent-posts-block {
  flex: 1 1 0;
  box-sizing: border-box;
  min-width: 0;
}

.recent-posts-block .user-profile-activity {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.user-profile-lists-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 0;
}

.user-profile-posts-full,
.user-profile-comments-full {
  width: 100%;
}

/* ===== INLINE PROFIL ADATOK (SZERKESZTĂ‰S BLOKK) ===== */

.user-profile-inline-section {
  margin-top: 0;
  background:
    radial-gradient(circle at top left, rgba(77, 255, 199, 0.04), transparent 55%),
    #050816;
  border-radius: 24px;
  padding: 22px 24px 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow:
    0 18px 45px rgba(3, 8, 16, 0.45),
    0 8px 20px rgba(255, 255, 255, 0.02) inset,
    0 -6px 30px rgba(255, 255, 255, 0.015) inset;
}

.user-profile-inline-title {
  font-size: 18px;
  font-weight: 500;
  color: #f9fafb;
  margin: 0 0 18px;
}

.user-profile-inline-form {
  margin: 0;
}

.upi-grid {
  display: grid;
  gap: 14px 28px;
}

/* csak egy oszlopos form a bal kĂˇrtyĂˇban */

.profile-data-block .upi-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.upi-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.upi-label {
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
}

.upi-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 10px;
  padding: 6px 12px 6px 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.upi-value-row:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

.upi-value-row-textarea {
  align-items: flex-start;
  border-radius: 16px;
}

.user-profile-page .user-profile-inline-section .upi-value-row input:not([type="file"]),
.user-profile-page .user-profile-inline-section .upi-value-row textarea,
.user-profile-page .profile-data-block input:not([type="file"]),
.user-profile-page .profile-data-block textarea {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  outline: none;
  background: rgba(255, 255, 255, 0.02);
  color: #e5e7eb;
  font-size: 13px;
  padding: 8px 10px;
  box-sizing: border-box;
}

/* belsĹ‘ input â€ždobozâ€ť eltĂĽntetĂ©se â€“ a sor hĂˇttĂ©rĂ©t hasznĂˇljuk */

.user-profile-page .upi-value-row input:not([type="file"]),
.user-profile-page .upi-value-row textarea {
  background: inherit;
  border: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

/* textarea minimĂˇlis belsĹ‘ padding a kurzor miatt */

.user-profile-page .upi-value-row textarea {
  padding: 6px 0;
}

/* data-role="input" â€“ mindig lapos, border nĂ©lkĂĽli */

.user-profile-page input[data-role="input"],
.user-profile-page textarea[data-role="input"],
.user-profile-page .upi-value-row input[data-role="input"],
.user-profile-page .upi-value-row textarea[data-role="input"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  color: inherit;
}

.user-profile-page .user-profile-inline-section .upi-value-row input::placeholder,
.user-profile-page .user-profile-inline-section .upi-value-row textarea::placeholder,
.user-profile-page .profile-data-block input::placeholder,
.user-profile-page .profile-data-block textarea::placeholder {
  color: #9ca3af;
  opacity: 0.9;
}

.user-profile-page .user-profile-inline-section .upi-value-row input:focus,
.user-profile-page .user-profile-inline-section .upi-value-row textarea:focus,
.user-profile-page .profile-data-block input:focus,
.user-profile-page .profile-data-block textarea:focus {
  border-color: #38bdf8;
  box-shadow: none;
  outline: none;
}

.upi-value-row:focus-within input,
.upi-value-row:focus-within textarea,
.profile-data-block:focus-within input,
.profile-data-block:focus-within textarea {
  border-color: transparent !important;
}

/* ===== SĂRGA EDIT IKON ===== */

.upi-edit-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  background: radial-gradient(circle at 30% 0%, #fde047, #f97316);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.5), 0 4px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.1s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.upi-edit-btn::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border-left: 2px solid #111827;
  border-bottom: 2px solid #111827;
  transform: skew(-20deg) rotate(-5deg);
}

.upi-edit-btn::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #111827;
}

.upi-edit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.7), 0 6px 16px rgba(0, 0, 0, 0.45);
}

.upi-edit-btn:active {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.8), 0 3px 8px rgba(0, 0, 0, 0.5);
}

/* section toggle (Alap adatok / KĂ¶zĂ¶ssĂ©gi mĂ©dia) */

.upi-section {
  border-radius: 14px;
  overflow: hidden;
}

.upi-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, rgba(8, 12, 28, 0.9), rgba(6, 8, 18, 0.9));
  border: none;
  cursor: pointer;
}

.upi-section-title {
  color: #f97316;
  font-weight: 700;
  font-size: 16px;
}

.upi-section-caret {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-right: 2px solid #f97316;
  border-bottom: 2px solid #f97316;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
}

.upi-section-toggle[aria-expanded="true"] .upi-section-caret {
  transform: rotate(45deg);
}

/* mentĂ©s gomb sĂˇv â€“ MOST ELREJTVE */

.user-profile-save-row {
  display: none;
}

/* mentĂ©s gomb â€“ most elrejtve, autosave van helyette */

.user-profile-save-btn {
  display: none;
}

/* section belsĹ‘ tartalom, stb. (a tĂ¶bbi vĂˇltozatlan) */

.user-profile-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.user-profile-save-btn {
  padding: 10px 26px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(180deg, #2d6df6 0%, #1e4fe0 100%);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(30, 80, 200, 0.32);
  transition: transform 0.09s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.user-profile-save-btn:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
}

.user-profile-save-btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.user-profile-save-btn:not(:disabled):active {
  transform: translateY(0);
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.4);
}

/* ===== AVATAR MODAL ===== */

.avatar-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.avatar-modal-backdrop[hidden] {
  display: none !important;
}

.avatar-modal-open {
  overflow: hidden;
}



.avatar-modal {
  max-width: 760px;
  width: 100%;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 60%),
    #020617;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.9);
  padding: 20px 22px 18px;
}

.avatar-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.avatar-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #f9fafb;
  margin: 0 0 4px;
}

.avatar-modal-subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin: 0;
}

.avatar-modal-close-btn {
  border: none;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #e5e7eb;
  font-size: 18px;
  cursor: pointer;
}

.avatar-modal-close-btn:hover {
  background: rgba(15, 23, 42, 0.8);
}

.avatar-modal-section {
  margin-bottom: 16px;
}

.avatar-modal-section-title {
  font-size: 14px;
  font-weight: 500;
  color: #e5e7eb;
  margin-bottom: 8px;
}

#hcj-avatar-file-input {
  display: block;
  margin-top: 6px;
}

.avatar-file-name {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 4px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 160px));
  justify-content: flex-start;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
}

.avatar-tile {
  position: relative;
  background: radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.25), rgba(15, 23, 42, 1));
  border-radius: 18px;
  padding: 10px 10px 9px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.avatar-tile-select {
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.avatar-tile-image {
  width: 100%;
  aspect-ratio: 1 / 1; /* Square thumbs */
  overflow: hidden;
  border-radius: 14px;
}

.avatar-tile-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.avatar-tile-meta {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

.avatar-tile-check {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #22c55e;
  color: #022c22;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.avatar-tile--selected .avatar-tile-check {
  opacity: 1;
  transform: scale(1);
}

.avatar-tile-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 15px;
  cursor: pointer;
}

.avatar-tile-delete:hover {
  background: rgba(239, 68, 68, 0.95);
}

.avatar-empty-state {
  font-size: 13px;
  color: #6b7280;
}

.avatar-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.user-profile-button {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
}

.avatar-modal-save-btn {
  padding: 8px 20px;
}

/* ===== LISTA KĂRTYĂK: BEJEGYZĂ‰SEK / KOMMENTEK ===== */

.user-profile-list-card {
  background: #020617;
  border-radius: 20px;
  padding: 16px 18px 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow:
    0 18px 40px rgba(3, 8, 16, 0.38),
    0 6px 18px rgba(255, 255, 255, 0.01) inset;
  width: 100%;
}

.user-profile-list-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.user-profile-list-title {
  font-size: 15px;
  font-weight: 500;
  color: #e5e7eb;
  margin: 0;
}

.user-profile-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #9ca3af;
}

.user-profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-profile-list-item {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(55, 65, 81, 0.6);
}

.user-profile-list-item:last-child {
  border-bottom: none;
}

.user-profile-list-item a {
  color: #e5e7eb;
  font-size: 14px;
  text-decoration: none;
}

.user-profile-list-item a:hover {
  text-decoration: underline;
}

.user-profile-list-meta {
  font-size: 12px;
  color: #9ca3af;
}

.user-profile-empty {
  font-size: 13px;
  color: #6b7280;
}


.upi-field-save-row,
.user-profile-save-row,
.user-profile-save-btn {
  display: none !important;
}


@media (max-width: 900px) {
  .user-profile-container {
    padding: 0 16px 48px;
  }

  .user-profile-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-page-wrapper {
    flex-direction: column;
  }

  .profile-data-block,
  .recent-posts-block {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .recent-posts-block .user-profile-activity {
    flex-direction: column;
  }

  .user-profile-card {
    padding: 18px 16px 18px;
  }

  .user-profile-title {
    font-size: 20px;
  }

  .user-profile-inline-section {
    padding: 18px 16px 16px;
  }
}
/* === FIX: BemutatkozĂˇs textarea szĂ¶vegszĂ­n === */
.user-profile-page .upi-value-row textarea,
.user-profile-page textarea[data-role="input"] {
    color: #e5e7eb !important;     /* jĂłl lĂˇthatĂł vilĂˇgos szĂ¶veg */
    caret-color: #e5e7eb;          /* kurzor is vilĂˇgos legyen */
}
/* === Custom sĂˇrga fĂˇjlfeltĂ¶ltĂ©s gomb === */

.hcj-file-upload-wrapper {
    position: relative;
    display: inline-block;
}

.hcj-file-upload-input {
    display: none !important; /* eredeti input elrejtĂ©se */
}

.hcj-file-upload-button {
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;

    background: linear-gradient(90deg, #facc15, #f97316);
    color: #111827;

    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.35);
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.hcj-file-upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(251, 191, 36, 0.45);
}

.hcj-file-upload-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(251, 191, 36, 0.3);
}

/* A kivĂˇlasztott fĂˇjl neve */
.hcj-file-upload-name {
  margin-top: 6px;
  font-size: 13px;
  color: #cbd5f5;
}

.hcj-upload-status {
  margin-top: 6px;
  font-size: 12px;
  color: #cbd5f5;
}

