/* Handel.sk – dynamicka velkostna tabulka v modalnom okne, v1.3 */

.handel-size-guide-trigger {
  align-items: center;
  background: #003399;
  border: 1px solid #003399;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 15px;
  font-weight: 700;
  gap: 9px;
  justify-content: center;
  line-height: 1.25;
  margin: 10px 0 12px;
  min-height: 44px;
  padding: 10px 16px;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
  width: 100%;
}

.handel-size-guide-trigger:hover,
.handel-size-guide-trigger:focus-visible {
  background: #002675;
  border-color: #002675;
  color: #fff;
}

.handel-size-guide-trigger:focus-visible,
.handel-size-modal__close:focus-visible,
.handel-size-modal__tab:focus-visible {
  outline: 3px solid rgba(0, 51, 153, .3);
  outline-offset: 2px;
}

.handel-size-guide-trigger:active {
  background: #001f5c;
  border-color: #001f5c;
}

.handel-size-guide-trigger svg {
  flex: 0 0 auto;
}

.handel-size-modal[hidden] {
  display: none !important;
}

.handel-size-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 100000;
}

.handel-size-modal__backdrop {
  background: rgba(20, 15, 12, .68);
  inset: 0;
  position: absolute;
}

.handel-size-modal__dialog {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .3);
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 820px);
  max-width: 980px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.handel-size-modal__header {
  align-items: center;
  border-bottom: 1px solid #e9e1da;
  display: flex;
  justify-content: space-between;
  padding: 18px 22px;
}

.handel-size-modal__title {
  color: #29211c;
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
}

.handel-size-modal__close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: #3e342d;
  cursor: pointer;
  display: flex;
  flex: 0 0 40px;
  font-size: 30px;
  height: 40px;
  justify-content: center;
  line-height: 1;
  margin: -8px -9px -8px 12px;
  padding: 0 0 3px;
}

.handel-size-modal__close:hover {
  background: #f5f0ec;
}

.handel-size-modal__tabs {
  border-bottom: 1px solid #e9e1da;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 13px 22px;
  scrollbar-width: thin;
}

.handel-size-modal__tabs[hidden] {
  display: none !important;
}

.handel-size-modal__tab {
  background: #f6f2ee;
  border: 1px solid #dfd2c7;
  border-radius: 999px;
  color: #4a3b31;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  min-height: 38px;
  padding: 8px 14px;
}

.handel-size-modal__tab:hover {
  background: #eee4db;
}

.handel-size-modal__tab[aria-selected="true"] {
  background: #8c6242;
  border-color: #8c6242;
  color: #fff;
}

.handel-size-modal__content {
  color: #332b26;
  min-height: 210px;
  overflow: auto;
  padding: 22px;
}

.handel-size-modal__section-title {
  color: #2e251f;
  font-size: 19px;
  margin: 0 0 15px;
}

.handel-size-modal__table-wrap {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  width: 100%;
}

.handel-size-modal__content table {
  border-collapse: collapse;
  font-size: 14px;
  margin: 0;
  min-width: 610px;
  width: 100% !important;
}

.handel-size-modal__content th,
.handel-size-modal__content td {
  border: 1px solid #ded7d1;
  padding: 10px 11px;
  text-align: center;
  white-space: nowrap;
}

.handel-size-modal__content table tr:not(.handel-size-modal__header-row) th,
.handel-size-modal__content table tr:not(.handel-size-modal__header-row) td {
  background: #fff !important;
}

.handel-size-modal__content .handel-size-modal__header-row th,
.handel-size-modal__content .handel-size-modal__header-row td {
  background: #f4ede7 !important;
  font-weight: 700;
}

.handel-size-modal__content th:first-child,
.handel-size-modal__content td:first-child {
  font-weight: 700;
  text-align: left;
}

.handel-size-modal__note {
  color: #6c5b50;
  font-size: 13px;
  line-height: 1.5;
  margin: 18px 0 0;
}

.handel-size-modal__status {
  align-items: center;
  color: #66584f;
  display: flex;
  flex-direction: column;
  gap: 13px;
  justify-content: center;
  min-height: 180px;
  text-align: center;
}

.handel-size-modal__spinner {
  animation: handel-size-spin .8s linear infinite;
  border: 3px solid #eadfd6;
  border-radius: 50%;
  border-top-color: #8c6242;
  height: 34px;
  width: 34px;
}

.handel-size-modal__fallback-link {
  color: #755036;
  font-weight: 700;
  text-decoration: underline;
}

.handel-size-modal__footer {
  background: #f8f8fa;
  border-top: 1px solid #e2e2e8;
  padding: 14px 22px 16px;
  text-align: center;
}

.handel-size-modal__all-link {
  color: #003399;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.handel-size-modal__all-link:hover,
.handel-size-modal__all-link:focus {
  color: #001f66;
}

html.handel-size-modal-open,
body.handel-size-modal-open {
  overflow: hidden !important;
}

@keyframes handel-size-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 767px) {
  .handel-size-modal {
    align-items: center;
    padding: 12px;
  }

  .handel-size-modal__dialog {
    border-radius: 10px;
    max-height: calc(100dvh - 24px);
  }

  .handel-size-modal__header {
    padding: 15px 17px;
  }

  .handel-size-modal__title {
    font-size: 19px;
  }

  .handel-size-modal__tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    padding: 10px 12px;
  }

  .handel-size-modal__tab {
    flex: 1 1 calc(50% - 4px);
    font-size: 12px;
    min-height: 34px;
    padding: 6px 7px;
  }

  .handel-size-modal__content {
    padding: 15px 10px 18px;
  }

  .handel-size-modal__footer {
    padding: 12px 14px 14px;
  }

  .handel-size-modal__all-link {
    font-size: 13px;
  }

  .handel-size-modal__table-wrap {
    overflow-x: hidden;
  }

  .handel-size-modal__content table {
    font-size: 10.5px;
    min-width: 0;
    table-layout: fixed;
    width: 100% !important;
  }

  .handel-size-modal__content th,
  .handel-size-modal__content td {
    letter-spacing: -.1px;
    overflow-wrap: normal;
    padding: 8px 1px;
    white-space: normal;
    width: auto !important;
  }

  .handel-size-modal__content th:first-child,
  .handel-size-modal__content td:first-child {
    overflow-wrap: anywhere;
    width: 28% !important;
  }

  .handel-size-modal__content th:not(:first-child),
  .handel-size-modal__content td:not(:first-child) {
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .handel-size-guide-trigger,
  .handel-size-modal__spinner {
    animation: none;
    transition: none;
  }
}
