/* Custom Job Application Form Styles */

.job-form-section #job_application_form_uniqueid_form {
  /* Consider making this ID more dynamic if multiple forms on one page */
  max-width: 600px;
  margin: 20px auto;
  padding: 25px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.job-form-section .job-form-message {
  padding: 12px 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  display: none; /* Hidden by default, shown by JS */
}

.job-form-section .job-form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.job-form-section .fild-row {
  display: flex;
  gap: 20px; /* Space between first name and last name fields */
  margin-bottom: 15px;
}

.job-form-section .fild-item {
  margin-bottom: 15px;
  flex: 1; /* For fild-row children, makes them take equal width */
}

.job-form-section .fild-item:not(.fild-row .fild-item) {
  width: 100%; /* Ensure single fields take full width */
}

.job-form-section .fild-item label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.job-form-section .fild-item input[type="text"],
.job-form-section .fild-item input[type="email"],
.job-form-section .fild-item input[type="tel"],
.job-form-section .fild-item input[type="url"],
.job-form-section .fild-item textarea {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid #ccccd3;
  border-radius: 0;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  color: #40424d;
  font-feature-settings: "liga" off, "clig" off;
  font-family: "Fivo Sans";
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 110%; /* 17.6px */
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.job-form-section .fild-item input[type="text"]::placeholder,
.job-form-section .fild-item input[type="email"]::placeholder,
.job-form-section .fild-item input[type="tel"]::placeholder,
.job-form-section .fild-item input[type="url"]::placeholder,
.job-form-section .fild-item textarea::placeholder,
.job-form-section label.placeholder-label {
  color: var(--Medium-Gray, #aaaac5);
  font-feature-settings: "liga" off, "clig" off;
  font-family: "Fivo Sans";
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 110%; /* 17.6px */
}

.job-form-section .fild-item input[type="text"]:focus,
.job-form-section .fild-item input[type="email"]:focus,
.job-form-section .fild-item input[type="tel"]:focus,
.job-form-section .fild-item input[type="url"]:focus,
.job-form-section .fild-item textarea:focus {
  border-color: #4dbdfe;
  outline: 0;
}

.job-form-section .fild-item.error input,
.job-form-section .fild-item.error textarea {
  border-color: #e45d6b; /* Red border for errors */
}

.job-form-section .error-message {
  color: #e45d6b; /* Red text for error messages */
  font-size: 0.9em;
  margin-top: 5px;
  display: none; /* Hidden by default, shown by JS */
}

.job-form-section .fild-item.error .error-message {
  display: block;
}

/* Drag and Drop Area */
.job-form-section .job-form-drag-drop {
  border: 2px dashed #a0a0a0;
  background-color: transparent;
  padding: 25px;
  text-align: center;
  cursor: pointer;
  margin: 10px 0 20px;
  border-radius: 5px;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.job-form-section .job-form-drag-drop:hover,
.job-form-section .job-form-drag-drop.dragover {
  background-color: #f0f8ff;
  border-color: #007bff;
}

.job-form-section .job-form-drag-drop div:first-child {
  font-weight: 600;
  color: #555;
  margin-bottom: 5px;
}

.job-form-section .job-form-drag-drop div:last-child {
  font-size: 0.9em;
  color: #777;
}

.job-form-section .job-form-file-list {
  margin-top: 15px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.job-form-section .job-form-file-item {
  display: flex;
  align-items: center;
  margin: 8px 0;
  padding: 8px 0;
  border-bottom: 1px dashed #f0f0f0;
}

.job-form-section .job-form-file-item:last-child {
  border-bottom: none;
}

.job-form-section .job-form-file-item span {
  flex-grow: 1;
  font-style: italic;
  color: #555;
  word-break: break-all; /* Ensures long file names wrap */
}

.job-form-section .job-form-file-item button {
  margin-left: 15px;
  color: #e45d6b;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  padding: 5px 10px;
  border-radius: 3px;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.job-form-section .job-form-file-item button:hover {
  color: #fff;
  background-color: #e45d6b;
}

/* Checkbox styles */
.job-form-section .fild-item-checkbox {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Align checkbox and text at the top */
}

.job-form-section .fild-item-checkbox label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-weight: normal; /* Override bold from .fild-item label */
  color: #333;
}

.job-form-section .error-message {
  font-size: 12px;
}

.job-form-section .fild-item-checkbox input[type="checkbox"] {
  margin-top: 0; /* Adjust for vertical alignment with text */
  margin-right: 8px;
  flex-shrink: 0; /* Prevent checkbox from shrinking */
}

.job-form-section .checkbox-label {
  line-height: 1.4;
  font-size: 0.95em;
  color: #555;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .job-form-section .fild-row {
    flex-direction: column;
    gap: 0;
  }
}

.ty-message {
  display: flex;
  padding: 15px 22px 15px 12px;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  background: var(--light-green, #eaf7ed);
}

.ty-message strong {
  color: var(--dark-green, #53ba6b);
  font-family: "Fivo Sans";
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: 100%; /* 18px */
  display: block;
  margin-bottom: 5px;
}

.ty-message span {
  color: var(--dark-green, #53ba6b);
  font-family: Manrope;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 140%; /* 19.6px */
}

.ty-message .ty-text {
  text-align: left;
}

.ty-message svg {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
}

.job-form-message.success {
  background: transparent;
  padding: 0;
  display: block !important;
}

.job-form-message.success + form {
  display: none;
}
