/* === GLOBAL STYLES === */
html,
body {
  height: 100%;
  margin: 0;
  padding: 1rem;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  box-sizing: border-box;
  background-color: white;
  overflow-x: hidden;
  overflow-y: auto;
}

h1, h2, p {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  margin: 0;
}

h2 {
  margin-bottom: 1rem;
}

.row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.column {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

/* === LOADER OVERLAY === */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #e0f2f1;
  border-top: 6px solid teal;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fade-out {
  animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* === HEADER === */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

.logo {
  color: #00a0a4;
  letter-spacing: 0.02rem;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
}

.logo-pay {
  background-color: #00a0a4;
  color: white;
  padding: clamp(0.3rem, 1vw, 0.5rem) clamp(0.75rem, 1.5vw, 1rem);
  border-radius: 625rem;
}

/* === TRACKING FORM SECTION === */
.tracking-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.tracking-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1rem;
}

.tracking-form input {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  padding: clamp(0.6rem, 1vw, 1.25rem) clamp(1rem, 1.5vw, 2rem);
  border-radius: 1rem;
  border: 1px solid #ccc;
}

.form-buttons {
  background-color: #7cbfc8;
  color: white;
  border: none;
  border-radius: 1rem;
  padding: clamp(0.6rem, 1vw, 1.25rem) clamp(1rem, 1.5vw, 2rem);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-buttons:hover {
  background-color: #00a0a4;
}

/* === TRACKING OUTPUT SECTION === */
.trackingOutput-section {
  margin-top: 2rem;
  margin-bottom: 2rem;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem !important;
}

/* Parcel details card */
.parcelDetails {
  background-color: white;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 1vw, 2.5rem) clamp(2rem, 1.5vw, 4rem);
  border: 1px solid #ccc;
  border-radius: 2rem;
  margin-bottom: 1rem;
}

.parcelDetails .row h2 {
  font-weight: bold;
}

/* === PROGRESS BAR SECTION === */
.progressDetails {
  background-color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 1vw, 2.5rem) clamp(2rem, 1.5vw, 4rem);
  border: 1px solid #ccc;
  border-radius: 2rem;
}

.progress-bar-container {
  position: relative;
  width: 100%;
  height: 0.75rem;
  background-color: #e0f2f1;
  border-radius: 1rem;
  margin: 1.5rem 0;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background-color: #00a0a4;
  border-radius: 1rem;
  transition: width 0.8s ease-in-out;
}

.progress-circle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 0%;
  background-color: #00a0a4;
  color: white;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: left 0.8s ease-in-out;
}

.progress-description {
  text-align: center;
  color: #555;
  font-style: italic;
}

#paymentStatus {
  color: red;
}

.link-pay {
  text-decoration: none;
  color: #00a0a4;
  transition: all 0.5s ease;
}

.link-pay:hover {
  transition: all 0.5s ease;
  color: #00a0a4;
}

.link-pay:hover i {
  transition: all 0.5s ease;
  transform: translateY(-10px) rotate(15deg);
}


/* === FOOTER === */
footer {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

footer p {
  color: #ccc;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  text-align: center;
}

.quick-links-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1rem;
}

footer .quick-links {
  color: #ccc;
  text-decoration: none;
  margin-right: 1rem;
  transition: all 0.3s ease;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

footer .quick-links:hover {
  color: #00a0a4;
}

footer .quick-links i.fab {
  margin-right: 0.5rem;
}

/* === RESPONSIVE === */
@media (max-width: 770px) {
  #btn-search .btn-text {
    display: none;
  }

  .parcelDetails, .progressDetails {
    width: 90%;
  }

  #pay-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}
