/* Shared cookie consent — main site + project demos */
.yw-consent-blur {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  border: none;
  margin: 0;
  padding: 0;
  background: rgba(20, 20, 18, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: default;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.yw-consent-blur.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.yw-consent-banner {
  position: fixed;
  z-index: 2147483001;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  left: auto;
  width: min(24rem, calc(100vw - 2rem));
  margin: 0;
  padding: 1.15rem 1.2rem 1.1rem;
  border: 1px solid rgba(40, 40, 36, 0.14);
  border-radius: 14px;
  background: rgba(250, 250, 248, 0.98);
  box-shadow: 0 16px 48px rgba(20, 20, 18, 0.18);
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  color: #1c1c1a;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.yw-consent-banner.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.75rem);
}

.yw-consent-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(28, 28, 26, 0.06);
  color: #1c1c1a;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease,
    background 0.15s ease;
}

.yw-consent-close.is-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.yw-consent-close:hover,
.yw-consent-close:focus-visible {
  background: rgba(28, 28, 26, 0.12);
  outline: none;
}

.yw-consent-text {
  margin: 0 1.75rem 0.9rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}

.yw-consent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.yw-consent-more {
  margin-right: auto;
  border: none;
  background: none;
  padding: 0.35rem 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b6b64;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.yw-consent-more:hover {
  color: #1c1c1a;
}

.yw-consent-accept {
  border: none;
  border-radius: 999px;
  min-height: 2.45rem;
  padding: 0.5rem 1.15rem;
  background: #c8f06a;
  color: #1c1c1a;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.yw-consent-accept:hover {
  filter: brightness(0.97);
}

.yw-consent-accept:focus-visible,
.yw-consent-more:focus-visible {
  outline: 2px solid #1c1c1a;
  outline-offset: 2px;
}

.yw-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483002;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top, 0px))
    max(1rem, env(safe-area-inset-right, 0px))
    max(1rem, env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
}

.yw-consent-modal.is-hidden {
  display: none;
}

.yw-consent-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(28, 28, 26, 0.45);
  cursor: pointer;
}

.yw-consent-sheet {
  position: relative;
  z-index: 1;
  width: min(32rem, 100%);
  max-height: min(80vh, 36rem);
  overflow: auto;
  border-radius: 16px 16px 12px 12px;
  background: #fafaf8;
  padding: 1.15rem 1.2rem 1.35rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  color: #1c1c1a;
}

.yw-consent-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.yw-consent-sheet-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.yw-consent-sheet-close {
  border: none;
  border-radius: 999px;
  background: rgba(28, 28, 26, 0.08);
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.yw-consent-sheet p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #3a3a36;
}

.yw-consent-sheet p:last-child {
  margin-bottom: 0;
}

body.yw-consent-lock {
  overflow: hidden !important;
  touch-action: none;
}

@media (min-width: 720px) {
  .yw-consent-modal {
    align-items: center;
  }

  .yw-consent-sheet {
    border-radius: 16px;
  }
}

@media (max-width: 640px) {
  .yw-consent-banner {
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    width: auto;
  }

  .yw-consent-actions {
    width: 100%;
  }

  .yw-consent-more {
    margin-right: 0;
    width: 100%;
    text-align: left;
  }

  .yw-consent-accept {
    flex: 1;
    width: 100%;
  }
}
