﻿/* Slide-in right panel overlay */
.slide-overlay {
  position: fixed;
  top: var(--header-height, 56px);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
  display: block;
  z-index: 1000;
}

/* Panel body */
.slide-panel {
  position: fixed;
  z-index: 1100;
  top: var(--header-height, 56px);
  right: 0;
  height: calc(100dvh - var(--header-height, 56px));
  width: min(630px, 98vw);
  background: var(--color-card-panel-bg, #fff);
  border: 1px solid var(--color-form-element-border, #e5e5e5);
  box-shadow: -12px 0 30px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 240ms ease;
  display: flex;
  flex-direction: column;
}

/* When open, bring panel into view */
.is-open .slide-panel {
  transform: translateX(0);
}

/* Left slide variant */
.slide-panel--left {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}
.is-open .slide-panel--left {
  transform: translateX(0);
}

/* Also support applying is-open directly on the panel element */
.slide-panel--left.is-open {
  transform: translateX(0);
}

/* Header */
.slide-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border, #eee);
}

.slide-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.slide-panel__close {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

/* Body */
.slide-panel__body {
  padding: 10px 12px;
  overflow: auto;
  flex: 1 1 auto;
}

.slide-panel__body--error {
  color: #d64545;
}

/* Detail rows */
.detail-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0;
}

.detail-label {
  color: var(--color-text-sub, #666);
  font-size: 0.85rem;
}

.detail-value {
  color: var(--color-text, #222);
}

/* Sections */
.detail-section {
  margin-top: 1rem;
}

.detail-section__title {
  font-size: 0.9rem;
  color: var(--color-text, #333);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.detail-list {
  margin: 0;
  padding-left: 1rem;
}

.detail-list__item {
  margin: 0.25rem 0;
}

/* Footer actions */
.detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

@media (max-width: 600px) {
  .slide-panel {
    width: 100vw;
  }
  .detail-row {
    grid-template-columns: 88px 1fr;
  }
}
