/* ==========================================
   USER PROFILE MODAL COMPONENT
   ========================================== */

/* 1. Modal Overlay (Background Overlay) */
.profile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 16px;
}

/* Modal Open State */
.profile-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 2. Main Profile Card */
.profile-modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 380px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.profile-modal-overlay.active .profile-modal-card {
  transform: translateY(0) scale(1);
}

/* 3. Header Section */
.profile-modal-header {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.close-modal-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  line-height: 1;
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* 4. Body & Avatar Section */
.profile-modal-body {
  padding: 24px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.profile-avatar-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #f0f2f5;
  border: 3px solid #ff416c;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
}

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

.modal-avatar-emoji {
  font-size: 2.8rem;
}

/* 5. User Details List */
.profile-details-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background-color: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}

.detail-label {
  font-size: 0.88rem;
  color: #6c757d;
  font-weight: 500;
}

.detail-value {
  font-size: 0.95rem;
  color: #212529;
  font-weight: 600;
}

/* Status Badge */
.status-badge {
  color: #2e7d32;
  background-color: #e8f5e9;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid #c8e6c9;
}

/* 6. Footer & Action Buttons */
.profile-modal-footer {
  padding: 16px 20px;
  background-color: #fafafa;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
}

.profile-action-btn {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.profile-action-btn:active {
  transform: scale(0.97);
}

.profile-action-btn.edit-btn {
  background-color: #2196f3;
  color: #ffffff;
}

.profile-action-btn.edit-btn:hover {
  background-color: #1e88e5;
}

.profile-action-btn.logout-btn {
  background-color: #ffebee;
  color: #d32f2f;
  border: 1px solid #ffcdd2;
}

.profile-action-btn.logout-btn:hover {
  background-color: #ffcdd2;
}

/* Dark Mode Adaptability (Optional) */
@media (prefers-color-scheme: dark) {
  .profile-modal-card {
    background: #1e1e24;
    color: #f0f0f0;
  }
  .detail-item {
    background-color: #2a2a32;
    border-color: #383842;
  }
  .detail-label {
    color: #a0a0a0;
  }
  .detail-value {
    color: #ffffff;
  }
  .profile-modal-footer {
    background-color: #17171c;
    border-top-color: #2a2a32;
  }
}