/* assets/css/pages/guide.css */

.guide-panel{
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  margin-inline: auto;
  width: min(720px, calc(100vw - 32px));
  max-height: 66.666vh;
  z-index: 7800;
  border-radius: var(--gx-radius-lg);
  border: 1px solid rgba(120,190,255,0.28);
  background:
    linear-gradient(180deg, rgba(18,28,44,0.94), rgba(10,14,22,0.92));
  backdrop-filter: blur(16px);
  box-shadow:
    0 0 0 1px rgba(120,190,255,0.12) inset,
    0 18px 40px rgba(0,0,0,0.55),
    0 0 24px rgba(120,190,255,0.18);
  padding: 16px 18px 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
  transform-origin: top right;
  opacity: 1;
  transform: translateY(0) scaleY(1);
  transition: transform 220ms ease, opacity 220ms ease, max-height 220ms ease, padding 220ms ease, border-width 220ms ease;
}

.guide-panel::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(120,190,255,0.18), rgba(0,0,0,0) 48%),
    radial-gradient(circle at 90% 16%, rgba(255,255,255,0.08), rgba(0,0,0,0) 40%);
  opacity: 0.9;
}

.guide-panel::after{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, rgba(120,190,255,0.9), rgba(120,190,255,0.2));
  box-shadow: 0 0 12px rgba(120,190,255,0.45);
  pointer-events: none;
}

/* keep detail/zoom above guide dialog panel */
#gx-zoom{
  z-index: 8100;
}

/* card z-index should not cover guide rules panel */
:root{
  --gx-card-z-max: 5600;
}

.guide-panel.is-folded{
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-26px) scaleY(0.88);
  pointer-events: none;
}

.guide-rule-tabs{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  flex: 0 0 auto;
}

.guide-rule-tabs .btn{
  min-width: 108px;
}

.guide-panel__head{ margin-bottom: 14px; }

#btn-demo{
  font-weight: 700;
}

#guide-text{
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 8px;
  scrollbar-width: none;
}
#guide-text::-webkit-scrollbar{
  width: 0;
  height: 0;
}

/* keep selection/drag visuals below rules panel */
.gx-selection-box{
  z-index: 5400;
}

.guide-title{
  font-size: 18px;
  font-weight: 700;
  color: #cfe7ff;
  margin: 0 0 6px 0;
}

.guide-sub{
  font-size: 12px;
  color: rgba(200,220,255,0.7);
}

.guide-panel .prose{
  color: rgba(232,243,255,0.92);
}

.guide-hidden{ display: none !important; }

@media (max-width: 900px){
  .guide-panel{
    left: 12px;
    right: 12px;
    width: auto;
    max-height: min(60vh, 520px);
    transform-origin: top center;
  }
}

@media (max-width: 600px){
  .guide-panel{
    top: 64px;
    border-radius: 14px;
    padding: 12px;
  }

  .guide-rule-tabs{
    gap: 6px;
    margin-bottom: 10px;
  }

  .guide-rule-tabs .btn{
    min-width: 92px;
  }
}
