/* =========================================
   SHARED FORM STYLES
   Used by: edit-profile, experiences, languages, password
   ========================================= */

/* Page Layout Base */
.form-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-body);
}

/* Form Shell - wrapper for breadcrumb + card alignment */
.form-shell {
  width: 100%;
  max-width: var(--site-width-sm);
  margin: 0 auto;
}

.form-shell--narrow {
  max-width: 480px;
}

/* Form Container - the white card */
.form-container {
  width: 100%;
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .form-container {
    padding: var(--spacing-xl) 2.5rem;
  }
}

/* Form Title & Subtitle */
.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin: 0 0 var(--spacing-xs) 0;
}

.form-subtitle {
  font-size: 0.9rem;
  color: var(--text-grey);
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

/* Form Layout - applies to all form containers */
.form-fields,
.profile-form,
.experience-form,
.password-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

/* Form Row (2 columns) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Form Field */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* Input Base Styles */
.form-field input,
select,
.form-field textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  background: white;
  border: 1.5px solid #e0e0e0;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  outline: none;
}
.form-field select{
  padding-block: .9rem;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #b0b0b0;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 4px rgba(106, 62, 235, 0.08);
}

.form-field input.input-error,
.form-field textarea.input-error {
  border-color: #ef4444;
}

.form-field input.input-error:focus,
.form-field textarea.input-error:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.form-field input:disabled {
  background: #f8f8f8;
  color: #b0b0b0;
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

/* Error Message */
.error-message {
  font-size: 0.75rem;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Select Trigger (Shadcn override) */
.select-trigger {
  width: 100%;
  padding: 1rem 1.25rem !important;
  height: auto !important;
  font-size: 1rem !important;
  background: white !important;
  border: 1.5px solid #e0e0e0 !important;
  border-radius: var(--radius-md) !important;
}

.select-trigger:focus {
  border-color: var(--primary-purple) !important;
  box-shadow: 0 0 0 4px rgba(106, 62, 235, 0.08) !important;
}

/* Form Actions (bottom row) */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-top: var(--spacing-md);
}

/* Back Link */
.back-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: -0.5rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--primary-purple);
}

/* Submit Button */
.submit-btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: white;
  background: var(--primary-purple);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-btn:hover {
  background: var(--primary-purple-dark);
}

/* Full Width Submit Button variant */
.submit-btn--full {
  width: 100%;
  padding: 1rem;
  margin-top: var(--spacing-sm);
}

.submit-btn--full:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(106, 62, 235, 0.3);
}

.submit-btn--full:active {
  transform: translateY(0);
}

/* Checkbox Field */
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.checkbox-label {
  font-size: 0.9rem;
  color: var(--text-dark);
  cursor: pointer;
}

/* Character Count */
.char-count {
  font-size: 0.75rem;
  color: var(--text-grey);
  text-align: right;
}

/* Input with Icon (right side) */
.input-wrapper {
  position: relative;
}

.input-wrapper input {
  padding-right: 3rem;
}

.input-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #b0b0b0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-icon--interactive {
  pointer-events: auto;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.input-icon--interactive:hover {
  color: var(--primary-purple);
}

button[role="checkbox"]{
  width: 20px;
  height: 20px;
  border: 1.5px solid #e0e0e0;
  background: transparent;
  border-radius: 4px;
}
button[role="checkbox"] .span[data-state="checked"] svg{
  translate: 0px -2px;
  font-size: 1rem;
  color: var(--primary-purple);
  width: 18px;
}