/* ===============================================
   Astravon Mercura — Global Forms
   Author: House Astravon
   =============================================== */

/* Base Form Styles */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  font-family: 'Poppins', sans-serif;
}

/* Input, Textarea, Select */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid #ccc;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 120, 255, 0.15);
}

/* Placeholder Styling */
::placeholder {
  color: #aaa;
  font-style: italic;
}

/* Labels */
label {
  font-weight: 600;
  margin-bottom: 0.3rem;
  display: inline-block;
}

/* Validation Messages */
.form-error {
  color: #e74c3c;
  font-size: 0.875rem;
  margin-top: 0.2rem;
}

.form-success {
  color: #27ae60;
  font-size: 0.875rem;
  margin-top: 0.2rem;
}

/* Checkbox / Radio */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin-right: 0.5rem;
}

/* Form Buttons */
form .btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* Disabled Inputs */
input:disabled,
textarea:disabled,
select:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

/* Grouped Inputs */
.input-group {
  display: flex;
  gap: 0.5rem;
}

/* Inline Errors */
.input-error {
  border-color: #e74c3c;
}

/* Floating Labels (Optional Enhancement) */
.form-floating {
  position: relative;
}

.form-floating input,
.form-floating textarea {
  padding-top: 1.5rem;
}

.form-floating label {
  position: absolute;
  top: 0.4rem;
  left: 1rem;
  font-size: 0.875rem;
  color: #aaa;
  pointer-events: none;
  transition: all 0.2s ease-out;
}

.form-floating input:focus + label,
.form-floating textarea:focus + label,
.form-floating input:not(:placeholder-shown) + label,
.form-floating textarea:not(:placeholder-shown) + label {
  top: -0.5rem;
  left: 0.75rem;
  font-size: 0.75rem;
  color: var(--primary-color);
  background-color: #fff;
  padding: 0 0.25rem;
}
