/* Rajasoft Evästeet */
#rscc-root {
  --rscc-primary: #151415;
  --rscc-primary-text: #fff;
  --rscc-bg: #fff;
  --rscc-text: #555;
  --rscc-heading: #151415;
  --rscc-secondary: #333;
  --rscc-secondary-text: #fff;
  --rscc-secondary-border: #333;
  --rscc-radius: 0px;
  --rscc-font: inherit;
  --rscc-transform: uppercase;
  font-family: var(--rscc-font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--rscc-text);
}
#rscc-root *, #rscc-root *::before, #rscc-root *::after { box-sizing: border-box; }
html.rscc-noscroll, html.rscc-noscroll body { overflow: hidden; }

.rscc-overlay {
  position: fixed; inset: 0; z-index: 2147483640;
  background: rgba(0, 0, 0, .5);
}
.rscc-dialog {
  position: fixed; z-index: 2147483641;
  background: var(--rscc-bg); color: var(--rscc-text);
  box-shadow: 0 0 20px rgba(0, 0, 0, .2);
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow-y: auto; overscroll-behavior: contain;
}
.rscc-dialog:focus { outline: none; }
.rscc-pos-center {
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: calc(100% - 32px); max-width: 640px;
  border-radius: var(--rscc-radius);
  padding: 37px 40px;
}
.rscc-pos-center:has(.rscc-view-settings) { max-width: 720px; padding-bottom: 0; }
.rscc-pos-bottom {
  left: 0; right: 0; bottom: 0;
  padding: 24px max(16px, calc((100% - 1140px) / 2));
}

#rscc-root .rscc-title {
  margin: 0 0 12px; padding: 0 24px 0 0;
  font-family: inherit; font-size: 20px; line-height: 1.3; font-weight: 700;
  color: var(--rscc-heading); text-transform: none; letter-spacing: 0;
}
#rscc-root .rscc-text, #rscc-root .rscc-text p { margin: 0 0 6px; font-size: 15px; line-height: 1.6; color: inherit; }
#rscc-root .rscc-link {
  display: inline-block; margin-bottom: 4px;
  font-size: 13px; color: inherit; text-decoration: underline; text-underline-offset: 3px;
}
#rscc-root .rscc-link:hover { text-decoration: none; }

.rscc-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 24px;
}
#rscc-root .rscc-btn {
  flex: 1 1 auto;
  margin: 0; padding: 15px 20px; min-height: 44px;
  font-family: inherit; font-weight: 700; font-size: 13.5px; line-height: 1.1;
  text-transform: var(--rscc-transform); letter-spacing: .02em; white-space: nowrap;
  border-radius: var(--rscc-radius); border: 2px solid transparent;
  box-shadow: 0 0 10px rgba(0, 0, 0, .15);
  cursor: pointer; transition: opacity .15s;
}
#rscc-root .rscc-btn-primary { background: var(--rscc-primary); border-color: var(--rscc-primary); color: var(--rscc-primary-text); }
#rscc-root .rscc-btn-secondary { background: var(--rscc-secondary); border-color: var(--rscc-secondary-border); color: var(--rscc-secondary-text); }
#rscc-root .rscc-btn:hover { opacity: .85; }
#rscc-root .rscc-btn:focus-visible,
#rscc-root .rscc-close:focus-visible,
#rscc-root summary:focus-visible,
#rscc-root .rscc-switch input:focus-visible + .rscc-slider {
  outline: 2px solid var(--rscc-primary); outline-offset: 2px;
}

#rscc-root .rscc-close {
  position: absolute; top: 10px; right: 12px;
  width: 36px; height: 36px; padding: 0; margin: 0;
  background: none; border: 0; color: inherit; cursor: pointer;
  font-size: 28px; line-height: 1;
}

/* Asetusnäkymä: painikkeet pysyvät näkyvissä alareunassa */
.rscc-view-settings .rscc-actions {
  position: sticky; bottom: 0; z-index: 1;
  margin: 16px -40px 0; padding: 16px 40px 20px;
  background: var(--rscc-bg); border-top: 1px solid rgba(0, 0, 0, .1);
}

/* Kategoriat */
.rscc-cats { margin-top: 16px; border-top: 1px solid rgba(0, 0, 0, .12); }
.rscc-cat { padding: 14px 0; border-bottom: 1px solid rgba(0, 0, 0, .12); }
.rscc-cat:last-child { border-bottom: 0; }
.rscc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#rscc-root .rscc-cat strong { color: var(--rscc-heading); font-size: 15px; }
#rscc-root .rscc-cat p { margin: 4px 0 0; font-size: 14px; }
.rscc-always { font-size: 13px; font-weight: 600; white-space: nowrap; }

.rscc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; cursor: pointer; }
#rscc-root .rscc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rscc-slider {
  position: absolute; inset: 0; border-radius: 26px;
  background: #b9b9b9; transition: background .15s;
}
.rscc-slider::before {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .15s;
}
.rscc-switch input:checked + .rscc-slider { background: var(--rscc-primary); }
.rscc-switch input:checked + .rscc-slider::before { transform: translateX(20px); }
.rscc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.rscc-details { margin-top: 6px; font-size: 13px; }
#rscc-root .rscc-details summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; display: list-item; }
.rscc-cookies { margin-top: 8px; }
.rscc-cookie { padding: 8px 10px; margin-bottom: 6px; background: rgba(0, 0, 0, .04); border-radius: var(--rscc-radius); }
.rscc-cookie-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
#rscc-root .rscc-cookie code { font-size: 13px; background: none; padding: 0; color: inherit; }
#rscc-root .rscc-cookie p { margin: 4px 0 0; font-size: 13px; }
#rscc-root .rscc-empty, #rscc-root .rscc-id { font-size: 13px; opacity: .75; margin: 8px 0 0; }

/* Kelluva asetuspainike */
#rscc-float {
  position: fixed; left: 16px; bottom: 16px; z-index: 2147483630;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--rscc-primary, #151415); color: var(--rscc-primary-text, #fff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25); cursor: pointer;
}
#rscc-float[hidden] { display: none; }

/* Evästeluettelo tietosuojasivulla */
.rscc-table-wrap { overflow-x: auto; margin-bottom: 1.5em; }
.rscc-table { width: 100%; border-collapse: collapse; font-size: .9em; }
.rscc-table th, .rscc-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid rgba(0, 0, 0, .12); }

/* Mobiili: banneri alareunan paneelina, painikkeet allekkain */
@media (max-width: 600px) {
  .rscc-pos-center {
    top: auto; bottom: 0; left: 0; transform: none;
    width: 100%; max-width: none; max-height: 90vh; max-height: 90dvh;
    border-radius: var(--rscc-radius) var(--rscc-radius) 0 0;
    padding: 28px 24px 24px;
  }
  .rscc-pos-center:has(.rscc-view-settings) { padding-bottom: 0; }
  .rscc-view-settings .rscc-actions { margin: 16px -24px 0; padding: 14px 24px 18px; }
  .rscc-actions { flex-direction: column; gap: 10px; }
  #rscc-root .rscc-btn { width: 100%; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .rscc-slider, .rscc-slider::before, #rscc-root .rscc-btn { transition: none; }
}
