﻿/* Weight Tracker Pro - Profile Modal - Clean Professional Design */

#wt-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
#wt-profile-modal.show {
  display: flex;
  visibility: visible;
  opacity: 1;
}
.wt-profile-modal-overlay {
position: absolute;
inset: 0;
background: rgba(0,0,0,0.55);
}
.wt-profile-modal-content {
position: relative;
background: #fff;
width: 92%;
max-width: 540px;
max-height: 92vh;
overflow-y: auto;
border-radius: 12px;
box-shadow: 0 12px 40px rgba(0,0,0,0.2);
z-index: 1;
scrollbar-width: thin;
scrollbar-color: #ddd transparent;
}
.wt-profile-modal-close {
position: absolute;
top: 12px;
right: 12px;
width: 28px;
height: 28px;
border-radius: 50%;
background: rgba(255,255,255,0.22);
color: #fff;
border: none;
font-size: 18px;
line-height: 1;
cursor: pointer;
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
}

/* ---- Header ---- */
.wt-profile-header {
background: linear-gradient(135deg, #4a6cf7 0%, #6b3de8 100%);
color: #fff;
padding: 36px 24px 26px;
text-align: center;
}
.wt-profile-avatar-wrap {
position: relative;
width: 80px;
height: 80px;
margin: 0 auto 14px;
}
.wt-profile-avatar-img {
width: 80px;
height: 80px;
border-radius: 50%;
border: 3px solid rgba(255,255,255,0.45);
object-fit: cover;
display: block;
background: rgba(255,255,255,0.2);
}
/* Hide broken-image icon before JS loads the src */
.wt-profile-avatar-img[src=""] {
visibility: hidden;
}
.wt-profile-name {
font-size: 19px;
font-weight: 600;
margin: 0 0 10px;
}
.wt-profile-tracking-pill {
display: inline-flex;
align-items: center;
gap: 5px;
background: rgba(255,255,255,0.15);
padding: 4px 14px;
border-radius: 20px;
font-size: 13px;
}

/* ---- Sections ---- */
.wt-profile-section {
padding: 18px 20px;
border-bottom: 1px solid #f0f0f0;
}
.wt-profile-section:last-child { border-bottom: none; }
.wt-section-label {
font-size: 11px;
font-weight: 700;
color: #aaa;
text-transform: uppercase;
letter-spacing: 0.8px;
margin: 0 0 12px;
}

/* ---- Stats grid ---- */
.wt-stats-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 8px;
}
.wt-stat-box {
background: #f7f8fc;
border-radius: 8px;
padding: 12px 6px;
text-align: center;
}
.wt-stat-box.wt-stat-highlight { background: #eef1ff; }
.wt-stat-label {
display: block;
font-size: 10px;
color: #aaa;
text-transform: uppercase;
letter-spacing: 0.4px;
margin-bottom: 5px;
}
.wt-stat-value {
font-size: 16px;
font-weight: 700;
color: #222;
margin: 0;
}
.wt-stat-box.wt-stat-highlight .wt-stat-value { color: #4a6cf7; }
.wt-stat-unit { font-size: 11px; font-weight: 400; color: #888; }

/* ---- Progress bar ---- */
.wt-profile-progress-bar-wrap { margin-top: 14px; }
.wt-profile-progress-bg {
background: #eee;
border-radius: 6px;
height: 7px;
overflow: hidden;
}
.wt-profile-progress-fill {
height: 100%;
background: linear-gradient(90deg, #4a6cf7, #6b3de8);
border-radius: 6px;
width: 0%;
transition: width 0.5s ease;
}
.wt-profile-progress-label {
font-size: 12px;
color: #888;
margin: 5px 0 0;
text-align: right;
}

/* ---- Achievement ---- */
.wt-achievement-display {
display: flex;
align-items: center;
gap: 14px;
background: #fffbea;
border: 1px solid #ffe57f;
border-radius: 8px;
padding: 14px;
}
.wt-achievement-display.wt-no-achievement {
background: #f7f8fc;
border-color: #e8eaf0;
}
.wt-achievement-icon-lg { font-size: 34px; flex-shrink: 0; }
.wt-achievement-info h4 {
margin: 0 0 3px;
font-size: 14px;
font-weight: 600;
color: #333;
}
.wt-achievement-info p { margin: 0; font-size: 12px; color: #999; }

/* ---- Photos slider ---- */
.wt-photos-slider-wrap {
position: relative;
background: #111;
border-radius: 8px;
overflow: hidden;
height: 220px;
display: flex;
align-items: center;
justify-content: center;
}
.wt-photos-slider-inner { width: 100%; height: 100%; }
#wt-photos-slider {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.wt-slider-item {
display: none;
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
}
.wt-slider-item img {
max-width: 100%;
max-height: 220px;
object-fit: contain;
display: block;
margin: auto;
}
.wt-slider-btn {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(255,255,255,0.88);
border: none;
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 5;
color: #333;
}
.wt-slider-btn-prev { left: 8px; }
.wt-slider-btn-next { right: 8px; }
.wt-no-photos-msg {
text-align: center;
color: #bbb;
font-size: 13px;
padding: 10px 0 0;
margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
.wt-stats-grid { grid-template-columns: repeat(2, 1fr); }
.wt-photos-slider-wrap { height: 170px; }
.wt-profile-modal-content { width: 96%; max-height: 94vh; }
}
