@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

body {
  font-family: "Roboto", sans-serif;
  background-color: #f4f7f6;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  background-color: #ffffff;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 700px;
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 20px;
}

header h1 {
  margin: 0;
  color: #0056b3;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

header p {
  margin: 5px 0 0;
  color: #666;
}

h2,
h3 {
  color: #333;
  margin-top: 30px;
}

form {
  display: flex;
  gap: 10px;
}

input[type="text"] {
  flex-grow: 1;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s;
}

input[type="text"]:focus {
  border-color: #007bff;
  outline: none;
}

button {
  position: relative;
  padding: 12px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #0056b3;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.results-header h2 {
  margin: 0;
}

#track-another-btn {
  background-color: #6c757d;
}

#track-another-btn:hover {
  background-color: #5a6268;
}

#parcel-details p {
  background-color: #f8f9fa;
  padding: 10px;
  border-left: 4px solid #007bff;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}

#parcel-details p i {
  color: #007bff;
  width: 20px;
  text-align: center;
}

#parcel-details p strong {
  color: #333;
}

#timeline-container {
  margin: 20px 0 30px;
  border-left: 3px solid #007bff;
  padding-left: 20px;
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

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

.timeline-item::before {
  content: "";
  position: absolute;
  left: -27.5px;
  top: 5px;
  width: 10px;
  height: 10px;
  background-color: #ffffff;
  border: 3px solid #007bff;
  border-radius: 50%;
}

.timeline-item p {
  margin: 0;
}
.timeline-item p.status {
  font-weight: bold;
}
.timeline-item p.date {
  font-size: 14px;
  color: #666;
}

#map {
  height: 350px;
  width: 100%;
  margin: 30px 0;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.hidden {
  display: none;
}

#loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 30px auto;
}

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

#error-message,
#update-success-message {
  text-align: center;
  padding: 15px;
  margin-top: 20px;
  border-radius: 6px;
  font-weight: 500;
}

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

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

.address-search-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

#update-dest-btn {
  width: 100%;
  margin-top: 10px;
}

#update-dest-btn:disabled {
  background-color: #a0cffa;
  cursor: not-allowed;
}

#search-result-display {
  padding: 12px;
  background-color: #e9ecef;
  border-radius: 6px;
  margin-bottom: 10px;
  text-align: center;
  font-style: italic;
  color: #495057;
  transition: background-color 0.3s;
}

#search-result-display.error {
  color: #721c24;
  background-color: #f8d7da;
  font-style: normal;
}

.button-loading .button-text {
  visibility: hidden;
  opacity: 0;
}

.button-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  border: 4px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s ease infinite;
}

.site-footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px 0;
  width: 100%;
  max-width: 700px;
  border-top: 1px solid #e0e0e0;
  color: #888;
  font-size: 14px;
}

.site-footer a {
  color: #666;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}
