* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.back-btn {
  position: absolute;
  left: 20px;
  top: 20px;
  background: transparent;
  border: 2px solid #505055;
  color: #505055;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: #505055;
  color: white;
  transform: translateX(-2px);
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: white;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.form-header {
  background: white;
  color: #1b5581;
  padding: 40px 30px;
  text-align: center;
  position: relative;
}

.language-switcher {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
}

.lang-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  color: #33a5fc;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.lang-btn.active {
  background: white;
  color: #1b5581;
  border-color: white;
}

.form-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.form-header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.form-content {
  padding: 40px 30px;
}

.form-grid {
  display: grid;
  gap: 25px;
}

.form-row {
  display: grid;
  gap: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
  font-size: 0.95rem;
}

.required {
  color: #e74c3c;
  font-weight: bold;
}

.form-group {
  width: 100%;
  margin-bottom: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
  transform: translateY(-2px);
  width: 100%;
}

.submit-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #144164 0%, #4b96fa 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.success-message,
.error-message {
  padding: 15px;
  border-radius: 12px;
  margin-top: 20px;
  text-align: center;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.success-message {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.success-message.show,
.error-message.show {
  opacity: 1;
  transform: translateY(0);
}

.consent-section {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.consent-section:focus-within {
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: #4facfe;
  flex-shrink: 0;
  margin-top: 2px;
}

.consent-text {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
  display: inline;
}

.privacy-toggle {
  color: #4facfe;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  margin-left: 5px;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.privacy-toggle:hover {
  color: #2980b9;
  text-decoration: underline;
}

.privacy-details {
  margin-top: 15px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e1e8ed;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  opacity: 0;
}

.privacy-details.expanded {
  max-height: 500px;
  opacity: 1;
  margin-top: 15px;
}

.privacy-details h4 {
  color: #333;
  font-weight: 600;
  margin: 15px 0 8px 0;
  font-size: 1rem;
}

.privacy-details h4:first-child {
  margin-top: 0;
}

.privacy-details ul {
  margin: 8px 0 15px 20px;
  color: #666;
}

.privacy-details li {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.privacy-details p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

.consent-error {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-top: 8px;
  display: none;
}

/* Thai font support - Using Noto Sans Thai */
/* body[data-lang="th"] {
  font-family: Noto Sans Thai;
}
body[data-th] {
  font-family: Noto Sans Thai;
font-family: 'Noto Sans Thai', sans-serif;
} */

body[data-lang="th"],
body[data-placeholder-th],
body[data-th] {
  font-family: 'Noto Sans Thai', 'Tahoma', 'Arial', sans-serif;

}

[data-th],
[data-placeholder-th],
[data-lang="th"] h1,
[data-lang="th"] label {
  font-family: 'Noto Sans Thai', 'Tahoma', 'Arial', sans-serif;

}

@media (min-width: 768px) {
  body {
    padding: 40px 20px;
  }

  .form-header {
    padding: 60px 40px;
  }

  .form-header h1 {
    font-size: 2.5rem;
  }

  .form-content {
    padding: 50px 40px;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .form-group.full-width {
    grid-column: 1 / -1;
  }

  /* Company Name and Your Name fields full width on desktop */
  .form-row:first-child,
  .form-row:nth-child(2) {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  body {
    padding: 10px;
  }

  .language-switcher {
    position: static;
    justify-content: center;
    margin-bottom: 20px;
  }

  .form-header {
    padding: 30px 20px;
  }

  .form-header h1 {
    font-size: 1.8rem;
  }

  .form-content {
    padding: 30px 20px;
  }

  .privacy-details.expanded {
    max-height: 400px;
  }
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

/* CAPTCHA Modal Styles */
.captcha-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.captcha-overlay.show {
  opacity: 1;
  visibility: visible;
}

.captcha-modal {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  transform: scale(0.8) translateY(20px);
  transition: all 0.3s ease;
}

.captcha-overlay.show .captcha-modal {
  transform: scale(1) translateY(0);
}

.captcha-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

.captcha-subtitle {
  color: #666;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.captcha-question {
  background: linear-gradient(135deg, #1f6194 0%, #4b96fa 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.captcha-input {
  width: 100%;
  padding: 15px;
  border: 2px solid #e1e8ed;
  border-radius: 12px;
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 25px;
  transition: all 0.3s ease;
}

.captcha-input:focus {
  outline: none;
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.captcha-input.error {
  border-color: #e74c3c;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.captcha-buttons {
  display: flex;
  gap: 15px;
}

.captcha-btn {
  flex: 1;
  padding: 15px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.captcha-verify {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  color: white;
}

.captcha-verify:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3);
}

.captcha-cancel {
  background: #f8f9fa;
  color: #666;
  border: 2px solid #e9ecef;
}

.captcha-cancel:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.captcha-error {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.captcha-error.show {
  opacity: 1;
}

.captcha-refresh {
  background: none;
  border: none;
  color: #4facfe;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
  margin-top: 15px;
  transition: color 0.3s ease;
}

.captcha-refresh:hover {
  color: #667eea;
}
