:root {
  --primary: #4361ee;
  --primary-dark: #3a0ca3;
  --secondary: #3f37c9;
  --accent: #f72585;
  --light: #f8f9fa;
  --dark: #212529;
  --success: #4cc9f0;
  --warning: #f8961e;
  --danger: #ef233c;
  --gray: #6c757d;
  --shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f5f7ff;
  color: var(--dark);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navbar */
.navbar {
  /* background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; */
  /* padding: 1rem 0; */
  /* box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100; */
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-brand span {
  color: #ffcc00;
}

/* Track Form */
.track-product-heading {
  text-align: center;
  margin: 1rem 0;
  animation: fadeIn 0.5s ease-out;
}

.track-product-heading .heading {
  font-size: 2.5rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.track-product-heading .para {
  color: var(--gray);
  font-size: 1.1rem;
}

.track-form {
  max-width: 500px;
  margin: 0 auto;
  padding: 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: var(--shadow);
  /* Disable entrance animation to prevent bouncing */
  animation: none;
}

.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-group i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  transition: none;
}

.form-group.floating input {
  width: 100%;
  padding: 1rem 1rem 1rem 45px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
  /* Disable transitions to avoid bounce/jump */
  transition: none;
  background: #f9f9f9;
}

.form-group.floating label {
  position: absolute;
  left: 12px;           /* place label near left edge */
  top: -8px;            /* keep label fixed above input */
  transform: none;      /* no movement */
  color: var(--gray);
  pointer-events: none;
  transition: none;     /* no animation */
  background: white;    /* match input bg to avoid overlap */
  padding: 0 6px;
  font-size: 12px;
}

/* Keep label static; do not shift on focus/valid */
.form-group.floating input:focus ~ label,
.form-group.floating input:valid ~ label {
  top: -8px;
  transform: none;
  color: var(--gray);
}

.form-group.floating input:focus,
.form-group.floating input:valid {
  border-color: var(--primary);
  background: white;
  /* Remove focus glow to keep steady */
  box-shadow: none;
}

/* Keep icon color steady */
.form-group.floating input:focus ~ i,
.form-group.floating input:valid ~ i {
  color: var(--gray);
}

.btn-track {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-track:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
}

.btn-track:active {
  transform: translateY(0);
}

.btn-icon {
  display: flex;
  align-items: center;
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: white;
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

/* Track ID modal refinements: smaller, steady (no slide), tighter paddings */
#trackIdModal .modal-container {
  max-width: 480px;
  transform: none;
  transition: none;
  border-radius: 16px;
}
#trackIdModal .modal-header {
  padding: 1rem 1.25rem;
  text-align: center;
}
#trackIdModal .modal-body {
  padding: 1rem 1.25rem 1.25rem;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  border-radius: 15px 15px 0 0;
}

.modal-header h2 {
  color: var(--primary-dark);
  font-size: 1.5rem;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--danger);
  transform: rotate(90deg);
}

.modal-body {
  padding: 1.5rem;
}

/* Tracking Header */
.tracking-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.tracking-header h3 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.route {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray);
  font-size: 0.9rem;
}

.route i {
  color: var(--primary);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10px;
  height: 100%;
  width: 2px;
  background: var(--primary);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}

.timeline-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
}

.timeline-item.current {
  background: rgba(67, 97, 238, 0.05);
  border-radius: 8px;
  padding: 1rem;
  margin-left: -1rem;
}

.timeline-item.current h4 {
  color: var(--accent);
}

.timeline-item h4 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.timeline-item p {
  color: var(--gray);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-item p i {
  color: var(--primary);
  width: 16px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .track-product-heading .heading {
    font-size: 2rem;
  }
  
  .track-form {
    padding: 1.5rem;
  }
  
  .modal-container {
    width: 95%;
  }
}

@media (max-width: 576px) {
  .track-form {
    padding: 1rem;
  }
  
  .form-group.floating input {
    padding-left: 40px;
    font-size: 0.9rem;
  }
  
  .timeline-item h4 {
    font-size: 0.95rem;
  }
  
  .timeline-item p {
    font-size: 0.85rem;
  }
}

/* for selcting the service type */
/* Style select like floating input */
.form-group.floating select {
  width: 100%;
  padding: 12px 40px 12px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: white;
  font-size: 16px;
  color: #333;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
}

.form-group.floating select:focus {
  border-color: #007bff;
  outline: none;
}

/* Show dropdown arrow inside */
.form-group.floating select::after {
  content: '\f078'; /* FontAwesome down arrow */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Adjust label for select */
.form-group.floating  label {
  position: absolute;
  top: -8px;
  left: 12px;
  background: white;
  padding: 0 5px;
  font-size: 12px;
  color: #007bff;
}

/*  */
