body.drawer-open {
  overflow: hidden;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 20;
  pointer-events: none;
}

.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(280px, 85vw);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-gray);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 25;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 16px rgba(0, 0, 0, 0.35);
}

body.drawer-open .side-drawer {
  transform: translateX(0);
}

body.drawer-open .drawer-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-gray);
}

.drawer-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.drawer-title {
  color: var(--accent-gold);
  font-weight: 600;
}

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.drawer-link {
  background: transparent;
  border: none;
  text-align: left;
  color: var(--text-primary);
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.drawer-link:hover,
.drawer-link:focus {
  background: var(--hover-overlay);
  outline: none;
}

.drawer-profile {
  font-family: inherit;
}

.drawer-footer {
  margin-top: auto;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-gray);
}

.drawer-attribution-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
}

.drawer-attribution-link:hover {
  color: var(--text-primary);
}

/* Badge for notification counts */
.drawer-badge {
  background: var(--status-error);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.4rem;
  vertical-align: middle;
  display: inline-block;
  line-height: 1.2;
  min-width: 1rem;
  text-align: center;
}

.attribution-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attribution-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 400px;
  width: 90%;
  color: var(--text-primary);
}

.attribution-dialog h3 {
  margin: 0 0 0.75rem;
  color: var(--accent-gold);
}

.attribution-dialog p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.attribution-dialog a {
  color: var(--accent-gold);
}

.attribution-usage {
  color: var(--text-secondary);
  font-size: 0.85rem !important;
}

.attribution-close {
  margin-top: 1rem;
  background: var(--accent-gold);
  color: #1a1a2e;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 480px) {
  .drawer-header {
    padding: 0.8rem 1rem;
  }

  .drawer-link {
    padding: 0.8rem 1rem;
  }
}
