:root {
  --drawer-width: 350px;
  --drawer-min-width: 150px;
  --drawer-max-width: 80vw;

  --latch-width: 75px;

  --drawer-z: 1000;
  --latch-z: 1000;
  --toggle-z: 1000;

  --transition-speed: 0.3s;
  --width-speed: 0.1s;

  --primary-color: #007bff;
  --primary-hover: #0056b3;
}

.drawer-wrapper {
  position: fixed;
  top: 15vh;
  right: 0;
  height: 70vh;
  overflow: visible;
  width: auto;
  z-index: var(--drawer-z);
  transition: transform var(--transition-speed) ease,
    width var(--width-speed) ease;
}
.drawer-wrapper.no-transition {
  transition: none !important;
}

.latch {
  position: absolute;
  top: 3rem;
  left: 0;
  width: var(--latch-width);
  height: var(--latch-width);
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px 0 0 10px;
  cursor: grab;
  user-select: none;
  z-index: var(--latch-z);
  touch-action: none;
  transition: background 0.2s;
  padding: 5px;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
}
.latch:hover {
  background: var(--primary-hover);
}

.latch svg {
  fill: white;
}

.drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--drawer-width);
  min-width: var(--drawer-min-width);
  max-width: var(--drawer-max-width);
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  overflow: hidden;
  display: flex;
  margin-left: var(--latch-width);
}

.drawer-content {
  width: 100%;
  height: 100%;
  padding: 1rem;
  overflow-y: auto;
}

.drawer-consent-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
  overflow: auto;
}
.drawer-consent-content {
  background: #fff;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  text-align: center;
  max-width: 320px;
  width: 100%;
}
.drawer-consent-image {
  margin: auto;
  width: 150px;
}
.drawer-consent-greeting {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  color: var(--primary-color);
}
.drawer-consent-btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1.1rem;
  transition: background 0.2s;
}
.drawer-consent-btn:hover,
.drawer-consent-btn:focus {
  background: var(--primary-hover);
}
.drawer-consent-expl {
  font-size: 0.95rem;
  color: #444;
  margin-top: 0.5rem;
}
.drawer-consent-expl a {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: 500;
  margin-left: 0.2em;
}
