/**
 * AP Physics 1 Calculator Styles
 */

/* Container */
.ap-physics-calculator-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: "Roboto", "Open Sans", sans-serif;
  color: #333;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Typography */
.ap-physics-calculator-title {
  color: #003366;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.ap-physics-calculator-section-title {
  color: #003366;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  border-bottom: 2px solid #ffd700;
  padding-bottom: 5px;
}

.ap-physics-calculator-section-description {
  font-size: 14px;
  margin-bottom: 15px;
  color: #555;
}

/* Sections */
.ap-physics-calculator-section {
  margin-bottom: 30px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 6px;
  border-left: 4px solid #003366;
}

/* Form Elements */
.ap-physics-calculator-form {
  margin-bottom: 30px;
}

.ap-physics-calculator-input-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 15px;
  position: relative;
}

.ap-physics-calculator-label {
  flex: 0 0 150px;
  font-weight: 500;
  color: #003366;
}

.ap-physics-calculator-input {
  flex: 1;
  max-width: 100px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

.ap-physics-calculator-input:focus {
  border-color: #003366;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.2);
}

.ap-physics-calculator-input-suffix {
  margin-left: 10px;
  color: #666;
}

.ap-physics-calculator-error {
  color: #d32f2f;
  font-size: 12px;
  margin-top: 5px;
  display: block;
  width: 100%;
  margin-left: 150px;
}

/* Buttons */
.ap-physics-calculator-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.ap-physics-calculator-button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
}

.ap-physics-calculator-button:hover {
  transform: translateY(-2px);
}

.ap-physics-calculator-button:active {
  transform: translateY(0);
}

.ap-physics-calculator-button-primary {
  background-color: #003366;
  color: #ffffff;
}

.ap-physics-calculator-button-primary:hover {
  background-color: #002244;
}

.ap-physics-calculator-button-secondary {
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ccc;
}

.ap-physics-calculator-button-secondary:hover {
  background-color: #e0e0e0;
}

/* Results */
.ap-physics-calculator-results {
  margin-top: 30px;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.ap-physics-calculator-results-title {
  color: #003366;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 15px;
  text-align: center;
}

.ap-physics-calculator-results-section {
  margin-bottom: 20px;
}

.ap-physics-calculator-results-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.ap-physics-calculator-results-label {
  font-weight: 500;
  color: #555;
}

.ap-physics-calculator-results-value {
  font-weight: 600;
  color: #003366;
}

.ap-physics-calculator-results-total,
.ap-physics-calculator-results-ap-score {
  margin-top: 15px;
  padding: 10px;
  background-color: #f0f7ff;
  border-radius: 4px;
  font-size: 18px;
}

.ap-physics-calculator-results-ap-score .ap-physics-calculator-results-value {
  font-size: 24px;
  color: #003366;
  font-weight: 700;
}

.ap-physics-calculator-results-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.ap-physics-calculator-export-group {
  display: flex;
  gap: 10px;
}

/* History */
.ap-physics-calculator-history {
  margin-top: 30px;
}

.ap-physics-calculator-history-title {
  color: #003366;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
}

.ap-physics-calculator-history-content {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .ap-physics-calculator-container {
    max-width: 90%;
  }
}

@media (max-width: 768px) {
  .ap-physics-calculator-input-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .ap-physics-calculator-label {
    flex: 0 0 100%;
    margin-bottom: 5px;
  }

  .ap-physics-calculator-input {
    width: 100%;
    max-width: none;
  }

  .ap-physics-calculator-error {
    margin-left: 0;
  }

  .ap-physics-calculator-results-actions {
    flex-direction: column;
    gap: 10px;
  }

  .ap-physics-calculator-export-group {
    justify-content: space-between;
  }
}

@media (max-width: 320px) {
  .ap-physics-calculator-container {
    padding: 10px;
  }

  .ap-physics-calculator-title {
    font-size: 24px;
  }

  .ap-physics-calculator-button {
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* Accessibility */
.ap-physics-calculator-input:focus,
.ap-physics-calculator-button:focus {
  outline: 2px solid #003366;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* AP Brand Colors */
.ap-physics-calculator-container {
  --ap-blue: #003366;
  --ap-white: #ffffff;
  --ap-gold: #ffd700;
}
