/* ============================================
   TOOLSLAB EXCLUSIVE — LAYOUT
   Shell, sidebar, main col, screen visibility,
   mobile responsive. Mirrors Lite's layout.css
   patterns — scoped to .exclusive-shell.
   ============================================ */

/* ──────────────── SIDEBAR ENTRY BUTTON (in Lite sidebar) ──────────────── */
.sidebar-exclusive-row {
  padding: var(--sp-2) var(--sp-3);
  margin: var(--sp-1) 0;
}

.sidebar-exclusive-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  border: 1px solid rgba(200, 155, 60, 0.28);
  background: linear-gradient(
    135deg,
    rgba(200, 155, 60, 0.08) 0%,
    rgba(200, 155, 60, 0.04) 100%
  );
  color: var(--text-primary);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}
.sidebar-exclusive-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(200, 155, 60, 0.14) 0%,
    rgba(200, 155, 60, 0.08) 100%
  );
  border-color: rgba(200, 155, 60, 0.50);
  box-shadow: 0 0 12px rgba(200, 155, 60, 0.15);
}
.sidebar-exclusive-btn svg {
  color: #C89B3C;
}
.sidebar-exclusive-label {
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ──────────────── EXCLUSIVE SHELL ──────────────── */
.exclusive-shell {
  position: absolute;
  inset: 0;
  display: none; /* toggled by router.js */
  flex-direction: row;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-app);
  z-index: 10;
}

/* ──────────────── EXCLUSIVE SIDEBAR ──────────────── */
.exclusive-sidebar {
  width: var(--sidebar-x-w, 240px);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-x, rgba(200,155,60,0.18));
  flex-shrink: 0;
  overflow: hidden;
}

.exclusive-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  height: var(--topbar-h);
  flex-shrink: 0;
}

.exclusive-sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  background: linear-gradient(135deg, #C89B3C, #E8BC5C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.exclusive-sidebar-close {
  display: none; /* shown only on mobile */
}

.exclusive-back-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: calc(100% - var(--sp-6));
  margin: 0 var(--sp-3) var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease);
}
.exclusive-back-btn:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.exclusive-back-btn svg {
  width: 14px; height: 14px; flex-shrink: 0;
}

.exclusive-newchat-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: calc(100% - var(--sp-6));
  margin: 0 var(--sp-3) var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: none;
  background: linear-gradient(135deg, #C89B3C, #D4A843);
  color: #0a0a0a;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(200, 155, 60, 0.25);
  transition: box-shadow var(--dur-base) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.exclusive-newchat-btn:hover {
  box-shadow: 0 0 24px rgba(200, 155, 60, 0.40);
}
.exclusive-newchat-btn:active { transform: scale(0.98); }
.exclusive-newchat-btn svg { width: 14px; height: 14px; }

.exclusive-sidebar-scroll {
  flex: 1;
  min-height: 0;
  padding: var(--sp-2) var(--sp-3);
}

.exclusive-history-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exclusive-history-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.exclusive-history-item:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.exclusive-history-item.is-active {
  background: rgba(200, 155, 60, 0.10);
  color: #C89B3C;
  font-weight: 500;
}

.exclusive-sidebar-footer {
  padding: var(--sp-4);
  border-top: 1px solid var(--border-x, rgba(200,155,60,0.15));
  flex-shrink: 0;
}

.exclusive-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  background: linear-gradient(135deg, rgba(200,155,60,0.15), rgba(200,155,60,0.08));
  border: 1px solid var(--border-x);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: #C89B3C;
  letter-spacing: 0.03em;
}

/* ──────────────── EXCLUSIVE MAIN COL ──────────────── */
.exclusive-main-col {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ──────────────── EXCLUSIVE SCREENS ──────────────── */
.exclusive-screen {
  display: none;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.exclusive-screen.is-active { display: flex; }

/* ──────────────── EXCLUSIVE SIDEBAR OVERLAY (mobile) ──────────────── */
.exclusive-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: calc(var(--z-sidebar) - 1);
}

/* ──────────────── RESPONSIVE: MOBILE ──────────────── */
@media (max-width: 860px) {
  .exclusive-sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform var(--dur-slow) var(--ease);
    z-index: var(--z-sidebar);
    box-shadow: var(--sh-xl);
    width: min(280px, 84vw);
  }
  .exclusive-shell[data-sidebar="open"] .exclusive-sidebar {
    transform: translateX(0);
  }
  .exclusive-shell[data-sidebar="open"] .exclusive-sidebar-overlay {
    display: block;
  }
  .exclusive-sidebar-close {
    display: flex;
  }
}

@media (min-width: 861px) {
  .exclusive-sidebar-close { display: none; }
}
