/* ============================================
   PROFILE PAGE STYLES
   ============================================ */

.profile-page-container {
  width: 100%;
  min-height: 100vh;
  background-color: #f5f5f5;
}

/* Header */
.profile-header {
  background: linear-gradient(135deg, #184A3A 0%, #2d6e5f 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.profile-header-content h1 {
  font-size: 2.5rem;
  margin: 0 0 10px 0;
  font-weight: 700;
}

.profile-header-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0;
}

/* Main Content */
.profile-main-content {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Tabs Navigation */
.profile-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0;
}

.profile-tab {
  padding: 15px 25px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: #666;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  bottom: -2px;
}

.profile-tab:hover {
  color: #184A3A;
  background-color: #f0f0f0;
}

.profile-tab.active {
  color: #184A3A;
  border-bottom-color: #184A3A;
}

/* Tab Content */
.profile-content {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.profile-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Section Styling */
.profile-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
}

.profile-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.profile-section h2 {
  font-size: 1.5rem;
  color: #184A3A;
  margin: 0 0 20px 0;
  font-weight: 700;
}

.section-description {
  color: #666;
  margin: 0 0 20px 0;
  font-size: 0.95rem;
}

.profile-section.danger-zone {
  border-color: #ff6b6b;
  background-color: #fff5f5;
  padding: 20px;
  border-radius: 8px;
}

.profile-section.danger-zone h2 {
  color: #ff6b6b;
}

/* Form Styles */
.profile-form {
  display: grid;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 0.95rem;
}

.form-input {
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: #184A3A;
  box-shadow: 0 0 0 3px rgba(24, 74, 58, 0.1);
}

.form-input:read-only {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.profile-preview {
  margin-top: 10px;
  min-height: 100px;
  background-color: #f5f5f5;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

/* Plan Display */
.plan-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.plan-card {
  padding: 30px;
  border: 2px solid #ddd;
  border-radius: 12px;
  text-align: center;
  background: white;
  transition: transform 0.3s ease;
}

.plan-card:hover {
  transform: translateY(-5px);
}

.plan-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.plan-card h3 {
  font-size: 1.3rem;
  color: #184A3A;
  margin: 0 0 10px 0;
}

.plan-card p {
  margin: 0;
  font-size: 0.95rem;
}

/* Goals Grid */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.goal-card {
  padding: 25px;
  border: 2px solid #ddd;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.goal-card:hover {
  border-color: #8CC63F;
  transform: translateY(-5px);
}

.goal-card.active {
  border-color: #184A3A;
  background-color: #f0faf7;
}

.goal-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.goal-card h3 {
  font-size: 1.1rem;
  color: #184A3A;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.goal-card p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.stat-card {
  padding: 20px;
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
  border: 1px solid #ddd;
  border-radius: 10px;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #184A3A;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
}

/* Lists */
.favorites-list,
.history-list,
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.favorite-item,
.history-item,
.notification-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #8CC63F;
}

.favorite-icon,
.history-type,
.notification-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.favorite-info,
.history-info,
.notification-info {
  flex: 1;
}

.favorite-item h4,
.history-item h4,
.notification-item h4 {
  margin: 0 0 5px 0;
  color: #184A3A;
  font-size: 1rem;
}

.favorite-item p,
.history-item p,
.notification-item p {
  margin: 0 0 8px 0;
  color: #666;
  font-size: 0.9rem;
}

.favorite-item small,
.history-item small,
.notification-item small {
  color: #999;
  font-size: 0.85rem;
}

.notification-item.unread {
  background-color: #f0faf7;
  border-left-color: #184A3A;
}

.notification-item.read {
  opacity: 0.7;
}

.empty-state,
.error {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 1.1rem;
}

.error {
  color: #ff6b6b;
}

.loading {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

/* Options */
.language-options,
.radio-option,
.checkbox-option {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 15px 0;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.radio-option:hover,
.checkbox-option:hover {
  background-color: #f5f5f5;
}

.language-radio,
.checkbox-input {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #184A3A;
}

.radio-option span,
.checkbox-option span {
  font-size: 1rem;
  color: #333;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  color: #184A3A;
  font-size: 1.3rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Buttons */
.btn {
  padding: 12px 25px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-primary {
  background-color: #184A3A;
  color: white;
}

.btn-primary:hover {
  background-color: #122f2a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 74, 58, 0.2);
}

.btn-secondary {
  background-color: #8CC63F;
  color: white;
}

.btn-secondary:hover {
  background-color: #7ab52e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(140, 198, 63, 0.2);
}

.btn-danger {
  background-color: #ff6b6b;
  color: white;
}

.btn-danger:hover {
  background-color: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.btn-small {
  padding: 8px 15px;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .profile-header-content h1 {
    font-size: 2rem;
  }

  .profile-tabs {
    flex-direction: column;
    border-bottom: none;
  }

  .profile-tab {
    border-bottom: 2px solid #ddd;
    border-radius: 6px;
    margin-bottom: 5px;
  }

  .profile-tab.active {
    border-bottom-color: #184A3A;
    background-color: #f0faf7;
  }

  .profile-content {
    padding: 20px;
  }

  .goals-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-content {
    width: 95%;
    margin: 20px;
  }

  .modal-footer {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .profile-page-container {
    padding: 0;
  }

  .profile-header {
    padding: 30px 15px;
  }

  .profile-header-content h1 {
    font-size: 1.5rem;
  }

  .profile-main-content {
    margin: 20px auto;
  }

  .profile-content {
    padding: 15px;
    border-radius: 8px;
  }

  .profile-section {
    margin-bottom: 25px;
  }

  .goals-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .favorite-item,
  .history-item,
  .notification-item {
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
}
