/* Profile page styles (edit profile + profile photo gallery). */
.profile-wrap {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.profile-wrap:has(.profile-v2-card) {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 80px;
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
}
.profile-v2-card {
  width: 100%;
  max-width: 760px;
  margin: 4px auto 0;
  background: #fff;
  border: 1px solid rgba(18, 22, 33, 0.08);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 48px rgba(31, 35, 54, 0.07);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.profile-v2-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}
.profile-v2-avatar {
  width: 112px;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff5f8, #f4faf7);
  color: #1f2937;
  border: 1px solid rgba(22, 24, 35, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  font-size: 42px;
  font-weight: 800;
}
.profile-v2-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-v2-heading { min-width: 0; }
.profile-v2-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #ff2d6f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.profile-v2-title {
  font-size: 34px;
  line-height: 1.08;
  color: #171820;
  margin: 0 0 10px;
  font-weight: 850;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.profile-v2-sub {
  position: relative;
  color: #6a6f7c;
  line-height: 1.55;
  font-size: 14px;
  margin: 0;
  padding-left: 30px;
  max-width: 36ch;
}
.profile-v2-sub::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #ff4f82;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.profile-v2-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid #eceef4;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.profile-v2-name-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  align-items: end;
}
.profile-v2-details .pa-link-block {
  padding-top: 16px;
  border-top: 1px solid rgba(22, 24, 35, 0.08);
}
.profile-v2-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.profile-v2-btn {
  flex: 1;
  min-height: 56px;
  border: 1px dashed rgba(255, 45, 111, 0.42);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
.profile-v2-btn:disabled { opacity: 0.6; cursor: default; }
.profile-v2-btn.is-disabled { opacity: 0.6; cursor: default; pointer-events: none; }
.profile-v2-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}
.profile-v2-btn-primary {
  background: #fff;
  color: #ff2d6f;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.profile-v2-btn-primary::before {
  content: '';
  width: 20px;
  height: 20px;
  margin-right: 8px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3Cpath d='M20 16.5A4.5 4.5 0 0 1 15.5 21h-7A4.5 4.5 0 0 1 4 16.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3Cpath d='M20 16.5A4.5 4.5 0 0 1 15.5 21h-7A4.5 4.5 0 0 1 4 16.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.profile-v2-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #fff7fa;
  box-shadow: 0 12px 24px rgba(255, 45, 111, 0.12);
}
.profile-v2-btn-secondary {
  background: #fff;
  border: 1px solid #e6e8ef;
  color: #363945;
}
.profile-v2-btn-secondary:hover:not(:disabled) { background: #f8f8fb; }

.profile-v2-empty {
  color: #6a6f7c;
  font-size: 14px;
  text-align: center;
  padding: 30px 12px;
  margin: 0 0 22px;
  border: 1px dashed #dfe3ec;
  border-radius: 8px;
  background: #fafbfd;
}

.profile-v2-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.profile-v2-photo {
  position: relative;
  min-height: 220px;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  border: 1px solid rgba(22, 24, 35, 0.10);
  background: #eef0f5;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.profile-v2-photo.uploading {
  cursor: default;
  pointer-events: none;
}
.profile-v2-photo.uploading img { filter: saturate(0.92); }
.profile-v2-photo:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(31, 35, 54, 0.14);
}
.profile-v2-photo:disabled { cursor: default; }
.profile-v2-photo.primary {
  border-color: #ff2d6f;
  box-shadow: 0 0 0 3px rgba(255, 45, 111, 0.12), 0 14px 26px rgba(255, 45, 111, 0.14);
  cursor: default;
}
.profile-v2-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-v2-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(8, 10, 18, 0.68), rgba(8, 10, 18, 0.08) 58%, transparent);
}
.profile-v2-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff;
  color: #ff2d6f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 7px 10px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.10);
}
.profile-v2-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  background: rgba(17, 19, 29, 0.62);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}
.profile-v2-remove:hover { background: #ff2d6f; transform: scale(1.05); }
.profile-v2-footer {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  color: #fff;
  z-index: 2;
  pointer-events: none;
  gap: 6px;
}
.profile-v2-name { font-size: 14px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.profile-v2-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(17, 19, 29, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  pointer-events: auto;
  cursor: pointer;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.profile-v2-pill:disabled { cursor: default; opacity: 0.85; }
.profile-v2-pill:hover:not(:disabled) { background: rgba(0, 0, 0, 0.70); }
.profile-v2-pill.active {
  background: rgba(255, 45, 111, 0.92);
  border-color: rgba(255, 255, 255, 0.4);
}
.profile-v2-cat-select {
  font-size: 11px;
  font-weight: 600;
  padding: 7px 28px 7px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='white' d='M0 0l5 6 5-6z'/></svg>") no-repeat right 10px center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  pointer-events: auto;
  cursor: pointer;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  text-overflow: ellipsis;
}
.profile-v2-cat-select option { color: #111; background: #fff; }
.profile-v2-spinner {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.profile-v2-spinner-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: profile-v2-spin 0.8s linear infinite;
}
@keyframes profile-v2-spin {
  to { transform: rotate(360deg); }
}
.profile-v2-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 48px 16px;
  border-radius: 8px;
  background: #fafbfd;
  border: 1px dashed #dfe3ec;
  margin: 18px 0;
}
.profile-v2-loading .profile-v2-spinner-ring {
  width: 36px;
  height: 36px;
  border-color: rgba(255, 45, 111, 0.16);
  border-top-color: #ff2d6f;
}
.profile-v2-loading-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: #747987;
}
.profile-v2-uploading-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 4;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17, 17, 23, 0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.profile-v2-input { margin-bottom: 0; }
.profile-v2-input label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #5f6472;
  letter-spacing: 0;
}
.profile-v2-input input {
  width: 100%;
  height: 52px;
  border-radius: 8px;
  border: 1px solid #dfe3ec;
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
.profile-v2-input input:focus {
  border-color: #ff2d6f;
  box-shadow: 0 0 0 5px rgba(255, 45, 111, 0.1);
}

.profile-v2-save {
  min-height: 52px;
  border: 1px solid #171820;
  border-radius: 8px;
  background: #171820;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.2s ease, background 0.2s ease;
  font-family: inherit;
}
.profile-v2-save:hover:not(:disabled) { transform: translateY(-2px); background: #2b2f3a; }
.profile-v2-save:disabled { opacity: 0.7; cursor: default; }
.profile-v2-cancel {
  width: 120px;
  height: 56px;
  border: none;
  border-radius: 8px;
  background: #f3f4f8;
  color: #555;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.profile-v2-cancel:hover:not(:disabled) { background: #e9eaf0; }
.profile-v2-cancel:disabled { opacity: 0.6; cursor: default; }

@media (max-width: 520px) {
  .profile-wrap:has(.profile-v2-card) { padding-left: 0; padding-right: 0; }
  .profile-v2-card { border-left: 0; border-right: 0; border-radius: 0; padding: 18px 16px 28px; box-shadow: none; }
  .profile-v2-hero { grid-template-columns: 78px minmax(0, 1fr); gap: 14px; }
  .profile-v2-avatar { width: 78px; font-size: 30px; }
  .profile-v2-title { font-size: 28px; }
  .profile-v2-sub { padding-left: 26px; }
  .profile-v2-sub::before { width: 18px; height: 18px; font-size: 11px; }
  .profile-v2-details { padding: 14px; }
  .profile-v2-name-edit { grid-template-columns: 1fr; gap: 10px; }
  .profile-v2-actions { flex-direction: column; }
  .profile-v2-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .profile-v2-photo { min-height: 172px; }
  .profile-v2-cancel { width: 100%; }
}
