/* Profile Tab CSS - Profile management, health chips, summary */

.profile-content {
  padding: 20px;
}

/* Profile Status Display */
.profile-status {
  background: linear-gradient(135deg, #e8f5e8, #f1f8e9);
  border-radius: 15px;
  padding: 18px;
  margin-bottom: 18px;
  border: 2px solid rgba(76, 175, 80, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.profile-status:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
  border-color: rgba(76, 175, 80, 0.6);
}

.profile-status:active {
  transform: translateY(0);
}

.profile-status::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4caf50, #8bc34a, #4caf50);
  border-radius: 15px 15px 0 0;
}

.status-title {
  font-weight: 700;
  color: #2e7d32;
  margin-bottom: 15px;
  text-align: center;
  font-size: 1.1em;
}

.status-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  border-left: 3px solid #4caf50;
}

.status-label {
  font-weight: 600;
  color: #2e7d32;
  font-size: 0.9em;
}

.status-value {
  color: #1b5e20;
  font-weight: 500;
  font-size: 0.9em;
  text-align: right;
  max-width: 60%;
  word-wrap: break-word;
}

/* Profile Type Selection Buttons */
.profile-type-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  justify-content: center;
}

.profile-type-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
  border: 2px solid #ff9a9e;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 600;
  color: #5d4037;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 154, 158, 0.3);
  position: relative;
  overflow: hidden;
}

.profile-type-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.profile-type-btn:hover::before {
  left: 100%;
}

.profile-type-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 154, 158, 0.4);
  background: linear-gradient(135deg, #ff8a8e, #febfdf);
}

.profile-type-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 154, 158, 0.3);
}

.profile-section {
  background: white;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(233, 236, 239, 0.5);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.profile-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.profile-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff9a9e, #fecfef, #4caf50);
  border-radius: 20px 20px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-section:hover::before {
  opacity: 1;
}

.section-title {
  font-size: 1.1em;
  font-weight: 700;
  margin-bottom: 15px;
  color: #5d4037;
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.section-icon {
  font-size: 1.1em;
  opacity: 0.8;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 15px;
  justify-content: center;
  max-width: 100%;
}

.health-chip {
  padding: 12px 20px;
  background: linear-gradient(135deg, #f8f9fa, #f0f0f0);
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  color: #5d4037;
  transition: all 0.3s ease;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  min-width: 110px;
  text-align: center;
}

.health-chip::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.health-chip:hover::before {
  left: 100%;
}

.health-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.health-chip.selected {
  background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
  border-color: #4caf50;
  color: #2e7d32;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
  font-weight: 600;
}

/* Demo mode - disabled editing */
.health-chip.demo-disabled {
  cursor: default !important;
  opacity: 0.7 !important;
  pointer-events: none;
}

.health-chip.demo-disabled:hover {
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Disabled textarea styling */
.meal-input:disabled {
  background-color: #f5f5f5 !important;
  color: #666 !important;
  cursor: not-allowed !important;
  opacity: 0.7;
  border-color: #ddd !important;
}

/* Profile Summary Chips - Enhanced Design */
.summary-chip {
  background: linear-gradient(135deg, #f8f9fa, #f0f0f0);
  border: 2px solid #e9ecef;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.4s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.summary-label {
  font-size: 0.95em;
  font-weight: 700;
  color: #5d4037;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.summary-value {
  font-size: 1em;
  color: #2c3e50;
  line-height: 1.5;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  border-left: 4px solid #6c757d;
  min-height: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-chip:last-child .summary-value {
  border-left-color: #6c757d;
}

/* Condition chips styling */
.condition-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.condition-chip {
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
  color: #5d4037;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  border: 1px solid rgba(255, 154, 158, 0.3);
  box-shadow: 0 2px 6px rgba(255, 154, 158, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.condition-chip::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.condition-chip:hover::before {
  left: 100%;
}

.condition-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 154, 158, 0.3);
}

/* Avoid chips styling */
.avoid-chip {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  border: 1px solid rgba(231, 76, 60, 0.3);
  box-shadow: 0 2px 6px rgba(231, 76, 60, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: inline-block;
  margin: 2px 4px;
}

.avoid-chip::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.avoid-chip:hover::before {
  left: 100%;
}

.avoid-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* Profile Update Notification */
.profile-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #4caf50, #8bc34a);
  color: white;
  padding: 15px 25px;
  border-radius: 25px;
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  max-width: 90%;
  text-align: center;
}

.profile-notification.show {
  transform: translateX(-50%) translateY(0);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.notification-icon {
  font-size: 1.5em;
}

.notification-text {
  font-size: 0.95em;
  line-height: 1.4;
}

/* Avoid list styling */
.avoid-list {
  min-height: 20px;
  line-height: 1.4;
}

.avoid-list.empty {
  color: #6c757d;
  font-style: italic;
  text-align: center;
  padding: 8px;
  background: rgba(255, 154, 158, 0.1);
  border-radius: 8px;
  border: 1px dashed rgba(255, 154, 158, 0.3);
}

.avoid-list:not(.empty) {
  background: rgba(255, 152, 0, 0.1);
  padding: 10px;
  border-radius: 8px;
  border-left: 3px solid #ff9800;
  color: #2c3e50;
  font-weight: 500;
}

/* Profile summary - no animations */
#profileSummary.updated .summary-chip {
  /* No update animations */
}

/* Empty state styling */
.summary-chip.empty .summary-value {
  background: rgba(255, 154, 158, 0.1);
  border-left-color: #ff9a9e;
  color: #6c757d;
  font-style: italic;
  text-align: center;
}

/* Toggle Switch */
.toggle-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  background: linear-gradient(135deg, #f8f9fa, #e8f5e8);
  border-radius: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.switch {
  position: relative;
  width: 55px;
  height: 28px;
  background: #ddd;
  border-radius: 28px;
  cursor: pointer;
  transition: background 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.switch.active {
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch.active::after {
  transform: translateX(27px);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .summary-chip {
    padding: 15px;
    margin-bottom: 12px;
  }

  .summary-label {
    font-size: 0.85em;
  }

  .summary-value {
    font-size: 0.9em;
    padding: 10px 14px;
  }

  .profile-type-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .profile-type-btn {
    padding: 15px 20px;
  }

  .chip-grid {
    gap: 8px;
    margin-bottom: 15px;
  }

  .health-chip {
    padding: 8px 16px;
    min-width: 85px;
    font-size: 0.8em;
  }

  .section-title {
    font-size: 1em;
    margin-bottom: 12px;
  }
}
