/**
 * Analysis Options Page Styles
 * CAP-001: Analysis Options UX
 * Version: 1.0.0
 */

.analysis-options-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  overflow: hidden;
  background: var(--bg-secondary, #f5f5f5);
}

.analysis-options-screen .screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary, #ffffff);
  border-bottom: 1px solid var(--border, #e0e0e0);
  position: sticky;
  top: 0;
  z-index: 10;
}

.analysis-options-screen .screen-header h1 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary, #1a1a1a);
}

.analysis-options-screen .back-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary, #1a1a1a);
  transition: background 0.2s ease;
}

.analysis-options-screen .back-btn:hover {
  background: var(--border, #e0e0e0);
}

.analysis-options-screen .screen-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  overscroll-behavior: contain;
  padding-bottom: 100px; /* Space for footer */
}

/* Option Sections */
.option-section {
  background: var(--bg-primary, #ffffff);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.option-section h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-section h2 i {
  color: var(--primary, #e74c3c);
}

.section-description {
  color: var(--text-secondary, #666666);
  font-size: 14px;
  margin: 0 0 16px 0;
}

/* Mode Cards */
.mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mode-card {
  border: 2px solid var(--border, #e0e0e0);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-primary, #ffffff);
}

.mode-card:hover {
  border-color: var(--primary-light, #f39c9c);
}

.mode-card.selected {
  border-color: var(--primary, #e74c3c);
  background: var(--primary-bg, #fef5f5);
}

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

.mode-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light, #fce4e4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary, #e74c3c);
  font-size: 18px;
}

.mode-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mode-badge.recommended {
  background: var(--success-bg, #e8f5e9);
  color: var(--success, #27ae60);
}

.mode-badge.budget {
  background: var(--warning-bg, #fff3e0);
  color: var(--warning, #f39c12);
}

.mode-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text-primary, #1a1a1a);
}

.mode-card > p {
  font-size: 12px;
  color: var(--text-secondary, #666666);
  margin: 0 0 12px 0;
}

.mode-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mode-features li {
  font-size: 12px;
  color: var(--text-secondary, #666666);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-features li i {
  color: var(--success, #27ae60);
  font-size: 10px;
}

/* Model Options */
.model-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.model-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--border, #e0e0e0);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-primary, #ffffff);
}

.model-option:hover {
  border-color: var(--primary-light, #f39c9c);
}

.model-option.selected {
  border-color: var(--primary, #e74c3c);
  background: var(--primary-bg, #fef5f5);
}

.model-option input {
  display: none;
}

.model-info {
  display: flex;
  flex-direction: column;
}

.model-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary, #1a1a1a);
}

.model-stats {
  font-size: 12px;
  color: var(--text-secondary, #666666);
}

/* Rubric Options */
.rubric-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rubric-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--border, #e0e0e0);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-primary, #ffffff);
}

.rubric-option:hover {
  border-color: var(--primary-light, #f39c9c);
}

.rubric-option.selected {
  border-color: var(--primary, #e74c3c);
  background: var(--primary-bg, #fef5f5);
}

.rubric-option input {
  display: none;
}

.rubric-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.rubric-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--text-primary, #1a1a1a);
}

.rubric-desc {
  font-size: 12px;
  color: var(--text-secondary, #666666);
  margin-bottom: 4px;
}

.rubric-stats {
  display: flex;
  gap: 12px;
  font-size: 11px;
}

.rubric-stats .accuracy {
  color: var(--success, #27ae60);
}

.rubric-stats .cost {
  color: var(--text-tertiary, #999999);
}

/* Video Toggle */
.video-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border, #ccc);
  border-radius: 28px;
  transition: 0.3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
  background: var(--primary, #e74c3c);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-info {
  display: flex;
  flex-direction: column;
}

.toggle-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary, #1a1a1a);
}

.toggle-desc {
  font-size: 12px;
  color: var(--text-secondary, #666666);
}

/* Cost Estimate */
.cost-estimate-section {
  background: var(--bg-primary, #ffffff);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cost-estimate-section h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cost-estimate-section h2 i {
  color: var(--primary, #e74c3c);
}

.cost-breakdown {
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.cost-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-primary, #1a1a1a);
}

.cost-item.total {
  font-weight: 600;
  font-size: 16px;
  color: var(--primary, #e74c3c);
}

.cost-divider {
  height: 1px;
  background: var(--border, #e0e0e0);
  margin: 8px 0;
}

.cost-note {
  font-size: 12px;
  color: var(--text-secondary, #666666);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

/* Hidden state */
.hidden {
  display: none !important;
}

/* Screen Footer */
.analysis-options-screen .screen-footer {
  padding: 16px;
  background: var(--bg-primary, #ffffff);
  border-top: 1px solid var(--border, #e0e0e0);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.analysis-options-screen .btn-lg {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.analysis-options-screen .btn-primary {
  background: var(--primary, #e74c3c);
  color: white;
  transition: background 0.2s ease;
}

.analysis-options-screen .btn-primary:hover {
  background: var(--primary-dark, #c0392b);
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .mode-cards {
    grid-template-columns: 1fr;
  }

  .mode-card {
    padding: 14px;
  }

  .mode-badge {
    font-size: 9px;
    padding: 3px 6px;
  }
}
