/* === Wrapper === */
.calc-wrapper {
  display: flex;
  justify-content: center;
  margin: 20px auto;
}

/* === Calculator card === */
.calculator-card {
  background-color: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0px 4px 15px rgba(0,0,0,0.15);
  max-width: 400px;
  text-align: center;
}

/* === Mode label (rubrik över knappar) === */
.mode-label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
  text-align: center;
}



/* === Toggle === */
.calc-toggle {
  display: inline-flex;
  border: 2px solid #2196F3;
  border-radius: 25px;
  overflow: hidden;
  margin: 15px 0;
}
.calc-toggle button {
  padding: 6px 14px;
  border: none;
  background: #f0f0f0;
  font-size: 14px;
  cursor: pointer;
  flex: 1;
  transition: background 0.3s, color 0.3s;
  color: #333;
}
.calc-toggle button.active {
  background: #2196F3;
  color: #fff;
}

/* === Input === */
.calc-input {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.calc-input input {
  padding: 6px 10px;
  font-size: 16px;
  width: 120px;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-align: center;
}
.calc-input span {
  font-weight: bold;
}

/* === Vertikal layout för inputs === */
.calc-input.vertical {
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  margin-bottom: 12px;
}

.calc-input.vertical label {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 5px;
}

.calc-input.vertical input {
  width: 90%;
}


/* === Knapp === */
.calc-button {
  background-color: #2196F3;
  color: #fff;
  border: none;
  padding: 10px 18px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 10px;
}
.calc-button:hover {
  background-color: #1976D2;
}
.calc-button.disabled,
.calc-button:disabled {
  background-color: #ccc !important;
  color: #666 !important;
  cursor: not-allowed;
  box-shadow: none;
}



/* === Resultat === */
.resultat, .calc-result {
  min-height: 30px;
  margin-top: 15px;
  font-weight:bold;
  display:block;
  word-wrap: break-word;
  clear:both;
  font-size:1.5rem;
}


/* tillfälliga fixar - borde kunna regleras bort sen efter byte - kolla alla <form> styling */

#article form {border:none !important; width:unset;}
#message_ajax,
#message_ajax_2 {
  display: block !important;
  width: auto !important;
}

/* === Invalid inputs UX === */
.invalid-input {
  border-color: #e53935 !important;
  background-color: #ffeaea !important;
}

.field-error {
  color: #e53935;
  font-size: 13px;
  margin-top: 4px;
  font-weight: 500;
}



/* === Tempo-fält: två inputs bredvid varandra === */
.pace-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px; /* avstånd mellan fälten */
  flex-wrap: nowrap;
}

.pace-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pace-field input[type="number"] {
  width: 70px;
  text-align: center;
  padding: 6px 8px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.pace-label {
  font-weight: 600;
  color: #555;
  font-size: 14px;
}
