/* ========================================
   CORE.CSS - UNIFIED SHELL STYLESHEET
   Digital Case-Orientation & Navigation Suite
   ======================================== */

:root {
  --bg: #fff;
  --ink: #0b1220;
  --muted: #475569;
  --accent: #2563eb;
  --rule: #e5e7eb;
  --tab: #777B9E;
  --tab-active: #fff;
}

/* ========================================
   BASE DOCUMENT
   ======================================== */

html, body {
  overflow: hidden;
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}


a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ========================================
   MAIN LAYOUT
   ======================================== */

#main {
  display: flex;
  min-height: 100%;
}


#content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ========================================
   TAB BAR
   ======================================== */

#tabs {
  background: #B0AEAE;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  border-bottom: 1px solid var(--rule);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--tab);
  color: #fff;
  border: 1px solid green;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  user-select: none;
  max-width: 200px;
  font-size: 13px;
}

.tab-btn .label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.tab-btn .close {
  opacity: 0.7;
  flex-shrink: 0;
  font-size: 12px;
}

.tab-btn .close:hover {
  opacity: 1;
  color: #f00;
}

.tab-btn.active {
  background: var(--tab-active);
  border-color: #0e0;
  color: #000;
}

.tab-btn.permanent {
  background: #9FC2C7;
  border: 1px solid #00dd00;
  color: #111;
  font-weight: 600;
}

.tab-btn.permanent:hover {
  background: #cbd5e1;
  border: 1px solid #bb0000;
  
}

.tab-btn.notepad {
  background: #9FC2C7;
  border: 1px solid #00dd00;
  color: #111;
  font-weight: 600;
}

.tab-btn.notepad:hover {
  background: #cbd5e1;
  border: 1px solid #bb0000;
}


/* ========================================
   PANES (IFRAME CONTAINER)
   ======================================== */

#panes {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #fff;
  overflow: hidden;
}

.pane {
  position: absolute;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
  background: #fff;
}

.pane.active {
  visibility: visible;
  pointer-events: auto;
  padding-bottom: 32px;
}

.pane iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

/* Deprecated - retained for backwards compatibility */
.pane object {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

/* ========================================
   RIBBON (BOTTOM NAVIGATION)
   ======================================== */

#ribbon {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  gap: 4px;
  justify-content: left;
  background: #1f2937;
  border-top: 1px solid #111;
  padding: 4px 0;
  z-index: 99;
}

#ribbon button {
  color: #fff;
  background: #021702;
  border: 1px solid green;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
}

#ribbon button:hover {
  background: #064507;
  border: 1px solid #bb0000;
}

#ribbon button.active {
  background: #255703;
  border: 1px solid green;
}

.chronology-indicator {
  color: #fff;
  font-size: 13px;
  margin-right: auto;
  opacity: 0.75;
  user-select: none;
}

.chronology-indicator:hover {
  opacity: 1;
}

.copy { 
  color: #fff;
  font-size: 13px;
  margin-left: auto;
  opacity: 0.75;
  user-select: none;}
  

.copy:hover {
  opacity: 1;
}
/* ========================================
   PANELS (FLYOUT MENUS)
   ======================================== */

#panels {
  position: fixed;
  bottom: 30px;
  left: 0;
  width: 100%;
  z-index: 100;
  pointer-events: none;
}

.panel {
  width: 100%;
  background: #fff;
  border-top: 0;
  overflow: hidden;
  height: 0;
  transition: height 0.35s ease;
  pointer-events: none;
}

.panel.active {
  pointer-events: auto;
  overflow-y: auto;
}

/* Panel heights when active */
#panel-epis.active {
  height: 40px;
  background: #fff;
}

#panel-prov.active {
  height: 40px;
  background: #fff;
}

#panel-orient.active {
  height: 40px;
  background: #fff;
}

#panel-client.active {
  height: 40px;
  background: #fff;
}


/* ========================================
   PANEL MENU BLOCKS
   ======================================== */

.menu-block {
  padding: 6px 8px;
  line-height: 1.25;
}

.menu-block h3 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
}

.menu-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-block li {
  margin: 0;
  padding: 0;
}

.menu-block a {
  display: block;
  text-decoration: none;
  color: inherit;
  font-size: 14px;
  padding: 2px 0;
  border: 1px solid green;
}

/* Inline link layout for all panels */
#panel-epis .menu-block,
#panel-prov .menu-block,
#panel-orient .menu-block,
#panel-client .menu-block
{
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  flex-wrap: wrap;
}

#panel-epis h3,
#panel-prov h3,
#panel-orient h3,
#panel-client h3
{
  display: contents;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

#panel-epis ul,
#panel-prov ul,
#panel-orient ul,
#panel-client ul
{
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

#panel-epis li,
#panel-prov li,
#panel-orient li,
#panel-client li
{
  display: contents;
}

#panel-epis a,
#panel-prov a,
#panel-orient a,
#panel-client a
{
  padding: 2px 6px;
  text-decoration: none;
  color: inherit;
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid green;
  border-radius: 4px;
  background: #e5e7eb;
}

#panel-epis a:hover,
#panel-prov a:hover,
#panel-orient a:hover,
#panel-client a:hover
{
  background: #A0C2E8;
  border: 1px solid red;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.back {
  color: #fff;
  background: #374151;
  border: 1px solid #111;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.back:hover {
  background: #4b5563;
}

.back.secondary {
  background: #e5e7eb;
  color: #111827;
}

/* Print exclusion */
@media print {
  .no-print {
    display: none !important;
  }
