@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400&display=swap");

body,
html {
  font-family: "IBM Plex Sans", sans-serif;
  background-color: var(--background);
}

* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 32px 16px 24px;
  position: relative;
}

/* Title */

.page-title {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  font-weight: 500;
  color: #000000;
  font-size: 18px;
}

.language-switch {
  position: absolute;
  right: 16px;
  z-index: 10;
}

.lang-button {
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  color: var(--primary);
  font-weight: 500;
  transition: color 0.3s;
}

.lang-button.selected {
  color: #000000;
}

@media (max-width: 600px) {
  .language-switch {
    position: absolute;
    top: 8px;
    right: 8px;
    margin-top: 8px;
  }

  .page-title {
    margin-top: 40px;
    padding-top: 0;
    justify-content: center;
  }
}

/* Card */

.dropped-off-section,
.picked-up-section,
.picked-up-crates-section,
.box-container {
  width: 100%;
}

.cards {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  position: relative;
  transition: opacity 0.3s ease-in-out;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
  background-color: var(--white-1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--elevation-s);
}

.card .title {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-bottom: 1px solid var(--gray-6);
  font-size: 16px;
  font-weight: 500;
}

.card .title .icon {
  position: relative;
  width: 24px;
  height: 24px;
}

.category-title {
  font-weight: 600;
  font-size: 18px;
  padding: 32px 0 8px 16px;
  color: #333;
}

.box-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.box-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.box-details {
  font-size: 14px;
  color: #666;
}

/* Box item */

.box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0 0 16px;
  position: relative;
  align-self: stretch;
  background-color: var(--white-1);
}

.box-content {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding-right: 16px;
}

.horizontal-line {
  width: 100%;
  border-bottom: 1px solid var(--gray-6);
  margin: 0;
}

.box-title {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0;
  line-height: normal;
}

.box-title .image {
  position: relative;
  object-fit: contain;
  width: 44px;
  height: 44px;
}

.size-info {
  color: #666666;
}

/* Stepper */

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
  flex: 0 0 auto;
}

.stepper-button {
  display: flex;
  flex-direction: column;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: var(--background);
  border-radius: 100px;
  border: 1px solid #0000000d;
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: background-color 0.3s ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.stepper-button img {
  width: 24px;
  height: 24px;
}

.stepper-button:disabled {
  background-color: var(--white);
  pointer-events: none;
}

.stepper-button:disabled .img {
  filter: grayscale(100%) brightness(50%);
  opacity: 0.2;
}

.stepper-button:not(:disabled):active {
  background-color: var(--light-modebackground-active);
}

.stepper-counter {
  position: relative;
  min-width: 28px;
  font-family: "IBM Plex Mono", sans-serif;
  font-weight: 400;
  font-size: 17px;
  text-align: center;
  line-height: normal;
  border: 1px solid var(--gray-6);
  border-radius: 4px;
  outline: none;
  padding: 4px;
}

.stepper-counter:focus {
  border: 1px solid var(--primary);
  background-color: #f0f8ff;
}

/* Submit button */

.submit-button {
  display: flex;
  flex-direction: column;
  height: 44px;
  align-items: center;
  justify-content: center;
  position: relative;
  align-self: stretch;
  width: 100%;
  background-color: var(--primary);
  border-radius: 8px;
  border: 1px solid;
  border-color: #0000000d;
  cursor: pointer;
}

.submit-button:disabled {
  background-color: var(--gray-6);
  pointer-events: none;
}

.submit-button .title {
  font-family: "IBM Plex Sans", sans-serif;
  position: relative;
  width: fit-content;
  text-shadow: 0px 0.3px 0px #00000040;
  font-weight: 500;
  color: var(--white-1);
  font-size: 14px;
  text-align: center;
  letter-spacing: 0;
  line-height: 14px;
  white-space: nowrap;
}

.submit-button:disabled .title {
  text-shadow: none;
  color: var(--gray-4);
}

/* Success Message Styling */
.success-message {
  width: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  justify-content: center;
  position: relative;
  margin: 0 auto;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.success-message.fade-in {
  opacity: 1;
}

.success-message.fade-out {
  opacity: 0;
}

.success-text {
  font-size: 16px;
  margin: 16px 0;
}

/* Spinner */

.spinner {
  border: 4px solid var(--white-1);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin: auto;
}

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