.rc,
.rc-locked {
  --rc-button: #000000;
  --rc-text: #171716;
  --rc-bg: #ffffff;
  --rc-line: #deddd8;
  --rc-muted: #6e6d67;
  --rc-button-text: #ffffff;
  --rc-bar-bg: #ffffff;
  --rc-bar-text: #171716;
  --rc-bar-muted: #6e6d67;
}

/* Ribal ja nurga nupul on oma värvid, seadete aknal oma. */
#rebel-cookies .rc-bar,
#rebel-cookies .rc-float {
  --rc-bg: var(--rc-bar-bg);
  --rc-text: var(--rc-bar-text);
  --rc-muted: var(--rc-bar-muted);
}

#rebel-cookies,
#rebel-cookies *,
.rc-static,
.rc-static *,
.rc-locked,
.rc-locked * { box-sizing: border-box; }

#rebel-cookies [hidden] { display: none !important; }

#rebel-cookies,
.rc-static,
.rc-locked {
  color: var(--rc-text);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

#rebel-cookies p,
.rc-static p,
.rc-locked p { margin: 0; padding: 0; color: inherit; font-size: 14px; line-height: 1.5; text-transform: none; }

#rebel-cookies a,
.rc-static a {
  color: var(--rc-text);
  font-weight: 620;
  text-decoration: none;
  border-bottom: 1px solid #c9c8c2;
  box-shadow: none;
}
#rebel-cookies a:hover,
.rc-static a:hover { color: var(--rc-text); border-color: var(--rc-text); }

#rebel-cookies button,
.rc-locked button {
  margin: 0;
  min-width: 0;
  width: auto;
  height: auto;
  font-family: inherit;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  text-shadow: none;
  box-shadow: none;
  outline-offset: 2px;
}

/* Riba */

#rebel-cookies .rc-bar {
  position: fixed;
  z-index: 999990;
  right: clamp(14px, 2vw, 24px);
  bottom: clamp(14px, 2vw, 24px);
  left: clamp(14px, 2vw, 24px);
  max-width: 760px;
  margin: 0 auto;
  padding: 20px clamp(20px, 2.4vw, 28px);
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
  border: 1px solid var(--rc-line);
  border-radius: var(--rc-r-box, 20px);
  background: var(--rc-bg);
  color: var(--rc-text);
  box-shadow: 0 24px 60px rgba(23, 23, 22, .18);
}
#rebel-cookies .rc-bar a { border-bottom-color: var(--rc-bar-link, #c9c8c2); }
#rebel-cookies .rc-bar a:hover { border-bottom-color: var(--rc-text); }
#rebel-cookies .rc-bar-btns { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

#rebel-cookies .rc-bar-btns button,
#rebel-cookies .rc-actions button,
.rc-locked .rc-locked-btns button {
  min-height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rc-line);
  border-radius: var(--rc-r-btn, 999px);
  background: var(--rc-bg);
  color: var(--rc-text);
  font-size: 14px;
  font-weight: 620;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
#rebel-cookies .rc-bar-btns button:hover,
#rebel-cookies .rc-actions button:hover,
.rc-locked .rc-locked-btns button:hover { border-color: var(--rc-text); background: var(--rc-bg); color: var(--rc-text); }

#rebel-cookies .rc-bar-btns button.rc-primary,
#rebel-cookies .rc-actions button.rc-primary,
.rc-locked .rc-locked-btns button.rc-primary {
  border-color: var(--rc-button);
  background: var(--rc-button);
  color: var(--rc-button-text);
  font-weight: 670;
}
#rebel-cookies .rc-bar-btns button.rc-primary:hover,
#rebel-cookies .rc-actions button.rc-primary:hover,
.rc-locked .rc-locked-btns button.rc-primary:hover { border-color: var(--rc-button); background: var(--rc-button); color: var(--rc-button-text); opacity: .86; }

/* Seadete aken */

#rebel-cookies .rc-overlay {
  position: fixed;
  z-index: 999999;
  inset: 0;
  padding: clamp(14px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  background: rgba(23, 23, 22, .42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
#rebel-cookies .rc-dialog {
  width: min(620px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--rc-r-dialog, 24px);
  background: var(--rc-bg);
  box-shadow: 0 40px 90px rgba(23, 23, 22, .28);
}
#rebel-cookies .rc-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#rebel-cookies .rc-top h2 {
  margin: 0;
  padding: 0;
  color: var(--rc-text);
  font-family: inherit;
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: 560;
  line-height: 1.15;
  letter-spacing: -.04em;
  text-transform: none;
}
#rebel-cookies .rc-x {
  width: 38px;
  height: 38px;
  padding: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rc-line);
  border-radius: var(--rc-r-x, 50%);
  background: var(--rc-bg);
  color: var(--rc-text);
  cursor: pointer;
}
#rebel-cookies .rc-x:hover { border-color: var(--rc-text); background: var(--rc-bg); color: var(--rc-text); }
#rebel-cookies .rc-lead { margin-top: 16px; color: var(--rc-muted); line-height: 1.55; }

.rc .rc-cat { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--rc-line); }
.rc-static .rc-cat:first-child { margin-top: 0; }
.rc .rc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rc .rc-cat-name { font-size: 16px; font-weight: 620; }
.rc .rc-cat-state { color: var(--rc-muted); font-size: 13px; }
#rebel-cookies .rc-cat p,
.rc-static .rc-cat p { margin-top: 10px; line-height: 1.55; }
#rebel-cookies .rc-cat p.rc-hosts,
.rc-static .rc-cat p.rc-hosts { color: var(--rc-muted); font-size: 13px; overflow-wrap: anywhere; }

#rebel-cookies .rc-switch { position: relative; flex: 0 0 auto; display: inline-flex; margin: 0; cursor: pointer; }
#rebel-cookies .rc-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
#rebel-cookies .rc-switch-track {
  width: 46px;
  height: 26px;
  display: block;
  position: relative;
  border-radius: 999px;
  background: #d9d8d3;
  transition: background .2s ease;
}
#rebel-cookies .rc-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rc-bg);
  transition: transform .2s ease;
}
#rebel-cookies .rc-switch input:checked + .rc-switch-track { background: var(--rc-button); }
#rebel-cookies .rc-switch input:checked + .rc-switch-track::after { transform: translateX(20px); }
#rebel-cookies .rc-switch input:focus-visible + .rc-switch-track { outline: 2px solid var(--rc-text); outline-offset: 3px; }

.rc .rc-details { margin-top: 12px; }
.rc .rc-details summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rc-text);
  font-size: 13px;
  font-weight: 620;
  list-style: none;
  cursor: pointer;
}
.rc .rc-details summary::-webkit-details-marker { display: none; }
.rc .rc-details summary::marker { content: ""; }
.rc .rc-details summary svg { flex: 0 0 auto; transition: transform .2s ease; }
.rc .rc-details[open] summary svg { transform: rotate(180deg); }
.rc .rc-details summary:focus-visible { outline: 2px solid var(--rc-text); outline-offset: 3px; border-radius: 4px; }
.rc .rc-details .rc-table { margin-top: 6px; }

.rc .rc-table {
  width: 100%;
  margin: 16px 0 0;
  border: 0;
  border-collapse: collapse;
  background: none;
  font-size: 13px;
  table-layout: auto;
}
.rc .rc-table th,
.rc .rc-table td {
  padding: 9px 10px 9px 0;
  border: 0;
  border-bottom: 1px solid #eeede9;
  background: none;
  color: var(--rc-text);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}
.rc .rc-table th { color: var(--rc-muted); font-weight: 620; }
.rc .rc-cookie-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.rc .rc-cookie-service { display: block; color: var(--rc-muted); font-size: 12px; }

#rebel-cookies .rc-actions { margin-top: 26px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--rc-line); }
#rebel-cookies .rc-id { margin-top: 14px; color: var(--rc-muted); font-size: 12px; word-break: break-all; }

/* Alati kättesaadav nupp valiku muutmiseks. */

#rebel-cookies .rc-float {
  position: fixed;
  z-index: 999980;
  left: clamp(14px, 2vw, 24px);
  bottom: clamp(14px, 2vw, 24px);
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rc-line);
  border-radius: var(--rc-r-btn, 999px);
  background: var(--rc-bg);
  color: var(--rc-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(23, 23, 22, .10);
  transition: color .2s ease, border-color .2s ease;
}
#rebel-cookies .rc-float:hover,
#rebel-cookies .rc-float:focus-visible { color: var(--rc-text); border-color: var(--rc-text); background: var(--rc-bg); }
#rebel-cookies .rc-float svg { flex: 0 0 auto; }
#rebel-cookies.rc-behind .rc-bar,
#rebel-cookies.rc-behind .rc-float { visibility: hidden; }
body.rc-modal-open { overflow: hidden; }
body.rc-modal-open #rebel-cookies .rc-float { display: none; }

/* Lukus video või kaart sisu sees */

.rc-locked {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 1px solid #deddd8;
  border-radius: var(--rc-r-locked, 16px);
  background: #f6f5f2;
  color: #171716;
  text-align: center;
}
.rc-locked .rc-locked-inner { max-width: 440px; }
.rc-locked p { margin: 0 0 14px; }
.rc-locked .rc-locked-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Asukoht ja suurtähed */

#rebel-cookies.rc-pos-left .rc-bar { margin-left: 0; }
#rebel-cookies.rc-pos-right .rc-bar { margin-right: 0; }
#rebel-cookies.rc-pos-right .rc-float { right: clamp(14px, 2vw, 24px); left: auto; }

#rebel-cookies.rc-upper .rc-bar-btns button,
#rebel-cookies.rc-upper .rc-actions button { text-transform: uppercase; letter-spacing: .03em; }

/* Kast nurgas */

#rebel-cookies.rc-d-box .rc-bar {
  max-width: 450px;
  padding: 32px 24px 24px;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  border: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .24);
}
#rebel-cookies.rc-d-box .rc-bar p { width: 100%; }
#rebel-cookies.rc-d-box .rc-bar-btns { flex-wrap: wrap; gap: 16px 24px; }
#rebel-cookies.rc-d-box .rc-bar-btns button {
  min-height: 50px;
  padding: 0 24px;
  border-color: currentColor;
  background: transparent;
  font-weight: 700;
}
#rebel-cookies.rc-d-box .rc-bar-btns button:hover { border-color: currentColor; background: transparent; opacity: .86; }
#rebel-cookies.rc-d-box .rc-bar-btns button.rc-primary,
#rebel-cookies.rc-d-box .rc-bar-btns button.rc-primary:hover { border-color: var(--rc-button); background: var(--rc-button); color: var(--rc-button-text); }
#rebel-cookies.rc-d-box .rc-bar-btns button.rc-more {
  min-height: 0;
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
#rebel-cookies.rc-d-box .rc-bar-btns button.rc-more:hover { opacity: 1; text-decoration-thickness: 2px; }

/* Riba üle lehe */

#rebel-cookies.rc-d-bar .rc-bar {
  right: 0;
  bottom: 0;
  left: 0;
  max-width: none;
  margin: 0;
  padding: 16px clamp(16px, 4vw, 48px);
  justify-content: space-between;
  border-width: 1px 0 0;
  border-radius: var(--rc-r-box, 20px) var(--rc-r-box, 20px) 0 0;
  box-shadow: 0 -10px 30px rgba(23, 23, 22, .10);
}
#rebel-cookies.rc-d-bar .rc-bar p { max-width: 860px; }

@media (max-width: 780px) {
  #rebel-cookies .rc-bar { flex-direction: column; align-items: stretch; gap: 16px; }
  #rebel-cookies .rc-bar-btns { flex-wrap: wrap; }
  #rebel-cookies .rc-bar-btns button,
  #rebel-cookies .rc-actions button { flex: 1 1 auto; }
  #rebel-cookies.rc-d-box .rc-bar { align-items: flex-start; gap: 20px; }
  #rebel-cookies.rc-d-box .rc-bar-btns { width: 100%; }
  #rebel-cookies.rc-d-box .rc-bar-btns button.rc-more { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  #rebel-cookies *,
  .rc-locked * { transition: none !important; }
}
