/* Cookie banner and settings dialog: used on every public layout (transition,
   legacy and exercise pages), so no design tokens of transition.css here */

.cc-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 2000;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 22px;
  border: 1px solid rgba(22, 79, 80, .16);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(16, 59, 62, .22);
  color: #1f3436;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.cc-banner[hidden],
.cc-backdrop[hidden] { display: none; }

.cc-title { margin: 0 0 8px; color: #103b3e; font-size: 18px; font-weight: 750; line-height: 1.3; }
.cc-text { margin: 0; color: #34504f; font-size: 14px; line-height: 1.6; }
.cc-text a { color: #08776e; font-weight: 700; text-underline-offset: 3px; }

.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* "Elfogadom" and "Elutasítom" look the same: no nudging */
.cc-btn {
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid #103b3e;
  border-radius: 10px;
  background: #103b3e;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.cc-btn:hover { background: #1b5356; border-color: #1b5356; }
.cc-btn:focus-visible { outline: 3px solid #e8a400; outline-offset: 2px; }
.cc-btn-ghost { background: #fff; color: #103b3e; }
.cc-btn-ghost:hover { background: #eef6f4; color: #103b3e; }

.cc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 33, 35, .55);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.cc-dialog {
  width: min(100%, 560px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
  color: #1f3436;
}

.cc-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(22, 79, 80, .14);
  border-radius: 12px;
  background: #f4f9f7;
}
label.cc-option { cursor: pointer; }
.cc-option-title { display: block; margin: 0; color: #103b3e; font-size: 15px; font-weight: 700; }
.cc-option-text { display: block; margin: 2px 0 0; color: #506968; font-size: 13px; line-height: 1.5; }
.cc-always { flex: none; color: #08776e; font-size: 13px; font-weight: 700; }

/* Checkbox shown as a switch */
.cc-switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: #c3d0cf;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background-color .18s ease;
}
.cc-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .18s ease;
}
.cc-switch:checked { background: #168f83; }
.cc-switch:checked::after { transform: translateX(20px); }
.cc-switch:focus-visible { outline: 3px solid #e8a400; outline-offset: 2px; }

/* The footer link that reopens the settings looks like the other footer links */
.cookie-settings-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: inherit;
  cursor: pointer;
}
.cookie-settings-link:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .cc-banner { right: 10px; bottom: 10px; left: 10px; padding: 18px 16px; }
  .cc-actions .cc-btn { flex: 1 1 100%; }
}

@media print {
  .cc-banner, .cc-backdrop { display: none !important; }
}
