@font-face {
  font-family: 'Aptos';
  src: url('/fonts/Aptos.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aptos';
  src: url('/fonts/Aptos-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@tailwind base;
@tailwind components;
@tailwind utilities;

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100%;
  overflow-x: clip;
  background: #0a0a0a;
  font-family: 'Aptos', -apple-system, BlinkMacSystemFont, sans-serif;
}

@supports not (overflow: clip) {
  body {
    overflow-x: hidden;
  }
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

button,
input,
select,
textarea {
  max-width: 100%;
}

input,
textarea,
select {
  font-size: 16px;
  border-radius: 8px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid #DDA20D;
  outline-offset: 3px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea {
  font-size: 16px;
}

* {
  transition-property: color, background-color, border-color, box-shadow, opacity, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 10, 10, 0.5);
}

::-webkit-scrollbar-thumb {
  background: #f3bd35;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #fcd34d;
}

* {
  scrollbar-color: #f3bd35 rgba(10, 10, 10, 0.5);
  scrollbar-width: thin;
}

/* PPL Widget Styling */
/* pokud by PPL CSS přepisovalo výšku, použij vyšší specificitu: */
#ppl-parcelshop-map {
  height: 90vh !important;
  min-height: 90vh !important;
  width: 100% !important;
  top: 5vh !important;
}

#ppl-parcelshop-map > * {
  height: 100% !important;
  width: 100% !important;
}

/* Isolate PPL widget from our global styles */
#ppl-parcelshop-map {
  color: initial;
  font-family: initial;
  line-height: normal;
  text-transform: none;
}

#ppl-parcelshop-map :focus-visible {
  outline: revert;
  outline-offset: revert;
}

/* Reset scrollbars inside PPL widget */
#ppl-parcelshop-map,
#ppl-parcelshop-map * {
  scrollbar-width: auto;
  scrollbar-color: auto;
}

#ppl-parcelshop-map *::-webkit-scrollbar {
  width: auto;
  height: auto;
}

#ppl-parcelshop-map *::-webkit-scrollbar-track {
  background: initial;
  border-radius: initial;
  border: initial;
}

#ppl-parcelshop-map *::-webkit-scrollbar-thumb {
  background: initial;
  border-radius: initial;
  border: initial;
  box-shadow: initial;
}

/* Compact checkout */
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.checkout-card,
.checkout-progress {
  background: #0a0a0a;
}

.checkout-section-title {
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
}

.checkout-section-title h2 {
  margin: 0;
  color: #f3bd35;
  font-family: Aptos, sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.checkout-carrier-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 3.5rem;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0.3rem;
  overflow: hidden;
  border: 1px solid rgba(243, 189, 53, 0.16);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.checkout-carrier-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.checkout-summary input[type="text"] {
  min-width: 0;
}

@media (min-width: 1100px) {
  .checkout-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.85fr);
    grid-template-areas:
      "progress progress"
      "contact summary"
      "shipping summary";
    align-items: start;
    gap: 1.25rem;
  }

  .checkout-progress {
    grid-area: progress;
  }

  .checkout-contact {
    grid-area: contact;
  }

  .checkout-shipping {
    grid-area: shipping;
  }

  .checkout-summary {
    position: sticky;
    top: 12rem;
    grid-area: summary;
  }
}

@media (max-width: 640px) {
  .checkout-section-title {
    margin-bottom: 1rem;
  }

  .checkout-section-title h2 {
    font-size: 1.25rem;
  }

  .checkout-carrier-logo {
    flex-basis: 3rem;
    width: 3rem;
    height: 3rem;
  }
}
