/**
 * Cookie-consent dialog + floating widget — visual parity with the live
 * antstudija.lt Cookiebot banner (captured 2026-08-03: white center modal,
 * 900px, radius 8px, 0 32px 68px shadow, accent #1032CF, 3-tab nav with blue
 * underline, category accordions with count pills + iOS-style toggles,
 * bottom-left 48px round re-open badge).
 *
 * All selectors are antcc-* prefixed; the file is loaded only by the
 * marketing layout, next to main.css / marketing-overrides.css.
 */

.antcc-underlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2147483630;
}

.antcc-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, calc(100vw - 16px));
  max-height: min(85vh, 780px);
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #141414;
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.3) 0 32px 68px 0;
  z-index: 2147483631;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.antcc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.antcc-logo {
  display: inline-flex;
  width: 40px;
  height: 40px;
  color: #141414;
}

.antcc-tabs {
  display: flex;
  border-top: 1px solid #e3e3e3;
  border-bottom: 1px solid #e3e3e3;
}

.antcc-tab {
  flex: 1 1 0;
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 14px 8px;
  font: inherit;
  font-weight: 700;
  color: #141414;
  cursor: pointer;
  text-align: center;
}

.antcc-tab[aria-selected="true"] {
  color: #1032cf;
  border-bottom-color: #1032cf;
}

.antcc-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 24px;
  background: #fbfbfb;
}

/*
 * The dialog is focused programmatically (tabindex=-1) when it opens so the
 * focus trap has an anchor; the theme's global focus styling would draw a
 * blue ring around the whole modal. Keyboard users still get visible focus on
 * every real control inside (:focus-visible rules above).
 */
.antcc-dialog:focus,
.antcc-dialog:focus-visible {
  outline: none;
}

/*
 * main.css (Bootstrap + ANT theme) styles bare h2 with the condensed
 * uppercase display face. The dialog is UI chrome, not page content — re-
 * assert the dialog's own type so the title matches live's plain bold 16px.
 */
.antcc-dialog .antcc-title {
  margin: 0 0 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}

.antcc-text {
  margin: 0 0 12px;
}

.antcc-text:last-child {
  margin-bottom: 0;
}

.antcc-text a,
.antcc-note a {
  color: #1032cf;
  text-decoration: underline;
}

.antcc-linklike {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #1032cf;
  text-decoration: underline;
  cursor: pointer;
}

/* ---- Details tab: category accordions ---- */

.antcc-cat {
  border-bottom: 1px solid #e6e6e6;
}

.antcc-cat:first-child {
  border-top: 1px solid #e6e6e6;
}

.antcc-cat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
}

.antcc-cat-expand {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: #141414;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  text-align: left;
}

.antcc-chevron {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  transition: transform 0.15s ease;
}

.antcc-cat-expand[aria-expanded="true"] .antcc-chevron {
  transform: rotate(180deg);
}

.antcc-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ececec;
  color: #141414;
  font-size: 12px;
  font-weight: 600;
}

/* iOS-style switch (live: blue on, dark-gray off, white knob) */
.antcc-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  margin: 0;
}

.antcc-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.antcc-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #3b3b3b;
  transition: background 0.15s ease;
  pointer-events: none;
}

.antcc-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.antcc-switch input:checked + .antcc-slider {
  background: #1032cf;
}

.antcc-switch input:checked + .antcc-slider::before {
  transform: translateX(20px);
}

.antcc-switch input:focus-visible + .antcc-slider {
  outline: 2px solid #1032cf;
  outline-offset: 2px;
}

.antcc-switch input:disabled {
  cursor: not-allowed;
}

.antcc-locked {
  font-size: 12px;
  font-weight: 600;
  color: #1032cf;
  flex: 0 0 auto;
}

.antcc-cat-body {
  padding: 0 4px 16px 26px;
}

.antcc-cat-desc {
  margin: 0 0 10px;
}

.antcc-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: #555;
}

.antcc-empty {
  margin: 0;
  font-size: 13px;
  color: #555;
}

/* Declaration table — styled like live's CookieDeclarationTable */
.antcc-table-wrap {
  overflow-x: auto;
}

.antcc-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13px;
}

.antcc-table th {
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid #777;
  padding: 4px;
}

.antcc-table td {
  border-bottom: 1px solid #ccc;
  vertical-align: top;
  padding: 4px 4px 5px;
  word-wrap: break-word;
}

.antcc-updated {
  margin: 16px 0 0;
  font-size: 12px;
  color: #777;
}

/* ---- Footer buttons ---- */

.antcc-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e3e3e3;
}

.antcc-btn {
  appearance: none;
  font: inherit;
  font-weight: 700;
  padding: 12px 20px;
  min-width: 220px;
  border-radius: 4px;
  border: 2px solid #1032cf;
  background: none;
  color: #141414;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.antcc-btn-primary {
  background: #1032cf;
  color: #fff;
}

.antcc-btn:focus-visible {
  outline: 2px solid #1032cf;
  outline-offset: 2px;
}

/* ---- Floating re-open widget (bottom-left, like live) ---- */

.antcc-widget-badge {
  position: fixed;
  left: 10px;
  bottom: 10px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2147483629;
  color: #141414;
  padding: 0;
}

/* At the bottom of the page the badge sits level with the footer's social
 * icons rather than below them (owner, 2026-08-09). 48px = the 72px from the
 * page bottom to the icon row's centre, minus half the badge.
 *
 * Gated at 1640px, and that gate is the whole subtlety: the footer container
 * runs nearly edge-to-edge on narrower screens, so the icons start ~42px from
 * the left while the badge occupies 10–58px. Aligning them there would park the
 * badge ON TOP of the Instagram icon — measured, not guessed. Above 1640px the
 * container's max width leaves 160px of clearance and the two sit side by side.
 * Below it the badge stays in its own corner, which is where it has always been.
 */
@media (min-width: 1640px) {
  .antcc-widget-badge {
    bottom: 48px;
  }
}

.antcc-widget-badge svg {
  width: 28px;
  height: 28px;
}

.antcc-widget-panel {
  position: fixed;
  left: 10px;
  bottom: 10px;
  width: min(451px, calc(100vw - 20px));
  background: #fff;
  color: #141414;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  z-index: 2147483630;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.antcc-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #e3e3e3;
  font-weight: 700;
}

.antcc-widget-close {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  color: #141414;
  display: inline-flex;
}

.antcc-widget-body {
  padding: 18px 24px;
}

.antcc-widget-subhead {
  margin: 0 0 10px;
  font-weight: 700;
}

.antcc-widget-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.antcc-widget-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.antcc-state-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.antcc-state-on {
  color: #1032cf;
}

.antcc-state-off {
  color: #999;
}

.antcc-widget-footer {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #e3e3e3;
}

.antcc-widget-footer .antcc-btn {
  min-width: 0;
  flex: 1 1 0;
  padding: 10px 12px;
  font-size: 14px;
}

/* ---- Responsive (live mobile: stacked full-width buttons, primary first) ---- */

@media (max-width: 767px) {
  .antcc-dialog {
    top: 8px;
    left: 8px;
    right: 8px;
    transform: none;
    width: auto;
    max-height: calc(100dvh - 16px - env(safe-area-inset-bottom, 0px));
  }

  .antcc-header {
    padding: 14px 18px;
  }

  .antcc-body {
    padding: 18px;
  }

  .antcc-footer {
    flex-direction: column-reverse;
    padding: 14px 18px;
  }

  .antcc-btn {
    width: 100%;
    min-width: 0;
  }

  .antcc-tab {
    padding: 12px 4px;
    font-size: 14px;
  }

  .antcc-widget-footer {
    flex-direction: column;
  }
}
