/* ===== Global styles ===== */
*, *::before, *::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  font-family: Roboto, sans-serif;
}
.container {
  position: relative;
  padding: 20px;
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(-45deg, #1565c0, #42a5f5, #1976d2, #64b5f6);
  background-size: 300% 300%;
  animation: gradientShift 20s ease infinite;
  opacity: 1;
  z-index: -1;
  border-radius: 12px;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Logo */
.logo img {
  max-width: 100%;
  height: auto;
  max-height: 120px;
}

/* Header, navigation, and language selector */
.card-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.nav-buttons,
.lang-switcher {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.lang-switcher {
  justify-content: flex-end;
}
.lang-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 3px;
  transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
}
.lang-switcher a img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}
.lang-switcher a:hover {
  background: #e9f5ff;
  transform: scale(1.2);
}
.lang-switcher a.active {
  background: #e3f2fd;
  box-shadow: 0 0 0 2px #1976d2 inset;
  transform: none;
}
.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1976d2;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.btn-nav:hover {
  background: #1258a8;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}
.btn-nav:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Search form */
.search-box {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.search-box input[type="text"] {
  font-size: 16px;
  padding: 12px 16px;
  border: 2px solid #1976d2;
  border-radius: 50px;
  outline: none;
  width: 100%;
  max-width: 320px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s, border 0.3s;
}
.search-box input[type="text"]:focus {
  border-color: #0d47a1;
  box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.2);
}
.search-box button {
  font-size: 16px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #1976d2, #0d47a1);
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex: 0 0 auto;
}
.search-box button:hover {
  background: linear-gradient(135deg, #1565c0, #0b3c91);
  transform: translateY(-2px);
}
.search-box button:active {
  background: linear-gradient(135deg, #0d47a1, #0b3c91);
  transform: translateY(0);
}

/* Result card */
.result-card {
  background: #fff;
  border: 2px solid #1976d2;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  width: 100%;
}
.result-card button {
  font-size: 15px;
  padding: 10px 20px;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
.result-card button:hover {
  background: #1258a8;
  transform: translateY(-1px);
}

/* Progress bar with arrows */
.progress {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
  overflow-x: auto;
}
.progress li {
  position: relative;
  padding: 12px 20px 12px 40px;
  background: #e0e0e0;
  color: #555;
  font-weight: 500;
  text-transform: uppercase;
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.2);
}
.progress li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  border-top: 30px solid transparent;
  border-bottom: 30px solid transparent;
  border-right: 15px solid #e0e0e0;
}
.progress li::after {
  content: "";
  position: absolute;
  right: -15px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 30px solid transparent;
  border-bottom: 30px solid transparent;
  border-left: 15px solid #e0e0e0;
  z-index: 2;
}
.progress li.completed {
  background: linear-gradient(#4caf50, #388e3c);
  color: #fff;
}
.progress li.completed::before {
  border-right-color: #4caf50;
}
.progress li.completed::after {
  border-left-color: #4caf50;
}
.progress li.current {
  background: linear-gradient(#2196f3, #1976d2);
  color: #fff;
}
.progress li.current::before {
  border-right-color: #2196f3;
}
.progress li.current::after {
  border-left-color: #2196f3;
}
.progress li span {
  font-weight: bold;
  margin-right: 6px;
}
.etapas {
  display: inline-block;
  padding: 16px 24px;
  color: #fff;
  background: linear-gradient(#4caf50, #388e3c);
  clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%, 10% 50%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  font-weight: bold;
  text-transform: uppercase;
}

/* InfoBox */
.info-box {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 25px 30px;
  margin-top: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

/* Viršuje spalvinė juosta */
.info-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 5px;
  width: 100%;
  background: linear-gradient(90deg, #1976d2, #42a5f5);
}

/* Kiekvienas įrašas */
.info-box p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  color: #333;
}

/* Paskutiniam įrašui – be brūkšnio */
.info-box p:last-child {
  border-bottom: none;
}

/* Kairė pusė */
.info-box p strong {
  font-weight: 500;
  color: #1976d2;
}

/* Dešinė pusė */
.info-box p span {
  font-weight: 400;
  color: #111;
}


/* Images */
.logo img {
  display: block;
  height: auto;
  max-height: 120px;
  width: auto;
  margin: 0 auto;
}
.progress-svg {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
  .card-header {
    flex-direction: column;
    align-items: center;
  }
  .lang-switcher,
  .nav-buttons {
    justify-content: center;
  }
  .search-box {
    flex-direction: column;
  }
  .progress {
    gap: 4px;
    padding: 0 4px;
  }
  .extra-progress-bar .step {
    width: 40px;
    height: 40px;
    font-size: 9px;
  }
  .info-box p {
    flex-direction: column;
    align-items: flex-start;
  }
}
.shipment-box {
    text-align: center;
    margin: 15px auto;
}

.shipment-box p {
    margin: 0 0 4px 0;
    font-weight: 500;
    font-size: 14px;
    color: #555;
}

.shipment-code {
    display: inline-block;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(to bottom, #ffffff, #f2f2f2);
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
}

.shipment-code:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.extra-progress-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 10px;
  margin: 20px auto;
  max-width: 500px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.extra-progress-bar .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 60px;
  font-size: 11px;
  color: #777;
  opacity: 0.6;
  border-radius: 6px;
  padding: 6px 4px;
  transition: 
    opacity 0.3s,
    transform 0.3s,
    box-shadow 0.3s,
    background 0.3s,
    color 0.3s;
}

/* Įvykdyti etapai */
.extra-progress-bar .step.completed {
  opacity: 1;
  background: #e8f5e9;
  color: #4caf50;
  box-shadow: inset 0 0 0 1px #c8e6c9;
}

/* Bendri aktyvaus etapo nustatymai */
.extra-progress-bar .step.current {
  opacity: 1;
  color: #fff;
  font-weight: 600;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Fonas pagal poziciją (švelnūs pasteliai) */
.extra-progress-bar .step.current:nth-child(1) {
  background: linear-gradient(135deg, #ffe0b2, #ffcc80);
}
.extra-progress-bar .step.current:nth-child(2) {
  background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
}
.extra-progress-bar .step.current:nth-child(3) {
  background: linear-gradient(135deg, #bbdefb, #90caf9);
}
.extra-progress-bar .step.current:nth-child(4) {
  background: linear-gradient(135deg, #d1c4e9, #b39ddb);
}

/* Animacija atsiradimui */
.extra-progress-bar .step.current {
  animation: fadeInScale 0.4s ease;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(-2px) scale(1);
  }
}

/* Ikonėlės dydis */
.extra-progress-bar .step div:first-child {
  font-size: 18px;
  margin-bottom: 3px;
}
/* Ikonėlės dydis */
.extra-progress-bar .step div:first-child {
  font-size: 18px;
  margin-bottom: 3px;
}
.parts-popup {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  color: #333;
  padding: 24px;
  z-index: 1001;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35), 0 6px 12px rgba(0,0,0,0.25);
  max-width: 90%;
  width: 420px;
  font-size: 15px;
  line-height: 1.5;
}

.parts-popup.active {
  opacity: 1;
  pointer-events: auto;
}

.parts-popup h3 {
  margin-top: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1976d2;
  text-align: center;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
}

.parts-popup .parts-list {
  margin-top: 15px;
}

.parts-popup .part-entry {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.parts-popup .part-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.parts-popup .part-entry p {
  margin: 6px 0;
  font-size: 14px;
}

.parts-popup .part-entry p strong {
  color: #1976d2;
}

.parts-popup .close-parts {
  display: block;
  margin: 20px auto 0;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.parts-popup .close-parts:hover {
  background: #1258a8;
  transform: translateY(-2px);
}
.parts-top-right {
  position: absolute;
  top: 10px;       /* atstumas nuo viršaus */
  right: 10px;     /* atstumas nuo dešinio krašto */
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 4px;
  background: #1976d2;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.parts-top-right:hover {
  background: #1258a8;
  transform: translateY(-2px);
}
.btn-nav {
  white-space: nowrap;
}
