/* === Enhanced Profile Modal Styles === */

/* Modal Compact Overrides */
.modal-dialog-scrollable .modal-body {
  padding: 16px !important;
}

.modal-dialog-scrollable .modal-header {
  padding: 12px 16px !important;
}

.modal-dialog-scrollable .modal-header .modal-title {
  font-size: 16px !important;
}

/* Compact Profile Attributes */
.row.g-2.mb-4 {
  margin-bottom: 10px !important;
}

.row.g-2 > [class*="col-"] {
  padding: 3px !important;
}

.d-flex.align-items-center.p-2.bg-light.rounded {
  padding: 6px 10px !important;
  border-radius: 6px !important;
}

.d-flex.align-items-center.p-2.bg-light.rounded .small,
.d-flex.align-items-center.p-2.bg-light.rounded .fw-medium {
  font-size: 11px !important;
}

.d-flex.align-items-center.p-2.bg-light.rounded i {
  font-size: 12px !important;
}

/* Compact Research Sources */
.row.mb-4:last-of-type {
  margin-bottom: 8px !important;
}

/* Profile Stats Grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.profile-stat-card {
  background: var(--fs-bg-secondary);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.profile-stat-card:hover {
  background: #e9ecef;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-stat-info {
  flex: 1;
  min-width: 0;
}

.profile-stat-value {
  font-weight: 600;
  font-size: 16px;
  color: #495057;
  line-height: 1.2;
}

.profile-stat-label {
  font-size: 12px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Profile Actions */
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-actions .btn {
  flex: 1;
  min-width: 120px;
}

/* Weight Progress Enhancements */
.weight-progress-container {
  background: var(--fs-bg-secondary);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e9ecef;
}

.weight-progress-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.weight-progress-item {
  text-align: center;
  flex: 1;
}

.weight-progress-label {
  font-size: 12px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.weight-progress-value {
  font-weight: 700;
  font-size: 18px;
  color: #495057;
}

.weight-progress-arrow {
  font-size: 20px;
  margin: 0 16px;
}

.weight-progress-bar .progress {
  height: 8px;
  border-radius: 4px;
  background-color: #e9ecef;
}

.weight-progress-bar .progress-bar {
  border-radius: 4px;
  position: relative;
  overflow: visible;
}

.weight-progress-bar .progress-bar small {
  position: absolute;
  top: -24px;
  right: -10px;
  color: #28a745;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
}

.weight-entries-count {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 8px;
  border-top: 1px solid #e9ecef;
}

/* Profile Attributes Enhancement */
.profile-attribute {
  padding: 12px 0;
  border-bottom: 1px solid var(--fs-bg-secondary);
  transition: all 0.2s ease;
}

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

.profile-attribute:hover {
  background: var(--fs-bg-secondary);
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 8px;
}

.profile-attribute i {
  width: 20px;
  text-align: center;
}

/* Research Sources Enhancement */
.research-list {
  background: var(--fs-bg-secondary);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #e9ecef;
}

.research-item {
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

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

.research-item .fw-medium {
  color: #495057;
  line-height: 1.3;
}

/* Modal Header Enhancement */
.profile-panel-header {
  background: linear-gradient(135deg, var(--fs-bg-secondary) 0%, #e9ecef 100%);
  border-bottom: 1px solid #dee2e6;
}

.profile-panel-header h5 {
  color: #495057;
}

/* Section Headers Enhancement */
.profile-section h6 {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 16px !important;
}

.profile-section h6 i {
  width: 24px;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .profile-stats-grid {
    grid-template-columns: 1fr;
  }

  .weight-progress-summary {
    flex-direction: column;
    gap: 16px;
  }

  .weight-progress-arrow {
    transform: rotate(90deg);
    margin: 8px 0;
  }

  .profile-actions {
    flex-direction: column;
  }

  .profile-actions .btn {
    min-width: auto;
  }
}

/* Animation for new elements */
.profile-stat-card,
.weight-progress-container {
  animation: fadeInUp 0.5s ease-out;
}

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

/* ========================================
   BENTO STATS GRID - 2024/2025 Dashboard Layout (Compact)
   ======================================== */

.bento-stats-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.bento-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--fs-border-default);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--fs-border-hover);
}

.bento-card-primary {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #bae6fd;
}

.bento-card-primary .bento-card-icon {
  background: linear-gradient(
    135deg,
    var(--fs-primary) 0%,
    var(--fs-primary-hover) 100%
  );
  color: #ffffff;
}

.bento-card-secondary {
  background: linear-gradient(135deg, #fffbeb 0%, var(--fs-warning-light) 100%);
  border-color: #fcd34d;
}

.bento-card-fullwidth {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fef2f2 0%, var(--fs-error-light) 100%);
  border-color: #fecaca;
}

.bento-card-accent-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--fs-error) 0%, #dc2626 100%);
  border-radius: 16px 0 0 16px;
}

.bento-card-fullwidth .bento-card-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 8px;
}

.bento-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--fs-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.bento-card-icon-warning {
  background: linear-gradient(135deg, var(--fs-warning) 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.bento-card-icon-danger {
  background: linear-gradient(135deg, var(--fs-error) 0%, #dc2626 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.bento-card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bento-card-value {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.bento-card-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--fs-text-secondary);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* ========================================
   DANGER ZONE SECTION
   ======================================== */

.danger-zone-container {
  margin-top: 16px;
  border-top: 1px solid var(--fs-border-default);
  padding-top: 12px;
}

.danger-zone-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--fs-bg-hover);
  border: 1px solid var(--fs-border-default);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--fs-text-secondary);
  touch-action: manipulation;
  font-weight: 500;
  font-size: 13px;
}

.danger-zone-toggle:hover {
  background: var(--fs-bg-tertiary);
  border-color: var(--fs-border-hover);
  color: #374151;
}

.danger-zone-toggle-text {
  display: flex;
  align-items: center;
}

.danger-zone-toggle-icon {
  transition: transform 0.3s ease;
  font-size: 12px;
}

.danger-zone-content {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    opacity 0.2s ease;
  opacity: 0;
}

.danger-zone-content-expanded {
  max-height: 300px;
  opacity: 1;
  margin-top: 12px;
}

.danger-zone-divider {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  color: var(--fs-error);
}

.danger-zone-divider::before,
.danger-zone-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #fecaca, transparent);
}

.danger-zone-divider-text {
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.danger-zone-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.danger-zone-action {
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid var(--fs-bg-tertiary);
}

.danger-zone-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.danger-zone-link-warning {
  color: #d97706;
}

.danger-zone-link-warning:hover {
  color: #b45309;
}

.danger-zone-link-danger {
  color: #dc2626;
}

.danger-zone-link-danger:hover {
  color: #b91c1c;
}

.danger-zone-hint {
  margin: 6px 0 0 0;
  font-size: 12px;
  color: var(--fs-text-muted);
  line-height: 1.4;
}

/* ========================================
   WEIGHT PROGRESS CARD - Enhanced
   ======================================== */

.weight-progress-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--fs-border-default);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 12px;
}

.weight-progress-title {
  color: var(--fs-primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.weight-progress-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weight-progress-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background: var(--fs-bg-hover);
  border-radius: 10px;
}

.weight-progress-point {
  text-align: center;
  padding: 6px 12px;
}

.weight-progress-point-current {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.weight-progress-point-label {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--fs-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.weight-progress-point-value {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.weight-progress-arrow {
  color: var(--fs-success);
  font-size: 14px;
}

.weight-progress-bar-container {
  padding: 6px 0;
}

.weight-progress-bar {
  position: relative;
  height: 10px;
  background: var(--fs-border-default);
  border-radius: 5px;
  overflow: visible;
}

.weight-progress-bar-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--fs-success) 0%,
    var(--fs-border-selected) 100%
  );
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.weight-progress-milestones {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.weight-milestone {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--fs-border-default);
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: var(--fs-text-muted);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  z-index: 2;
}

.weight-milestone-achieved {
  background: linear-gradient(135deg, #fbbf24 0%, var(--fs-warning) 100%);
  color: #ffffff;
  animation: milestonePopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes milestonePopIn {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.weight-progress-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.weight-progress-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}

.weight-progress-badge-success {
  background: #dcfce7;
  color: #166534;
}

.weight-progress-badge-warning {
  background: var(--fs-warning-light);
  color: #92400e;
}

.weight-progress-goal-text {
  font-size: 11px;
  color: var(--fs-text-secondary);
}

.weight-progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--fs-bg-tertiary);
}

.weight-mini-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--fs-bg-hover);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.weight-mini-stat:hover {
  background: var(--fs-bg-tertiary);
}

.weight-mini-stat-icon {
  font-size: 14px;
  color: var(--fs-success);
}

.weight-mini-stat-icon-streak {
  color: var(--fs-warning);
}

.weight-mini-stat-icon-avg {
  color: var(--fs-border-selected);
}

.weight-mini-stat-content {
  display: flex;
  flex-direction: column;
}

.weight-mini-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.weight-mini-stat-label {
  font-size: 9px;
  color: var(--fs-text-muted);
}

/* ========================================
   PRIMARY ACTIONS - 2 Button Layout (Compact)
   ======================================== */

.profile-primary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.profile-primary-actions .btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.profile-primary-actions .btn-primary {
  background: linear-gradient(
    135deg,
    var(--fs-primary) 0%,
    var(--fs-primary-hover) 100%
  );
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.profile-primary-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.profile-primary-actions .btn-outline-primary {
  border: 2px solid var(--fs-primary);
  color: var(--fs-primary);
  background: transparent;
}

.profile-primary-actions .btn-outline-primary:hover {
  background: var(--fs-primary);
  color: #ffffff;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .bento-stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .bento-card {
    padding: 16px;
  }

  .bento-card-value {
    font-size: 20px;
  }

  .bento-card-icon {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .weight-progress-summary {
    flex-direction: column;
    gap: 4px;
  }

  .weight-progress-arrow {
    transform: rotate(90deg);
  }

  .weight-progress-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .profile-primary-actions {
    grid-template-columns: 1fr;
  }

  .danger-zone-content-expanded {
    max-height: 400px;
  }
}

/* ========================================
   RESET/UPDATE PROFILE MODAL - Clean Design
   ======================================== */

.reset-profile-content {
  padding: 4px 0;
}

.reset-profile-intro {
  font-size: 15px;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}

.reset-section {
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.reset-section-cleared {
  background: var(--fs-bg-hover);
  border: 1px solid var(--fs-border-default);
}

.reset-section-kept {
  background: linear-gradient(135deg, #ecfdf5 0%, var(--fs-success-light) 100%);
  border: 1px solid #a7f3d0;
}

.reset-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
}

.reset-section-kept .reset-section-title {
  color: #047857;
}

.reset-section-kept .reset-section-title i {
  color: var(--fs-success);
}

.reset-list {
  margin: 0;
  padding: 0 0 0 20px;
  font-size: 14px;
  color: var(--fs-text-secondary);
  line-height: 1.8;
}

.reset-list-kept {
  list-style: none;
  padding-left: 0;
}

.reset-list-kept li {
  display: flex;
  align-items: center;
  color: #065f46;
  font-weight: 500;
  padding: 4px 0;
}

/* Modal Footer Enhancement */
.reset-profile-content + .modal-footer,
.adaptive-modal-footer {
  border-top: 1px solid var(--fs-border-default);
  padding-top: 16px;
  margin-top: 8px;
}

/* Responsive */
@media (max-width: 576px) {
  .reset-profile-intro {
    font-size: 14px;
  }

  .reset-section {
    padding: 14px;
  }

  .reset-list {
    font-size: 13px;
  }
}
