:root {
  --primary-color: #0089CF;
  --secondary-color: #FF5000;
  --background-color: #F8F8F8; /* Light gray */
  --text-color: #333;
  --border-color: #DDD;
  --white-color: #FFFFFF;
}

body {
  font-family: 'Kanit', sans-serif;
  margin: 0;
  padding: 20px;
  background-color: var(--background-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; /* Changed to 100vh to ensure it fills the screen for both forms */
  box-sizing: border-box;
}

.container {
  background-color: var(--white-color);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
}

h1 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 30px;
  font-weight: 700;
}

.gdh-logo {
  display: block;
  margin: 0 auto 20px auto; /* Center the logo and add space below */
  max-width: 150px; /* Adjust size as needed */
  height: auto;
}

.form-section {
  margin-bottom: 25px;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--white-color);
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="url"], /* Added for URL inputs */
textarea,
select {
  width: calc(100% - 20px);
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: 'Kanit', sans-serif;
  font-size: 16px;
  box-sizing: border-box;
}

/* Mobile responsiveness for radio/checkbox groups */
.radio-group, .checkbox-group {
  margin-top: 10px;
  display: flex; /* Use flexbox */
  flex-wrap: wrap; /* Allow items to wrap to the next line */
  gap: 10px; /* Space between items */
}

.radio-group div, .checkbox-group div {
  display: flex;
  align-items: center;
}

.radio-group label, .checkbox-group label {
  display: inline-block; /* Keep labels next to input */
  margin-right: 0; /* Remove fixed margin */
  margin-bottom: 0; /* Remove default block margin */
  font-weight: 400;
}

/* Ensure inputs are aligned with labels */
.radio-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
  margin-right: 8px;
  margin-top: 0; /* Align vertically */
}

.tooltip {
  font-size: 0.9em;
  color: #666;
  margin-top: 5px;
  display: block;
}

button {
  background-color: var(--secondary-color);
  color: var(--white-color);
  padding: 15px 25px;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s ease;
  margin-top: 30px;
}

button:hover {
  background-color: #E64A00; /* Darker orange */
}

button:disabled {
  background-color: #CCC;
  cursor: not-allowed;
}

.error-message {
  color: var(--secondary-color);
  font-size: 0.9em;
  margin-top: 5px;
  display: block;
}

.success-message {
  color: var(--primary-color);
  font-size: 1.1em;
  text-align: center;
  margin-top: 20px;
  font-weight: 500;
}

.loading-spinner {
    display: none;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles for dynamic URL inputs */
.url-input-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.url-input-group input {
    flex-grow: 1;
    margin-right: 10px;
}
.url-input-group button {
    width: auto;
    padding: 8px 12px;
    font-size: 14px;
    margin-top: 0;
    background-color: #6c757d; /* Gray for remove button */
}
.url-input-group button:hover {
    background-color: #5a6268;
}
.add-url-button {
    background-color: var(--primary-color);
    margin-top: 10px;
    padding: 10px 15px;
    font-size: 16px;
    width: auto;
}
.add-url-button:hover {
    background-color: #007bbd;
}

/* Message for no open positions */
.no-openings-message {
  text-align: center;
  color: var(--secondary-color);
  font-size: 1.2em;
  margin-top: 20px;
  font-weight: 500;
}

/* เพิ่มส่วนนี้ลงไปท้ายไฟล์ styles.css หรือในส่วนที่จัดการฟอร์ม */
#applicationForm {
  display: none;
}