/* ELTA Courier Tracking - Modern Design
   Inspired by myscooter.gr color scheme */

/* Variables */
:root {
  --primary-color: #1a1a2e;
  /* Dark blue/black */
  --secondary-color: #16213e;
  /* Darker blue */
  --accent-color: #ff6b35;
  /* Orange accent */
  --success-color: #00c853;
  /* Green */
  --error-color: #ff5252;
  /* Red */
  --warning-color: #ffa726;
  /* Orange */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* Container */
.elta-tracking-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
}

/* Header Section */
.tracking-header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeInDown 0.6s ease-out;
}

.tracking-header i {
  font-size: 48px;
  color: var(--accent-color);
  margin-bottom: 15px;
  display: block;
}

.tracking-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.tracking-header .subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

/* Form Section */
.tracking-form {
  background: var(--bg-white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.6s ease-out;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input[type="text"] {
  width: 100%;
  padding: 15px 20px 15px 50px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.input-wrapper input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
  transform: translateY(-1px);
}

.input-wrapper.has-value input[type="text"] {
  border-color: var(--primary-color);
}

.input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 18px;
  transition: color 0.3s ease;
}

.input-wrapper input[type="text"]:focus~.input-icon,
.input-wrapper.has-value .input-icon {
  color: var(--accent-color);
}

.input-hint {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-style: italic;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 35px;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff8a65 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.btn-text {
  margin-right: 8px;
}

.btn-icon {
  font-size: 18px;
}

/* Spinner Animation */
.spinner {
  display: none;
  margin-left: 10px;
}

.spinner>div {
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 100%;
  display: inline-block;
  animation: sk-bouncedelay 1.4s infinite ease-in-out both;
  margin: 0 2px;
}

.spinner .bounce1 {
  animation-delay: -0.32s;
}

.spinner .bounce2 {
  animation-delay: -0.16s;
}

.btn.loading .spinner {
  display: inline-flex;
}

@keyframes sk-bouncedelay {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1.0);
  }
}

/* Message Boxes */
.message-box {
  padding: 15px 20px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  display: none;
  font-size: 15px;
  line-height: 1.5;
  animation: slideInDown 0.3s ease-out;
}

.message-box i {
  margin-right: 8px;
  font-size: 18px;
}

.error-message {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.success-message {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

/* Carrier Section */
.carrier-section {
  background: var(--bg-white);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
  display: none;
  text-align: center;
  border: 1px solid var(--border-color);
  animation: fadeIn 0.5s ease-out;
}

.courier-logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 20px;
}

.carrier-info h3 {
  font-size: 20px;
  color: var(--primary-color);
  margin: 0 0 5px 0;
}

.carrier-info p {
  color: var(--text-secondary);
  margin: 0;
}

/* Results Section */
.tracking-results {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 30px;
  display: none;
  border: 1px solid var(--border-color);
  animation: fadeIn 0.5s ease-out;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--bg-light);
}

.results-header h3 {
  font-size: 24px;
  color: var(--primary-color);
  margin: 0;
  display: flex;
  align-items: center;
}

.results-header h3 i {
  color: var(--accent-color);
  margin-right: 10px;
}

.tracking-number {
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.tracking-number:hover {
  color: var(--accent-color);
}

.tracking-number i {
  margin-right: 5px;
}

/* Timeline */
.timeline-container {
  position: relative;
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 30px;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.4s ease;
}

.timeline-item.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.timeline-marker {
  position: absolute;
  left: -25px;
  top: 0;
  width: 30px;
  height: 30px;
  background: var(--bg-white);
  border: 3px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: all 0.3s ease;
}

.timeline-marker i {
  font-size: 14px;
  color: var(--text-secondary);
}

.timeline-item.latest .timeline-marker {
  width: 36px;
  height: 36px;
  left: -28px;
  background: var(--accent-color);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
}

.timeline-item.latest .timeline-marker i {
  color: white;
  font-size: 16px;
}

.timeline-content {
  background: var(--bg-light);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-color);
}

.timeline-item:hover .timeline-marker {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.timeline-item:hover .timeline-marker i {
  color: white;
}

.timeline-header {
  margin-bottom: 12px;
}

.timeline-date {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.timeline-date i {
  margin-right: 5px;
  color: var(--accent-color);
}

.timeline-time {
  display: inline-flex;
  align-items: center;
}

.timeline-status {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.timeline-location {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.timeline-location i {
  margin-right: 6px;
  color: var(--accent-color);
}

.timeline-item.latest .timeline-content {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(255, 138, 101, 0.05) 100%);
  border-color: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .elta-tracking-wrapper {
    padding: 15px;
  }

  .tracking-form {
    padding: 25px 20px;
  }

  .tracking-header h2 {
    font-size: 26px;
  }

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

  .timeline {
    padding-left: 30px;
  }

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

  .timeline-marker {
    left: -20px;
    width: 26px;
    height: 26px;
  }

  .timeline-item.latest .timeline-marker {
    width: 30px;
    height: 30px;
    left: -22px;
  }

  .timeline-content {
    padding: 15px;
  }

  .btn {
    width: 100%;
    padding: 15px 25px;
  }
}

@media (max-width: 480px) {
  .tracking-header i {
    font-size: 36px;
  }

  .tracking-header h2 {
    font-size: 22px;
  }

  .tracking-header .subtitle {
    font-size: 14px;
  }

  .input-wrapper input[type="text"] {
    font-size: 14px;
    padding: 12px 15px 12px 45px;
  }

  .timeline-date {
    font-size: 13px;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .timeline-status {
    font-size: 15px;
  }

  .timeline-location {
    font-size: 13px;
  }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-light: #1a1a1a;
    --bg-white: #2a2a2a;
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
  }

  .tracking-form,
  .carrier-section,
  .tracking-results {
    background: var(--bg-white);
  }

  .input-wrapper input[type="text"] {
    background: #1a1a1a;
    color: var(--text-primary);
  }
}

/* Print styles */
@media print {

  .btn,
  .tracking-form {
    display: none;
  }

  .tracking-results {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .timeline-item {
    page-break-inside: avoid;
  }
}