/* Shared Side Panel Component - Template for sliding panels (roles, notes, etc.) */

/* Overlay backdrop */
.side-panel-overlay,
.sp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.side-panel-overlay.active,
.sp-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Panel */
.side-panel,
.sp-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 420px;
  max-width: 100%;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.25);
  z-index: 1200;
  border-radius: 12px 0 0 12px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.side-panel.open,
.sp-panel.open {
  transform: translateX(0);
}

.side-panel.hidden,
.sp-panel.hidden {
  display: none;
}

/* Shared panel layout - reusable structure */
.panel-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.panel-header {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
  position: relative;
}

.panel-header-close {
  position: absolute;
  right: 12px;
  top: 12px;
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  color: #666;
  z-index: 10;
  transition: color 0.2s;
}

.panel-header-close:hover {
  color: #333;
}

.panel-header-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #222;
  padding-right: 32px;
}

.panel-header-subtitle {
  font-size: 13px;
  color: #888;
  margin: 2px 0 0;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
  .side-panel {
    width: 100%;
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .panel-header-title {
    font-size: 16px;
  }
}
