/* ── Approfondimento Drawer ─────────────────────────────────────────────── */

#approfondimento-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1040;
}

#approfondimento-drawer-backdrop.is-visible {
  display: block;
}

#approfondimento-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 520px;
  background: #fff;
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.14);
}

#approfondimento-drawer.is-open {
  transform: translateX(0);
}

.approfondimento-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
  background: #fff;
}

.approfondimento-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bs-primary, #0066cc);
}

.approfondimento-drawer-title-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.approfondimento-drawer-title-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.approfondimento-drawer-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.approfondimento-drawer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #5a5a5a;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.approfondimento-drawer-btn:hover {
  background: #f0f0f0;
  color: #1a1a1a;
}

.approfondimento-drawer-btn .btn-svg {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.approfondimento-drawer-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.approfondimento-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 24px;
  -webkit-overflow-scrolling: touch;
}

.approfondimento-drawer-loading {
  display: flex;
  justify-content: center;
  padding: 56px 0;
}

.approfondimento-drawer-node-title {
  color: var(--bs-primary, #0066cc);
  margin-bottom: 20px;
}

body.approfondimento-drawer-open {
  overflow: hidden;
}

@media (min-width: 992px) {
  #approfondimento-drawer {
    max-width: 600px;
  }
}
