/**
 * BMR Calculator WordPress Plugin Styles
 */

/* Container */
.bmr-calculator-wp-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  color: #333;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bmr-calculator-container {
  width: 100%;
}

/* Typography */
.bmr-calculator-container h2 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.bmr-calculator-container h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.bmr-calculator-container p {
  font-size: 16px;
  line-height: 1.5;
  color: #666;
  margin-bottom: 20px;
}

/* Header */
.bmr-calculator-header {
  margin-bottom: 30px;
  text-align: center;
}

/* Form */
.bmr-calculator-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .bmr-calculator-form {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-row:last-child,
  .form-row.units-toggle {
    grid-column: span 2;
  }
}

.form-row {
  margin-bottom: 10px;
}

.form-row label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.form-row input,
.form-row select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  background-color: #fff;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2);
}

/* Input with buttons */
.input-with-buttons {
  display: flex;
  align-items: center;
}

.input-with-buttons input {
  flex: 1;
}

.button-controls {
  display: flex;
  flex-direction: column;
  margin-left: 10px;
}

.button-controls button {
  height: 24px;
  width: 24px;
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  padding: 0;
  line-height: 1;
}

.button-controls button:first-child {
  margin-bottom: 4px;
}

.button-controls button:hover {
  background-color: #eee;
}

/* Unit toggle */
.toggle-container {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}

.unit-toggle {
  flex: 1;
  padding: 10px;
  text-align: center;
  background-color: #f8f8f8;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.unit-toggle.active {
  background-color: #4299e1;
  color: white;
  font-weight: 500;
}

/* Calculate button */
.calculate-button {
  width: 100%;
  padding: 12px;
  background-color: #4299e1;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.calculate-button:hover {
  background-color: #3b82f6;
}

/* Results */
.bmr-calculator-results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .bmr-calculator-results {
    grid-template-columns: repeat(3, 1fr);
  }
}

.result-card {
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result-value {
  font-size: 32px;
  font-weight: 700;
  color: #4299e1;
  margin: 10px 0;
}

.result-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.result-description {
  font-size: 12px;
  color: #999;
}

.result-category {
  font-size: 18px;
  font-weight: 600;
  margin: 10px 0;
}

/* BMI Scale */
.bmi-scale {
  margin-top: 15px;
}

.bmi-scale-bar {
  height: 8px;
  background: linear-gradient(to right, 
    #3b82f6 0%, #3b82f6 20%,
    #22c55e 20%, #22c55e 40%, 
    #eab308 40%, #eab308 60%,
    #ef4444 60%, #ef4444 100%
  );
  border-radius: 4px;
  position: relative;
  margin-bottom: 5px;
}

.bmi-scale-indicator {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #fff;
  border: 2px solid #333;
  border-radius: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: left 0.3s ease;
}

.bmi-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
}