/* Modern Outfit Critique Styles - Sleek & Minimalist */

/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Override base typography for critique section */
#outfit-critique {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 100%;
  margin: 0 auto;
}

/* Upload Zone */
.upload-zone {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 24px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: 24px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.upload-zone:hover {
  border-color: #667eea;
  background: #f0f4ff;
}

.upload-zone.dragover {
  border-color: #667eea;
  background: #eef2ff;
  transform: scale(1.01);
}

.upload-content {
  pointer-events: none;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.upload-zone h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}

.upload-zone p {
  color: #64748b;
  margin-bottom: 8px;
}

.upload-hint {
  font-size: 12px;
  color: #94a3b8;
  background: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
}

/* Preview Container */
.preview-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.remove-preview-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.remove-preview-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

/* Action Button */
.action-btn-large {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  margin-bottom: 32px;
}

.action-btn-large:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.action-btn-large:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Feed Header */
.feed-header {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.feed-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

/* Critique Card */
.critique-card {
  background: white;
  border-radius: 24px;
  margin-bottom: 40px;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.critique-header {
  display: grid;
  grid-template-columns: 140px auto 1fr auto;
  gap: 24px;
  padding: 24px;
  background: #fff;
  align-items: flex-start;
}

.score-left-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  min-width: fit-content;
}

.inline-analysis-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  flex-shrink: 0;
  min-width: auto;
}


.critique-image-compact {
  width: 140px;
  height: 180px;
  object-fit: cover;
  border-radius: 16px;
  cursor: zoom-in;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.critique-score-compact {
  display: contents;
}

.score-stars-compact {
  font-size: 24px;
  margin-bottom: 8px;
  color: #e2e8f0;
}

.score-stars-compact .filled {
  color: #fbbf24;
}

.score-text strong {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}


.clickable-score {
  transition: background-color 0.2s ease;
}

.clickable-score:hover {
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 4px 8px;
  margin: -4px -8px;
}



.inline-analysis-container .analysis-item-compact {
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.inline-analysis-container .analysis-item-compact:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.inline-analysis-container .analysis-header {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inline-analysis-container .category-score {
  font-size: 11px;
  margin-left: auto;
}

.inline-analysis-container p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
}

.analysis-toggle-icon {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  transition: transform 0.3s ease;
}

.analysis-expander {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.score-text {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

/* Action Buttons */
.critique-action-buttons {
  display: flex;
  gap: 8px;
  align-self: flex-start;
}

.critique-copy-btn,
.critique-delete-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.critique-copy-btn:hover {
  background: #f3f4f6;
  border-color: #667eea;
  color: #667eea;
}

.critique-delete-btn:hover {
  background: #fef2f2;
  border-color: #ef4444;
  color: #ef4444;
}

/* Tabs */
.critique-tabs {
  display: flex;
  padding: 0 24px;
  border-bottom: 1px solid #f1f5f9;
  gap: 24px;
  overflow-y: hidden; /* Prevent vertical scrollbar */
}

.tab-btn {
  padding: 16px 0;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab-btn.active {
  color: #667eea;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #667eea;
  border-radius: 2px;
}

/* Tab Content */
.tab-content {
  padding: 32px 24px;
  background: #fff;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-pane.active {
  display: block;
}

/* Overview */
.critique-list-compact.strengths {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.critique-list-compact.strengths li {
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(52, 199, 89, 0.08), rgba(48, 209, 88, 0.1));
  border-left: 4px solid #34c759;
  border-radius: 12px;
  color: #1a202c;
  font-weight: normal;
  position: relative;
  padding-left: 32px;
  border-top: none;
  border-right: none;
  border-bottom: none;
  box-shadow: 0 1px 3px rgba(52, 199, 89, 0.1);
}

.critique-list-compact.strengths li::before {
  content: '✓';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 700;
  color: #34c759;
}

/* Analysis Grid */
.analysis-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.analysis-item-compact {
  padding: 20px;
  background: #f8fafc;
  border-radius: 20px;
  border: 1px solid #f1f5f9;
}

.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.analysis-header strong {
  color: #334155;
  font-size: 14px;
}

.category-score {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
}

.category-score.score-1 { background: #fef2f2; color: #dc2626; }
.category-score.score-2 { background: #fff7ed; color: #ea580c; }
.category-score.score-3 { background: #fefce8; color: #ca8a04; }
.category-score.score-4 { background: #ecfdf5; color: #059669; }
.category-score.score-5 { background: #eff6ff; color: #2563eb; }

.analysis-item-compact p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
  font-size: 14px;
}

/* Weaknesses */
.weakness-card-compact {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.weakness-card-compact h5 {
  color: #ef4444;
  font-size: 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.weakness-card-compact h5::before {
  content: '⚠️';
}

.weakness-text-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}


.weakness-icon {
  color: #ef4444;
  font-weight: bold;
  min-width: 14px;
  text-align: center;
}

.improvement-tips-compact {
  background: transparent;
  padding: 0;
  border-radius: 0;
  margin-top: 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.fix-icon {
  color: #10b981;
  margin-right: 0;
  font-weight: bold;
  min-width: 14px;
  text-align: center;
}

.keyword-tag {
  background: white;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 8px;
  margin-right: 6px;
  transition: all 0.2s;
}

.keyword-tag:hover {
  border-color: #667eea;
  color: #667eea;
}

/* Inspiration */
.cultural-refs-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ref-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.ref-type-badge {
  background: #e0e7ff;
  color: #4338ca;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 8px;
}

/* Loading */
.spinner-large {
  width: 50px;
  height: 50px;
  border: 4px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loading-text {
  color: #64748b;
  font-weight: 500;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* Responsive */
@media (max-width: 640px) {
  .critique-header {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  
  .critique-image-compact {
    width: 100%;
    max-width: 240px;
    height: 300px;
  }
  
  .critique-action-buttons {
    width: 100%;
    justify-content: center;
  }
  
  .critique-tabs {
    overflow-x: auto;
    padding-bottom: 0;
  }
  
  .tab-btn {
    white-space: nowrap;
  }
}
/* Cultural References in Header */
.cultural-refs-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ref-pill {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 11px;
  color: #475569;
  border: 1px solid #e2e8f0;
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.ref-type {
  font-weight: 700;
  color: #1e293b; /* Dark slate for better contrast */
  margin-right: 6px;
  text-transform: uppercase;
  font-size: 10px;
}

.ref-desc {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}

/* Adjust Weaknesses Header */
.weaknesses-header-compact {
  display: flex;
  justify-content: flex-end; /* Align toggle to right */
  margin-bottom: 16px;
}

/* Smaller Toggle Button */
.toggle-btn-small {
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn-small:hover {
  color: #1e293b;
  background: #f1f5f9;
}

.toggle-btn-small.active {
  background: #667eea;
  color: white;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}
