/* --- Base Styles & Resets --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Sarabun", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f8fafc;
  color: #1e293b;
}

.main-content {
  flex-grow: 1;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.5; /* เพิ่มระยะห่างระหว่างบรรทัด */
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Small text และ muted text */
small, .small, .text-muted {
  line-height: 1.6 !important; /* เพิ่มระยะห่างระหว่างบรรทัด */
}

/* --- Premium Public Form Styles --- */
.premium-form-card {
  background: #ffffff;
  border-radius: 20px;
  border: 2px solid #000000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 2.5rem;
  margin-bottom: 3rem;
  transition: transform 0.3s ease;
}

.premium-title {
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 15px;
}

.premium-title i {
  color: #2e93ff;
}

.form-label-premium {
  font-weight: 600;
  color: #334155;
  font-size: 1rem;
  margin-bottom: 8px;
  display: block;
  line-height: 1.5; /* เพิ่มระยะห่างระหว่างบรรทัด */
}

.form-control-premium {
  background: #ffffff;
  border: 1px solid #475569;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1.1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  color: #1e293b;
  width: 100%;
  margin-bottom: 20px;
  font-family: "Sarabun", sans-serif;
}

.form-control-premium:focus {
  background: #ffffff;
  border-color: #2e93ff;
  box-shadow: 0 0 0 4px rgba(46, 147, 255, 0.1);
  outline: none;
}

.form-control-premium.is-invalid {
  border-color: #dc3545 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control-premium.is-valid {
  border-color: #198754 !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Select dropdown styles */
select.form-control-premium {
  color: #1e293b !important;
  background-color: #ffffff !important;
  appearance: auto;
}

select.form-control-premium option {
  color: #1e293b !important;
  background-color: #ffffff !important;
  padding: 10px;
}

.form-select.border-2 {
  border-color: #475569 !important;
  color: #1e293b !important;
  font-size: 1.1rem !important;
  font-family: "Sarabun", sans-serif;
  font-weight: 600 !important;
}

.form-select.border-2:focus {
  border-color: #2e93ff !important;
  box-shadow: 0 0 0 4px rgba(46, 147, 255, 0.1) !important;
}

.privacy-container {
  background: #f8fafc;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.form-check-input:checked {
  background-color: #198754;
  border-color: #198754;
}

.btn-submit-green {
  background: linear-gradient(135deg, #198754, #146c43);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-weight: 700;
  font-size: 1.1rem;
  width: 100%;
  box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-submit-green:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25, 135, 84, 0.4);
}

.btn-submit-green:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #6c757d;
  box-shadow: none;
}

.btn-reset-grey {
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-weight: 700;
  font-size: 1.1rem;
  width: 100%;
  transition: all 0.3s ease;
}

.btn-reset-grey:hover {
  background: #5a6268;
}

.btn-search-blue {
  background: linear-gradient(135deg, #2e93ff, #1565c0);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-weight: 700;
  font-size: 1.1rem;
  width: 100%;
  box-shadow: 0 4px 15px rgba(46, 147, 255, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-search-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46, 147, 255, 0.4);
}



.form-section-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 2rem 0;
}

.premium-footer {
  background: #ffffff;
  color: #64748b;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid #f1f5f9;
  font-weight: 500;
}

/* --- Animations & UI Effects --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

.premium-form-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.btn-submit-premium {
  position: relative;
  overflow: hidden;
}

.btn-submit-premium::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}

.btn-submit-premium:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

.table {
  color: #1e293b !important;
}

.table thead th {
  color: #334155 !important;
  font-weight: 700 !important;
}

.table tbody td {
  color: #1e293b !important;
  font-weight: 500 !important;
}

.table tbody tr {
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.table tbody tr:hover {
  background-color: rgba(46, 147, 255, 0.02) !important;
  transform: scale(1.002);
}

/* --- Timeline Styles (for Tracking) --- */
.timeline {
  position: relative;
  padding-left: 3rem;
  margin-top: 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e9ecef;
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -3rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #2e93ff;
  z-index: 1;
}

.timeline-content {
  background: #f8fafc;
  padding: 1.25rem 1.75rem;
  border-radius: 15px;
  border: 1px solid #edf2f7;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* --- Responsive Mobile Styles --- */
@media (max-width: 768px) {
  label, .form-label-premium {
    line-height: 1.6 !important; /* เพิ่มระยะห่างให้มากขึ้นบน mobile */
    font-size: 0.95rem;
  }

  small, .small, .text-muted {
    line-height: 1.7 !important; /* เพิ่มระยะห่างให้มากขึ้นบน mobile */
    display: inline-block;
  }

  .form-control-premium {
    font-size: 1rem;
  }

  .premium-form-card {
    padding: 1.5rem 1rem;
  }

  h5, .h5 {
    line-height: 1.6 !important;
  }
}