/* =============== TRACKING DETAILS PAGE STYLES =============== */

/* Details Hero Section */
.details-hero {
  background: linear-gradient(135deg, #dc1928 0%, #a01420 100%);
  padding: 40px 20px;
  color: white;
}

.details-hero-content {
  max-width: 1000px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.back-link:hover {
  color: white;
  gap: 12px;
}

.details-hero h1 {
  font-size: 36px;
  margin: 0 0 10px 0;
  font-weight: 700;
}

.tracking-number {
  font-size: 18px;
  opacity: 0.95;
  font-weight: 500;
}

/* Details Section */
.details-section {
  background: #f5f5f5;
  padding: 40px 20px;
  min-height: calc(100vh - 200px);
}

.details-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  gap: 25px;
}

/* Details Card */
.details-card {
  background: white;
  border-radius: 50px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.details-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.details-card h2 {
  font-size: 22px;
  color: #333;
  margin: 0 0 20px 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.details-card h2 i {
  color: #dc1928;
  font-size: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.card-header h2 {
  margin: 0;
}

/* Status Card */
.status-card {
  border-left: 5px solid #dc1928;
}

.status-info {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
}

.status-message {
  font-size: 16px;
  color: #333;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.estimated-delivery {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* Status Badge */
.status-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-badge.delivered {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.out-for-delivery {
  background-color: #fff3cd;
  color: #856404;
}

.status-badge.in-transit {
  background-color: #d1ecf1;
  color: #0c5460;
}

.status-badge.on-hold {
  background-color: #f8d7da;
  color: #721c24;
}

.hold-badge {
  background: #dc1928;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Sender & Recipient Section */
.sender-recipient-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 30px;
  align-items: start;
}

.sender-box,
.recipient-box {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #dc1928;
}

.sender-box h3,
.recipient-box h3 {
  font-size: 16px;
  color: #333;
  margin: 0 0 15px 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sender-box h3 i,
.recipient-box h3 i {
  color: #dc1928;
  font-size: 18px;
}

.info-label {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 12px 0 4px 0;
  font-weight: 600;
}

.info-value {
  font-size: 15px;
  color: #333;
  margin: 0;
  font-weight: 500;
}

.divider {
  width: 2px;
  background: #e0e0e0;
  min-height: 200px;
}

/* Package Grid */
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.package-item {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
}

.package-item:hover {
  background: #f0f0f0;
  transform: translateY(-4px);
}

.package-item i {
  font-size: 32px;
  color: #dc1928;
  margin-bottom: 10px;
  display: block;
}

.package-item .label {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  font-weight: 600;
}

.package-item .value {
  font-size: 16px;
  color: #333;
  margin: 8px 0 0 0;
  font-weight: 700;
}

/* Timeline Detailed */
.timeline-detailed {
  position: relative;
  padding: 20px 0;
}

.timeline-detailed::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #dc1928, #ddd);
}

.timeline-item-detailed {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  position: relative;
}

.timeline-marker-detailed {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 3px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #999;
  flex-shrink: 0;
  transition: all 0.3s ease;
  z-index: 1;
}

.timeline-marker-detailed.completed {
  background: #dc1928;
  border-color: #dc1928;
  color: white;
}

.timeline-marker-detailed.active {
  background: #fff3cd;
  border-color: #dc1928;
  color: #dc1928;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 25, 40, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(220, 25, 40, 0);
  }
}

.timeline-content-detailed {
  padding-top: 5px;
  flex: 1;
}

.timeline-content-detailed h4 {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin: 0 0 5px 0;
}

.timeline-date-detailed {
  font-size: 14px;
  color: #666;
  margin: 0;
  font-weight: 500;
}

.timeline-location {
  font-size: 13px;
  color: #999;
  margin: 8px 0 0 0;
}

/* =============== PAYMENT SECTION =============== */

.payment-card {
  border-left: 5px solid #dc1928;
  background: linear-gradient(135deg, #fff9f9 0%, #ffffff 100%);
}

.hold-reason {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.hold-reason h3 {
  font-size: 14px;
  color: #856404;
  margin: 0 0 8px 0;
  font-weight: 700;
  text-transform: uppercase;
}

.hold-reason p {
  font-size: 14px;
  color: #856404;
  margin: 0;
  line-height: 1.6;
}

.payment-amount {
  background: #f0f0f0;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  text-align: center;
}

.amount-label {
  font-size: 13px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  font-weight: 600;
}

.amount-value {
  font-size: 32px;
  color: #dc1928;
  margin: 10px 0 0 0;
  font-weight: 700;
}

/* Payment Methods */
.payment-methods {
  margin-bottom: 25px;
}

.payment-methods h3 {
  font-size: 18px;
  color: #333;
  margin: 0 0 20px 0;
  font-weight: 700;
}

.payment-category {
  margin-bottom: 25px;
}

.payment-category h4 {
  font-size: 14px;
  color: #666;
  margin: 0 0 15px 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-category h4 i {
  color: #dc1928;
  font-size: 16px;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.payment-option {
  position: relative;
}

.payment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.payment-option label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  color: #333;
}

.payment-option label i {
  font-size: 20px;
  color: #dc1928;
}

.payment-option input[type="radio"]:checked + label {
  background: #fff3cd;
  border-color: #dc1928;
  box-shadow: 0 0 0 3px rgba(220, 25, 40, 0.1);
}

.payment-option label:hover {
  border-color: #dc1928;
  background: #f5f5f5;
}

/* Payment Actions */
.payment-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.primary_btn,
.secondary-btn {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.primary_btn {
  background: #dc1928;
  color: white;
}

.primary_btn:hover {
  background: #a01420;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 25, 40, 0.3);
}

.secondary-btn {
  background: #f0f0f0;
  color: #333;
  border: 2px solid #ddd;
}

.secondary-btn:hover {
  background: #e0e0e0;
  border-color: #999;
}

/* =============== ORIGINAL TRACKING PAGE STYLES =============== */

/* Tracking Section Container */
.tracking-section {
  padding: 60px 20px;
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
}

.tracking-container {
  max-width: 900px;
  margin: 0 auto;
}

/* Tracking Search Box */
.tracking-search {
  text-align: center;
  margin-bottom: 40px;
}

.tracking-search h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.tracking-input {
  flex: 1;
  min-width: 250px;
  padding: 14px 18px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.tracking-input:focus {
  outline: none;
  border-color: #dc1928;
  box-shadow: 0 0 0 3px rgba(220, 25, 40, 0.1);
}

.tracking-hint {
  font-size: 13px;
  color: #666;
  margin-top: 10px;
}

/* Tracking Results Card */
.tracking-results {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tracking-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #dc1928;
}

.tracking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.tracking-header h3 {
  font-size: 22px;
  color: #333;
  margin: 0;
}

.status-badge.in-transit {
  background-color: #d1ecf1;
  color: #0c5460;
}

.status-badge.out-for-delivery {
  background-color: #fff3cd;
  color: #856404;
}

.status-badge.delivered {
  background-color: #d4edda;
  color: #155724;
}

/* Tracking Details Grid */
.tracking-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.detail-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.detail-item:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.detail-item i {
  font-size: 24px;
  color: #dc1928;
  min-width: 30px;
  text-align: center;
}

.detail-label {
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.detail-value {
  font-size: 16px;
  color: #333;
  font-weight: 600;
  margin: 5px 0 0 0;
}

/* Timeline Styles */
.tracking-timeline {
  margin: 30px 0;
}

.tracking-timeline h4 {
  font-size: 18px;
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #dc1928, #ddd);
}

.timeline-item {
  display: flex;
  gap: 30px;
  margin-bottom: 25px;
  position: relative;
}

.timeline-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  border: 3px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #999;
  flex-shrink: 0;
  transition: all 0.3s ease;
  z-index: 1;
}

.timeline-marker.completed {
  background: #dc1928;
  border-color: #dc1928;
  color: white;
}

.timeline-marker.active {
  background: #fff3cd;
  border-color: #dc1928;
  color: #dc1928;
  animation: pulse 2s infinite;
}

.timeline-content {
  padding-top: 5px;
  flex: 1;
}

.timeline-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.timeline-date {
  font-size: 13px;
  color: #999;
  margin: 5px 0 0 0;
}

/* Error Message */
.tracking-error {
  background: #f8d7da;
  border: 2px solid #f5c6cb;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  animation: slideIn 0.3s ease;
}

.tracking-error i {
  font-size: 48px;
  color: #721c24;
  margin-bottom: 15px;
  display: block;
}

.tracking-error p {
  font-size: 16px;
  color: #721c24;
  margin: 0 0 20px 0;
}

.secondary-btn {
  background: #f0f0f0;
  color: #333;
  padding: 12px 30px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.secondary-btn:hover {
  background: #e0e0e0;
  border-color: #999;
}

/* =============== MOBILE RESPONSIVE =============== */

@media (max-width: 768px) {
  /* Details Page Mobile */
  .details-hero {
    padding: 30px 15px;
  }

  .details-hero h1 {
    font-size: 28px;
  }

  .details-container {
    gap: 20px;
  }

  .details-card {
    padding: 20px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .sender-recipient-grid {
    grid-template-columns: 1fr;
  }

  .divider {
    display: none;
  }

  .package-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .payment-options {
    grid-template-columns: 1fr;
  }

  .payment-actions {
    flex-direction: column;
  }

  /* Tracking Page Mobile */
  .tracking-section {
    padding: 40px 15px;
  }

  .tracking-card {
    padding: 20px;
  }

  .tracking-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .tracking-details {
    grid-template-columns: 1fr;
  }

  .search-box {
    flex-direction: column;
  }

  .tracking-input {
    min-width: 100%;
  }

  .timeline::before {
    left: 11px;
  }

  .timeline-item {
    gap: 20px;
  }

  .timeline-marker {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .timeline-detailed::before {
    left: 11px;
  }

  .timeline-item-detailed {
    gap: 20px;
  }

  .timeline-marker-detailed {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
}

/* Mobile hero background for tracking page */
@media (max-width: 768px) {
  .hero_page1[data-page="tracking"] {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("../images/herobg-tracking-mobile.png")
      center / cover no-repeat;
  }
}

/* Map Container */
#trackingMap {
  min-height: 320px;
  border-radius: 12px;
  overflow: hidden;
  background: #f9f9f9;
}

/* Custom Marker Pulse Animation */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}
.leaflet-popup-content {
  font-family: 'Inter', sans-serif !important;
  margin: 12px 16px !important;
  font-size: 14px;
}

/* Mobile Map Adjustments */
@media (max-width: 768px) {
  #trackingMap {
    min-height: 250px;
  }
}