.form-group {
  margin-bottom: 24px;
}
.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #222222;
  font-size: 16px;
}
.form-label .required {
  color: #e74c3c;
  margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  background-color: #ffffff;
  color: #222222;
  transition: border-color 250ms ease-in-out ease-in-out, box-shadow 250ms ease-in-out ease-in-out;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #8b0e0e;
  box-shadow: 0 0 0 3px rgba(139, 14, 14, 0.1);
}
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background-color: #f8f8f8;
  color: #999999;
  cursor: not-allowed;
}
.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}
.form-input.success,
.form-select.success,
.form-textarea.success {
  border-color: #27ae60;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}
@media (min-width: 768px) {
  .form-textarea {
    min-height: 150px;
  }
}

.form-text {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: #666666;
}

.form-error {
  color: #e74c3c;
  font-weight: 600;
}

.form-success {
  color: #27ae60;
  font-weight: 600;
}

.form-checkbox,
.form-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
}
.form-checkbox input,
.form-radio input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #8b0e0e;
}
@media (min-width: 768px) {
  .form-checkbox input,
  .form-radio input {
    width: 20px;
    height: 20px;
  }
}
.form-checkbox label,
.form-radio label {
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
}
.form-checkbox:last-child,
.form-radio:last-child {
  margin-bottom: 0;
}

.form-checkbox input {
  border-radius: 4px;
}

.form-radio input {
  border-radius: 9999px;
}

.form-checkbox-group,
.form-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}
@media (min-width: 1024px) {
  .form-row {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 768px) {
  .form-row.form-row-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .form-row.form-row-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.form-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e0e0e0;
}
.form-section:last-child {
  margin-bottom: 0;
  border-bottom: none;
}
.form-section h3 {
  margin-bottom: 16px;
}

.search-form {
  position: relative;
  display: flex;
  gap: 8px;
}
@media (min-width: 768px) {
  .search-form {
    gap: 12px;
  }
}
.search-form input {
  flex: 1;
  min-width: 0;
}
.search-form button {
  flex-shrink: 0;
}

input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}
input[type=number][type=number] {
  -moz-appearance: textfield;
}

.form-number {
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-number input {
  flex: 1;
  text-align: center;
}
.form-number button {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #f8f8f8;
  font-weight: 700;
  color: #222222;
  transition: background-color 250ms ease-in-out ease-in-out;
}
.form-number button:disabled {
  cursor: not-allowed;
}
.form-number button:hover {
  background-color: #e0e0e0;
}
.form-number button:active {
  background-color: #c4c4c4;
}

.form-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}
@media (min-width: 768px) {
  .form-actions {
    gap: 24px;
    justify-content: flex-end;
  }
}
.form-actions button,
.form-actions input[type=submit] {
  flex: 1 1 auto;
}
@media (min-width: 768px) {
  .form-actions button,
  .form-actions input[type=submit] {
    flex: 0 1 auto;
  }
}

.form-floating {
  position: relative;
}
.form-floating label {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 16px;
  font-weight: 400;
  color: #666666;
  pointer-events: none;
  transition: top 250ms ease-in-out ease-in-out, font-size 250ms ease-in-out ease-in-out, color 250ms ease-in-out ease-in-out;
}
.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label {
  top: -12px;
  font-size: 14px;
  color: #8b0e0e;
  font-weight: 600;
}
.form-floating input {
  padding-top: 16px;
}

.password-toggle {
  position: relative;
}
.password-toggle .toggle-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px;
  cursor: pointer;
  color: #666666;
  transition: color 250ms ease-in-out ease-in-out;
}
.password-toggle .toggle-btn:disabled {
  cursor: not-allowed;
}
.password-toggle .toggle-btn:hover {
  color: #222222;
}
.password-toggle .toggle-btn svg {
  width: 20px;
  height: 20px;
}

.woocommerce-order-received .woocommerce-order-details .retragere.order-actions-button {
    width: auto !important;
}