/* ==========================================================================
   DEMO ENHANCEMENTS & CLIENT PRESENTATION TOOLBAR
   Komunitas Gandrung Sastra Margoyoso, Pati
   Design Language: Ruang Pinggir (Paper, Ink, Stage Navy, Terracotta, Amber)
   ========================================================================== */

/* Custom Scrollbars to keep archival paper aesthetic */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #ECE2CD;
}
::-webkit-scrollbar-thumb {
  background: #22201C;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: #B4472B;
}

/* Rubber Stamp Styling */
.stamp-border {
  border: 2px dashed #B4472B;
  box-shadow: 2px 2px 0px 0px #B4472B;
}

/* Tactile Hover Shadow */
.hover-lift {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0px 0px #22201C !important;
}

/* Toast Notifications */
#demo-toast-container {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.demo-toast {
  pointer-events: auto;
  background: #F3EAD7;
  color: #22201C;
  border: 2px solid #22201C;
  box-shadow: 4px 4px 0px 0px #22201C;
  padding: 12px 18px;
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.demo-toast.toast-success {
  border-color: #2F5D58;
  border-left: 6px solid #2F5D58;
}
.demo-toast.toast-warning {
  border-color: #E0A83A;
  border-left: 6px solid #E0A83A;
}
@keyframes toastSlideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes toastFadeOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(10px);
    opacity: 0;
  }
}

/* Floating Client Demo Navigator Bar */
#client-demo-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99990;
  background: #1F2A44;
  color: #F3EAD7;
  border: 2px solid #22201C;
  border-radius: 9999px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 4px 4px 0px 0px #22201C;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 95vw;
}

#client-demo-bar.minimized {
  transform: translateX(-50%) translateY(calc(100% + 20px));
}

#client-demo-bar .demo-badge {
  background: #E0A83A;
  color: #22201C;
  padding: 4px 10px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

#client-demo-bar .demo-link {
  color: #ECE2CD;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
#client-demo-bar .demo-link:hover {
  background: rgba(243, 234, 215, 0.15);
  color: #ffffff;
}
#client-demo-bar .demo-link.active {
  background: #B4472B;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 1px 1px 0px 0px #0e1422;
}

#client-demo-toggle {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 99995;
  background: #1F2A44;
  color: #E0A83A;
  border: 2px solid #22201C;
  box-shadow: 3px 3px 0px 0px #22201C;
  padding: 8px 12px;
  border-radius: 9999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, background 0.15s;
}
#client-demo-toggle:hover {
  background: #2A395C;
  color: #ffffff;
  transform: translateY(-2px);
}

@media (max-width: 1024px) {
  #client-demo-bar {
    bottom: 66px;
    padding: 4px 8px;
    gap: 6px;
    max-width: 98vw;
  }
  #client-demo-toggle {
    bottom: 66px;
  }
  #client-demo-bar .demo-badge span:last-child {
    display: none;
  }
  #demo-links-list .demo-link span:last-child {
    font-size: 11px;
  }
}

/* Modal Backdrop */
.demo-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 68, 0.7);
  backdrop-filter: blur(4px);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.demo-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}
.demo-modal-card {
  background: #F3EAD7;
  color: #22201C;
  border: 2px solid #22201C;
  box-shadow: 8px 8px 0px 0px #22201C;
  border-radius: 4px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.demo-modal-backdrop.active .demo-modal-card {
  transform: scale(1);
}
