:root {
  --ytl-privacy-ink: #0a2747;
  --ytl-privacy-muted: #52667a;
  --ytl-privacy-green: #2caf43;
  --ytl-privacy-border: #d7e2e8;
  --ytl-privacy-soft: #f4f7f8;
}

[hidden] {
  display: none !important;
}

.ytl-consent {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
}

.ytl-consent-banner {
  position: absolute;
  left: 24px;
  right: auto;
  bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  width: min(920px, calc(100% - 48px));
  padding: 24px;
  color: var(--ytl-privacy-ink);
  background: rgba(255, 255, 255, .98);
  border: 1px solid var(--ytl-privacy-border);
  border-radius: 16px;
  box-shadow: 0 20px 65px rgba(10, 39, 71, .22);
  pointer-events: auto;
}

.ytl-consent-kicker {
  display: block;
  margin-bottom: 5px;
  color: #168a2d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ytl-consent h2 {
  margin: 0;
  color: var(--ytl-privacy-ink);
  font-size: clamp(23px, 2vw, 30px);
  line-height: 1.18;
}

.ytl-consent p {
  margin: 10px 0 0;
  color: var(--ytl-privacy-muted);
  font-size: 14px;
  line-height: 1.65;
}

.ytl-consent-links {
  display: flex;
  gap: 18px;
}

.ytl-consent a,
.footer-cookie-settings {
  color: #147d29;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ytl-consent-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  align-content: end;
  gap: 9px;
}

.ytl-consent-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #a9bac6;
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.ytl-consent-button.is-primary {
  color: #fff;
  background: var(--ytl-privacy-green);
  border-color: var(--ytl-privacy-green);
}

.ytl-consent-button.is-secondary {
  color: var(--ytl-privacy-ink);
  background: #fff;
}

.ytl-consent-button:hover,
.ytl-consent-button:focus-visible,
.footer-cookie-settings:focus-visible {
  outline: 3px solid rgba(44, 175, 67, .24);
  outline-offset: 2px;
}

.ytl-consent-preferences {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: auto;
}

.ytl-consent-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(5, 25, 44, .62);
  border: 0;
  cursor: default;
}

.ytl-consent-panel {
  position: relative;
  z-index: 1;
  width: min(690px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  padding: 28px;
  overflow: auto;
  color: var(--ytl-privacy-ink);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
}

.ytl-consent-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.ytl-consent-close {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--ytl-privacy-ink);
  background: var(--ytl-privacy-soft);
  border: 1px solid var(--ytl-privacy-border);
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ytl-consent-category {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--ytl-privacy-border);
  border-radius: 10px;
}

.ytl-consent-category strong,
.ytl-consent-category span {
  display: block;
}

.ytl-consent-category strong {
  margin-bottom: 3px;
  font-size: 16px;
}

.ytl-consent-category div > span {
  color: var(--ytl-privacy-muted);
  font-size: 13px;
  line-height: 1.5;
}

.ytl-consent-always {
  padding: 5px 9px;
  color: #167b2b;
  background: #eaf6ec;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.ytl-consent-category input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ytl-consent-switch {
  position: relative;
  width: 46px;
  height: 26px;
  background: #c7d1d8;
  border-radius: 999px;
  transition: background .2s ease;
}

.ytl-consent-switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
  content: "";
  transition: transform .2s ease;
}

.ytl-consent-category input:checked + .ytl-consent-switch {
  background: var(--ytl-privacy-green);
}

.ytl-consent-category input:checked + .ytl-consent-switch::after {
  transform: translateX(20px);
}

.ytl-consent-category input:focus-visible + .ytl-consent-switch {
  outline: 3px solid rgba(44, 175, 67, .25);
  outline-offset: 3px;
}

.ytl-consent-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
}

body.ytl-consent-settings-open {
  overflow: hidden;
}

.footer-legal-links {
  position: relative;
  z-index: 2147482000;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-right: 176px;
}

.footer-cookie-settings {
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.ytls-form-privacy {
  margin: 10px 0 0;
  color: #52667a;
  font-size: 12px;
  line-height: 1.5;
}

.ytls-form-privacy a {
  color: #167b2b;
  font-weight: 700;
}

.google-map-embed > iframe[hidden] {
  display: none !important;
}

.ytl-external-media-placeholder {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 310px;
  padding: 30px;
  color: var(--ytl-privacy-ink);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(44, 175, 67, .08), transparent 52%),
    var(--ytl-privacy-soft);
  border: 1px solid var(--ytl-privacy-border);
  border-radius: inherit;
}

.ytl-external-media-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--ytl-privacy-green);
  background: #fff;
  border-radius: 50%;
}

.ytl-external-media-icon svg {
  width: 24px;
  height: 24px;
}

.ytl-external-media-placeholder strong {
  font-size: 20px;
}

.ytl-external-media-placeholder p {
  max-width: 470px;
  margin: 8px auto 18px;
  color: var(--ytl-privacy-muted);
}

.ytl-legal-page {
  padding: 0 0 90px;
  color: var(--ytl-privacy-ink);
  background: #f3f6f7;
}

.ytl-legal-hero {
  padding: clamp(70px, 9vw, 120px) 0 clamp(55px, 7vw, 88px);
  color: #fff;
  background:
    linear-gradient(110deg, rgba(5, 38, 68, .96), rgba(13, 74, 94, .87)),
    radial-gradient(circle at 80% 20%, rgba(44, 175, 67, .28), transparent 35%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.ytl-legal-hero.has-banner-image {
  background-image:
    linear-gradient(110deg, rgba(5, 38, 68, .90), rgba(13, 74, 94, .78)),
    var(--ytl-legal-banner);
}

.ytl-legal-hero .wrap {
  max-width: 1120px;
}

.ytl-legal-page .ytl-legal-hero h1 {
  max-width: 820px;
  margin: 0;
  color: #fff !important;
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.03;
}

.ytl-legal-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .86);
  font-size: 17px;
  line-height: 1.7;
}

.ytl-legal-card {
  max-width: 1120px;
  margin: -30px auto 0;
  padding: clamp(28px, 5vw, 64px);
  background: #fff;
  border: 1px solid var(--ytl-privacy-border);
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(10, 39, 71, .1);
}

.ytl-legal-card .ytl-legal-updated {
  margin: 0 0 30px;
  color: var(--ytl-privacy-muted);
  font-size: 13px;
}

.ytl-legal-card h2 {
  margin: 46px 0 14px;
  color: var(--ytl-privacy-ink);
  font-size: clamp(25px, 3vw, 34px);
}

.ytl-legal-card h2:first-of-type {
  margin-top: 0;
}

.ytl-legal-card h3 {
  margin: 28px 0 10px;
  color: var(--ytl-privacy-ink);
  font-size: 20px;
}

.ytl-legal-card p,
.ytl-legal-card li {
  color: #40576d;
  font-size: 16px;
  line-height: 1.75;
}

.ytl-legal-card a {
  color: #147d29;
  font-weight: 700;
}

.ytl-legal-card ul {
  padding-left: 22px;
}

.ytl-legal-table-wrap {
  margin: 20px 0;
  overflow-x: auto;
  border: 1px solid var(--ytl-privacy-border);
  border-radius: 10px;
}

.ytl-legal-card table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.ytl-legal-card th,
.ytl-legal-card td {
  padding: 15px;
  color: #40576d;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ytl-privacy-border);
  font-size: 14px;
  line-height: 1.55;
}

.ytl-legal-card th {
  color: var(--ytl-privacy-ink);
  background: var(--ytl-privacy-soft);
  font-weight: 800;
}

.ytl-legal-card tr:last-child td {
  border-bottom: 0;
}

.ytl-legal-note {
  padding: 18px 20px;
  background: #eef7ef;
  border-left: 4px solid var(--ytl-privacy-green);
  border-radius: 6px;
}

/* Narrow screens cannot fit the banner beside the right-hand chat bubble. */
@media (max-width: 1350px) {
  body .ytl-consent .ytl-consent-banner {
    bottom: calc(144px + env(safe-area-inset-bottom, 0px));
    max-height: calc(100vh - 168px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 168px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
  }
}

@media (max-width: 820px) {
  .ytl-consent-banner {
    left: 12px;
    grid-template-columns: 1fr;
    gap: 16px;
    width: calc(100% - 24px);
    padding: 20px;
  }

  .ytl-consent-actions {
    grid-template-columns: 1fr;
  }

  .ytl-consent-button {
    width: 100%;
  }

  .ytl-consent-panel {
    padding: 22px 18px;
  }

  .ytl-consent-panel > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .ytl-consent-category {
    gap: 12px;
    padding: 14px;
  }

  .ytl-consent-always {
    white-space: nowrap;
  }

  .ytl-legal-card {
    margin: -20px 12px 0;
  }

  /* Keep policy hero text away from both edges on small screens. */
  .ytl-legal-hero > .wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    padding-inline: 20px;
  }

  /* Separate copyright and policy links instead of squeezing two columns. */
  .footer .copyright {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 36px;
    line-height: 1.65;
  }

  .footer .footer-legal-links {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    max-width: 100%;
    margin-right: 0;
    gap: 10px 20px;
  }

  .footer .footer-legal-separator {
    display: none;
  }
}
