/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
}

/* Wrapper */
.safexpress-wrapper {
  width: 100%;
  padding: 2rem 1rem;
}

.safexpress-container {
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

/* Card Styles */
.safexpress-card {
  background: transparent;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 100, 0, 0.1);
  margin-bottom: 2rem;
  width: 100%;
}

/* Form Styles */
.safexpress-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-title {
  text-align: center;
  margin-bottom: 1rem;
}

.form-title p {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-label {
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  display: block;
}

/* Radio Group */
.radio-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.radio-option {
  position: relative;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.radio-option:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.radio-option.selected {
  background: linear-gradient(135deg, #006400, #228b22);
  color: white;
  border-color: #006400;
  box-shadow: 0 10px 25px rgba(0, 100, 0, 0.3);
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  position: relative;
  transition: all 0.3s ease;
}

.radio-option.selected .radio-icon {
  border-color: white;
  background: white;
}

.radio-option.selected .radio-icon::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #006400;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.radio-text {
  flex: 1;
}

.radio-title {
  font-weight: 500;
  font-size: 1rem;
}

/* Input Field */
.input-field {
  width: 100%;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
  font-size: 1rem;
  font-weight: 500;
  color: #1f2937;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem !important;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.input-field:focus {
  outline: none;
  border-color: #006400;
  background: white;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0, 100, 0, 0.15);
}

.input-field.error {
  border-color: #ef4444;
}

.input-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.input-error.show {
  display: block;
}

/* Track Button */
.track-button {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #006400 0%, #228b22 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
}

.track-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.track-button:hover::before {
  left: 100%;
}

.track-button:hover {
  transform: translateY(-2px);
  background: rgba(0, 70, 0, 0.7) !important;
}

.track-button:active {
  transform: translateY(0);
}

.track-button:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.button-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

/* Results Section */
.results-section {
  animation: slideIn 0.5s ease;
}

.result-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.result-header {
  background: linear-gradient(135deg, #004000 0%, #003000 100%);
  padding: 1rem;
  text-align: center;
}

.result-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  margin: 0;
  letter-spacing: 0.05em;
}

.results-content {
  padding: 0;
}

/* Summary Section */
.shipment-summary {
  background: linear-gradient(to bottom, #f0fdf4, #dcfce7);
  padding: 1.5rem;
}

.summary-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-header i {
  font-size: 1.5rem;
  color: #006400;
}

.waybill-info .waybill-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #166534;
  margin: 0 0 0.25rem 0;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.waybill-info .waybill-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #14532d;
  margin: 0;
}

.summary-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.detail-label i {
  color: #006400;
}

.detail-value {
  font-size: 1rem;
  font-weight: 700;
  color: #14532d;
}

.detail-value.status {
  color: #1f2937;
  font-size: 1.125rem;
}

/* Tracking Timeline */
.tracking-timeline {
  background: white;
  padding: 1.5rem;
}

.timeline-table {
  width: 100%;
  border-collapse: collapse;
}

.timeline-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
}

.timeline-table tbody tr:last-child {
  border-bottom: none;
}

.timeline-table td {
  padding: 1.5rem 1rem;
  vertical-align: middle;
}

.status-cell {
  width: 38%;
  text-align: right;
  padding-right: 1.5rem;
}

.status-text {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.5;
}

.icon-cell {
  width: 24%;
  text-align: center;
  padding: 1.5rem 0;
}

.tracking-icon {
  display: inline-flex;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tracking-icon i {
  font-size: 1.5rem;
}

.icon-green {
  background: #22c55e;
}

.icon-yellow {
  background: #eab308;
}

.icon-blue {
  background: #3b82f6;
}

.icon-orange {
  background: #ea580c;
}

.icon-indigo {
  background: #6366f1;
}

.icon-teal {
  background: #14b8a6;
}

.date-cell {
  width: 38%;
  text-align: left;
  padding-left: 1.5rem;
}

.date-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.time-text {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Error Section */
.error-section {
  animation: slideIn 0.5s ease;
}

.error-card {
  background: white;
  border-left: none !important;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.error-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.error-header i {
  font-size: 2rem;
  color: #ef4444;
}

.error-header .error-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.error-content {
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.error-note {
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
  margin: 1rem 0;
}

.refresh-btn-container {
  margin-top: 1.5rem;
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #006400 0%, #228b22 100%);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.refresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 100, 0, 0.3);
  color: white;
  text-decoration: none;
}

/* No Data Message */
.no-data {
  text-align: center;
  padding: 3rem 2rem;
}

.no-data i {
  font-size: 4rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.no-data .no-data-heading {
  font-size: 1.125rem;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 0.5rem 0;
}

.no-data .no-data-text {
  font-size: 1rem;
  color: #9ca3af;
  margin: 0;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .safexpress-wrapper {
    padding: 1rem 0.5rem;
  }

  .safexpress-card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .form-title p {
    font-size: 1.5rem;
  }

  .radio-group {
    grid-template-columns: 1fr;
  }

  .radio-option {
    padding: 0.875rem;
  }

  .summary-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .waybill-info .waybill-number {
    font-size: 1.25rem;
  }

  .summary-details {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .timeline-table td {
    padding: 1rem 0.5rem;
  }

  .status-cell {
    width: 35%;
    padding-right: 0.5rem;
  }

  .status-text {
    font-size: 0.8rem;
  }

  .icon-cell {
    width: 30%;
    padding: 1rem 0.25rem;
  }

  .tracking-icon {
    width: 45px;
    height: 45px;
  }

  .tracking-icon i {
    font-size: 1.25rem;
  }

  .date-cell {
    width: 35%;
    padding-left: 0.5rem;
  }

  .date-text {
    font-size: 0.75rem;
  }

  .time-text {
    font-size: 0.7rem;
  }

  .result-header {
    padding: 0.875rem;
  }

  .result-title {
    font-size: 1rem;
  }

  .shipment-summary {
    padding: 1rem;
  }

  .tracking-timeline {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .form-title p {
    font-size: 1.25rem;
  }

  .form-label {
    font-size: 1rem;
  }

  .input-field {
    font-size: 0.9375rem;
    padding: 0.875rem 1.25rem;
  }

  .track-button {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }

  .waybill-info .waybill-label {
    font-size: 0.75rem;
  }

  .waybill-info .waybill-number {
    font-size: 1.125rem;
  }

  .detail-label {
    font-size: 0.75rem;
  }

  .detail-value {
    font-size: 0.9375rem;
  }

  .status-text {
    font-size: 0.75rem;
  }

  .tracking-icon {
    width: 40px;
    height: 40px;
  }

  .tracking-icon i {
    font-size: 1rem;
  }

  .date-text {
    font-size: 0.6875rem;
  }

  .time-text {
    font-size: 0.625rem;
  }
}