/**
 * WebTicaret.tr - Public Profile & Profile Edit CSS
 * Matches WebTicaret Light Clean Brand System
 */

.profile-page-wrapper {
  background-color: #F8FAFC;
  min-height: calc(100vh - 280px);
  padding-bottom: 60px;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #0F172A;
  overflow-x: hidden;
}

/* Cover & Hero Section */
.profile-hero {
  position: relative;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  margin-bottom: 32px;
}

.profile-cover {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #102A4C 0%, #1E3A8A 50%, #FF6B0B 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}

.profile-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.25));
}

.profile-hero-content {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px 20px;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

@media (max-width: 768px) {
  .profile-hero-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 16px 16px;
    gap: 16px;
  }
}

.profile-user-summary {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex: 1;
}

@media (max-width: 500px) {
  .profile-user-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

.profile-avatar-wrapper {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid #FFFFFF;
  box-shadow: 0 4px 16px rgba(11, 25, 44, 0.12);
  background: #F1F5F9;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  margin-top: -55px;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 800;
  color: #FFFFFF;
  background: linear-gradient(135deg, #FF6B0B, #102A4C);
}

.profile-identity {
  padding-top: 8px;
}

.profile-actions {
  padding-top: 12px;
  flex-shrink: 0;
}

.profile-name {
  font-size: 24px;
  font-weight: 800;
  color: #0B192C;
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-username {
  font-size: 14px;
  color: #64748B;
  font-weight: 500;
  margin: 0 0 10px;
}

.profile-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* 1. Role Chip (Neutral, distinct) */
.profile-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: #F1F5F9;
  color: #475569;
}

.profile-role-chip--admin {
  background: #FEE2E2;
  color: #991B1B;
}

.profile-role-chip--mod {
  background: #E0E7FF;
  color: #3730A3;
}

.profile-role-chip--member {
  background: #F1F5F9;
  color: #475569;
}

/* 2. Membership Rank Badge: Pure Transparent Image (NO background, NO border, NO container!) */
.profile-rank-badge-img {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  vertical-align: middle;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.profile-rank-badge-img:hover {
  transform: translateY(-2px) scale(1.06);
}

/* Rank Text Fallback (When badge image does not exist) */
.profile-rank-text-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1.5px solid var(--rank-color, #3B82F6);
  color: #0F172A;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.profile-rank-text-chip__tiko {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* 3. Trade Score Chip */
.profile-trade-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F0FDF4;
  border: 1px solid #DCFCE7;
  color: #166534;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.profile-trade-chip__score {
  font-weight: 800;
}

.profile-trade-chip__score--pos {
  color: #059669;
}

.profile-trade-chip__score--neg {
  color: #DC2626;
}

/* 4. Supporter Badges: Strictly Unique, Pure Transparent Images */
.profile-supporter-badges {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-supporter-badge-img {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  vertical-align: middle;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.profile-supporter-badge-img:hover {
  transform: translateY(-2px) scale(1.06);
}

.profile-supporter-text-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFF7ED;
  border: 1px solid #FFEDD5;
  color: #C2410C;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

.profile-supporter-text-chip .profile-tiko-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.profile-actions {
  padding-bottom: 4px;
}

/* Grid Layout */
.profile-grid {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 28px;
  align-items: start;
}

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

/* Profile Sidebar Cards */
.profile-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(11, 25, 44, 0.04);
}

.profile-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #0B192C;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-bio-text {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.6;
  margin: 0;
}

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

.profile-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #475569;
}

.profile-info-icon {
  width: 16px;
  height: 16px;
  color: #94A3B8;
  flex-shrink: 0;
}

.profile-info-link {
  color: #FF6B0B;
  text-decoration: none;
  font-weight: 500;
  word-break: break-all;
}

.profile-info-link:hover {
  text-decoration: underline;
}

/* Trade Stats Summary Box */
.trade-stats-box {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  text-align: center;
  margin-top: 12px;
}

.trade-stat-item {
  padding: 10px 6px;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.trade-stat-num {
  font-size: 16px;
  font-weight: 800;
}

.trade-stat-num--pos { color: #10B981; }
.trade-stat-num--neu { color: #64748B; }
.trade-stat-num--neg { color: #EF4444; }

.trade-stat-label {
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
}

/* Main Content Tabs */
.profile-content-tabs {
  display: flex;
  border-bottom: 2px solid #E2E8F0;
  gap: 16px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.profile-content-tabs::-webkit-scrollbar {
  display: none;
}

.profile-content-tab {
  padding: 10px 4px;
  color: #64748B;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}

.profile-content-tab:hover {
  color: #0B192C;
}

.profile-content-tab--active {
  color: #FF6B0B;
  border-bottom-color: #FF6B0B;
}

/* Zero-State Card */
.profile-zero-state {
  text-align: center;
  padding: 36px 20px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(11, 25, 44, 0.04);
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-verified-badge {
  display: inline-flex;
  align-items: center;
  color: #10B981;
}

/* Membership Rank Badge */
.profile-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 6px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--badge-accent, #3B82F6) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--badge-accent, #3B82F6) 40%, transparent);
  color: var(--badge-accent, #3B82F6);
  font-weight: 700;
  font-size: 12.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-rank-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.profile-rank-badge__img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
  flex-shrink: 0;
}

.profile-rank-badge--sm .profile-rank-badge__img {
  width: 24px;
  height: 24px;
}

.profile-rank-badge--lg .profile-rank-badge__img {
  width: 38px;
  height: 38px;
}

.profile-rank-badge__label {
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.profile-rank-badge--text {
  padding: 4px 12px;
}

.profile-rank-badge__icon {
  font-size: 14px;
  line-height: 1;
}

/* Trade Score Chip (Decoupled from membership and supporter status) */
.profile-trade-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.profile-trade-chip__label {
  font-weight: 500;
}

.profile-trade-chip__score {
  font-weight: 800;
  color: #0F172A;
}

.profile-trade-chip__score--pos {
  color: #059669;
}

.profile-trade-chip__score--neg {
  color: #DC2626;
}

/* Supporter Strip (Strictly isolated from Role, Membership, and Trade Score) */
.profile-supporter-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.profile-supporter-strip__tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #D97706;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  padding: 2px 8px;
  border-radius: 4px;
}

.profile-supporter-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-supporter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 16px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #B45309;
}

.profile-supporter-badge__img {
  height: 22px;
  max-width: 100px;
  object-fit: contain;
  vertical-align: middle;
}

/* Compact Content Rows */
.profile-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
}

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

.profile-item-row:hover {
  background: #F8FAFC;
}

.profile-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
  margin: 0 0 3px;
  line-height: 1.4;
}

.profile-item-meta {
  font-size: 12px;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-compact-empty {
  padding: 24px 16px;
  text-align: center;
  color: #94A3B8;
  font-size: 13.5px;
}

/* Edit Form Styles */
.edit-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 700px) {
  .edit-form-grid {
    grid-template-columns: 1fr;
  }
}

.media-upload-box {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: 8px;
  margin-bottom: 16px;
}

.media-preview-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #CBD5E1;
}

.media-preview-cover {
  width: 120px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  border: 2px solid #CBD5E1;
}
