/**
 * Bull Finder Main Styles
 * Interactive bull selection tool
 */

/* ========================================
   VARIABLES & GLOBAL STYLES
   ======================================== */

:root {
  --bf-primary: #2c5f2d;
  --bf-primary-dark: #1a3a1b;
  --bf-primary-light: #4a8f4c;
  --bf-secondary: #d4a574;
  --bf-accent: #e67e22;
  --bf-success: #4CAF50;
  --bf-warning: #FFC107;
  --bf-danger: #F44336;
  --bf-text: #333;
  --bf-text-light: #666;
  --bf-border: #ddd;
  --bf-bg: #f5f5f5;
  --bf-white: #fff;
  --bf-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  --bf-shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.15);
  --bf-radius: 12px;
  --bf-radius-sm: 8px;
  --bf-spacing: 20px;
}

.bull-finder-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--bf-spacing);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--bf-text);
}

/* ========================================
   LOADING STATE
   ======================================== */

.bf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.bf-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--bf-border);
  border-top-color: var(--bf-primary);
  border-radius: 50%;
  animation: bf-spin 1s linear infinite;
}

@keyframes bf-spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   PROGRESS TRACKER
   ======================================== */

.bf-progress-tracker {
  background: var(--bf-white);
  border-radius: var(--bf-radius);
  padding: var(--bf-spacing);
  margin-bottom: calc(var(--bf-spacing) * 2);
  box-shadow: var(--bf-shadow);
}

.bf-progress-tracker h3 {
  margin: 0 0 15px;
  color: var(--bf-primary);
  font-size: 1.2em;
}

.bf-progress-bar {
  height: 8px;
  background: var(--bf-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}

.bf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bf-primary), var(--bf-primary-light));
  transition: width 0.5s ease;
}

.bf-progress-steps {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.bf-step {
  flex: 1;
  text-align: center;
}

.bf-step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bf-border);
  color: var(--bf-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.bf-step.completed .bf-step-icon {
  background: var(--bf-success);
  color: white;
}

.bf-step.active .bf-step-icon {
  background: var(--bf-primary);
  color: white;
  transform: scale(1.1);
}

.bf-step-label {
  font-size: 0.85em;
  color: var(--bf-text-light);
}

.bf-step.active .bf-step-label {
  color: var(--bf-primary);
  font-weight: 600;
}

/* ========================================
   OPERATION TYPE SELECTION - Light Theme
   ======================================== */

.bf-operation-select {
  text-align: center;
}

.bf-main-title {
  font-size: 2.5em;
  margin: 0 0 10px;
  color: #164170;
}

.bf-subtitle {
  font-size: 1.2em;
  color: #666;
  margin: 0 0 40px;
}

.bf-operation-cards {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Exactly 50/50 split */
  gap: 30px;
  margin-top: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.bf-operation-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  position: relative;
}

.bf-operation-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-5px);
  border-color: #164170;
}

.bf-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Beef Card Background */
.beef-card .bf-card-image {
  background: #00a77e;
}

/* Dairy Card Background */
.dairy-card .bf-card-image {
  background: #0c3b6f;
}

.bf-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  opacity: 0.9;
}

.bf-operation-card:hover .bf-card-image img {
  transform: scale(1.05);
  opacity: 1;
}

.bf-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(22,65,112,0.1), rgba(22,65,112,0.4));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bf-overlay-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.bf-icon {
  font-size: 6em;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
}

.bf-card-content {
  padding: 25px;
  background: white;
}

.bf-card-content h2 {
  margin: 0 0 10px;
  color: #164170;
  font-size: 1.5em;
}

.bf-card-content p {
  margin: 0 0 15px;
  color: #666;
  line-height: 1.6;
}

.bf-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bf-card-features span {
  background: #f8f9fa;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.9em;
  color: #164170;
  border: 1px solid #e0e0e0;
}

/* Responsive - Stack on mobile */
@media (max-width: 768px) {
  .bf-operation-cards {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   GOAL SELECTION
   ======================================== */

.bf-goal-select {
  text-align: center;
}

.bf-step-title {
  font-size: 2em;
  margin: 0 0 10px;
  color: var(--bf-primary);
}

.bf-step-subtitle {
  font-size: 1.1em;
  color: var(--bf-text-light);
  margin: 0 0 40px;
}

.bf-goal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.bf-goal-card {
  background: var(--bf-white);
  border: 3px solid var(--bf-border);
  border-radius: var(--bf-radius);
  padding: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.bf-goal-card:hover {
  border-color: var(--bf-primary-light);
  box-shadow: var(--bf-shadow-hover);
}

.bf-goal-card.selected {
  border-color: var(--bf-primary);
  background: linear-gradient(135deg, #ffffff, #f0f7f0);
  box-shadow: 0 0 0 4px rgba(44, 95, 45, 0.1);
}

.bf-goal-icon {
  font-size: 3em;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.bf-goal-card:hover .bf-goal-icon {
  transform: scale(1.2) rotate(10deg);
}

.bf-goal-card h3 {
  margin: 0 0 10px;
  color: var(--bf-primary);
}

.bf-goal-card p {
  margin: 0;
  color: var(--bf-text-light);
  font-size: 0.95em;
}

/* ========================================
   BUTTONS
   ======================================== */

.bf-btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--bf-radius-sm);
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.bf-btn-primary {
  background: var(--bf-primary);
  color: white;
}

.bf-btn-primary:hover {
  background: var(--bf-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 95, 45, 0.3);
}

.bf-btn-secondary {
  background: var(--bf-bg);
  color: var(--bf-text);
  border: 2px solid var(--bf-border);
}

.bf-btn-secondary:hover {
  background: var(--bf-border);
}

.bf-btn-large {
  padding: 16px 32px;
  font-size: 1.1em;
}

.bf-btn-small {
  padding: 8px 16px;
  font-size: 0.9em;
}

.bf-btn-block {
  width: 100%;
  display: block;
  margin-bottom: 10px;
}

.bf-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   NAVIGATION
   ======================================== */

.bf-navigation {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid var(--bf-border);
}

/* ========================================
   ACHIEVEMENT POPUP
   ======================================== */

.bf-achievement-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: var(--bf-radius);
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 9999;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.bf-achievement-popup::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: -1;
}

.bf-achievement-content h3 {
  margin: 0 0 20px;
  color: var(--bf-primary);
  font-size: 1.5em;
}

.bf-achievement-badge {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  padding: 20px;
  border-radius: var(--bf-radius);
  margin: 15px 0;
}

.bf-badge-icon {
  font-size: 3em;
  display: block;
  margin-bottom: 10px;
}

.bf-badge-name {
  font-size: 1.2em;
  font-weight: bold;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.bf-text-center {
  text-align: center;
}

.bf-mt-1 {
  margin-top: 10px;
}

.bf-mt-2 {
  margin-top: 20px;
}

.bf-mb-1 {
  margin-bottom: 10px;
}

.bf-mb-2 {
  margin-bottom: 20px;
}

/* ========================================
   QUIZ COMPONENT
   ======================================== */

.bf-quiz-container {
  background: var(--bf-white);
  border-radius: var(--bf-radius);
  padding: 40px;
  box-shadow: var(--bf-shadow);
  max-width: 800px;
  margin: 0 auto;
}

.bf-quiz-progress {
  margin-bottom: 40px;
}

.bf-quiz-progress-bar {
  height: 8px;
  background: var(--bf-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.bf-quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bf-primary), var(--bf-accent));
  transition: width 0.5s ease;
}

.bf-quiz-progress-text {
  text-align: center;
  color: var(--bf-text-light);
  font-size: 0.9em;
}

.bf-question {
  margin-bottom: 40px;
}

.bf-question-text {
  font-size: 1.8em;
  margin: 0 0 10px;
  color: var(--bf-primary);
  text-align: center;
}

.bf-question-subtitle {
  text-align: center;
  color: var(--bf-text-light);
  margin: 0 0 40px;
}

/* Slider Questions */
.bf-question-slider {
  padding: 20px;
}

.bf-visual-container {
  text-align: center;
  margin-bottom: 30px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bf-visual-emoji {
  font-size: 5em;
  transition: transform 0.3s ease;
}

.bf-speedometer {
  width: 150px;
  height: 150px;
  border: 8px solid var(--bf-border);
  border-radius: 50%;
  position: relative;
  margin: 0 auto;
}

.bf-speedometer-needle {
  width: 4px;
  height: 60px;
  background: var(--bf-danger);
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(-90deg);
  transition: transform 0.5s ease;
}

.bf-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  outline: none;
  background: linear-gradient(to right, var(--bf-border) 0%, var(--bf-primary) 100%);
  -webkit-appearance: none;
  appearance: none;
}

.bf-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bf-primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.bf-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.bf-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bf-primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  border: none;
}

.bf-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.9em;
  color: var(--bf-text-light);
}

.bf-slider-value {
  text-align: center;
  margin-top: 15px;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--bf-primary);
}

/* Bottle Questions */
.bf-question-bottles {
  padding: 20px;
}

.bf-bottles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
}

.bf-bottle-option {
  text-align: center;
  padding: 20px;
  border: 3px solid var(--bf-border);
  border-radius: var(--bf-radius);
  cursor: pointer;
  transition: all 0.3s ease;
}

.bf-bottle-option:hover {
  border-color: var(--bf-primary-light);
  transform: translateY(-5px);
}

.bf-bottle-option.selected {
  border-color: var(--bf-primary);
  background: linear-gradient(135deg, #ffffff, #f0f7f0);
}

.bf-bottles {
  font-size: 2em;
  margin-bottom: 10px;
}

.bf-bottle-icon {
  display: inline-block;
  margin: 0 2px;
}

.bf-bottle-label {
  font-weight: 600;
  color: var(--bf-primary);
}

/* Choice Questions */
.bf-question-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.bf-choice-card {
  text-align: center;
  padding: 30px 20px;
  border: 3px solid var(--bf-border);
  border-radius: var(--bf-radius);
  cursor: pointer;
  transition: all 0.3s ease;
}

.bf-choice-card:hover {
  border-color: var(--bf-primary-light);
  transform: scale(1.05);
}

.bf-choice-card.selected {
  border-color: var(--bf-primary);
  background: linear-gradient(135deg, #ffffff, #f0f7f0);
}

.bf-choice-icon {
  font-size: 3em;
  margin-bottom: 15px;
}

.bf-choice-label {
  font-weight: bold;
  color: var(--bf-primary);
  margin-bottom: 5px;
}

.bf-choice-subtitle {
  font-size: 0.9em;
  color: var(--bf-text-light);
}

/* Star Questions */
.bf-question-stars {
  text-align: center;
  padding: 20px;
}

.bf-stars-container {
  font-size: 3em;
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.bf-star {
  cursor: pointer;
  filter: grayscale(100%);
  transition: all 0.2s ease;
}

.bf-star:hover,
.bf-star.filled {
  filter: grayscale(0%);
  transform: scale(1.2);
}

/* Quiz Navigation */
.bf-quiz-navigation {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid var(--bf-border);
}

.bf-quiz-navigation .bf-btn {
  flex: 1;
  max-width: 200px;
}
