/* Base layout */
.scribe-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #16181f 0, #050608 55%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f5f5f5;

  display: block;

  /* 0 top, keep side + bottom padding (bottom leaves room for footer) */
  padding: 0 16px 56px;
}



/* Wrapper to stack title + console */
.scribe-page {
  width: 100%;
  max-width: 1120px;
  margin: 64px auto 0;
}


/* New top header with white text */
.scribe-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
  }
  
  /* Console shell */
  .scribe-shell {
    display: flex;
    max-width: 1120px;
    width: 100%;
    min-height: 620px;
    background: #050608;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
      0 24px 60px rgba(0, 0, 0, 0.9),
      0 0 0 1px rgba(255, 255, 255, 0.02);
  }
  
  /* Left “Xbox” edge */
  .scribe-edge {
    width: 72px;
    background: linear-gradient(180deg, #050608 0, #040506 50%, #050608 100%);
    position: relative;
  }
  
  
  /* Main white/black panel */
  .scribe-main {
    flex: 1;
    background: #f7f8fb;
    color: #101216;
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
  }
  
  /* Header */
  .scribe-header {
    display: none;
  }
  
  .scribe-logo-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff 0, #c0ffd8 35%, #00d652 70%, #008a32 100%);
    box-shadow:
      0 0 20px rgba(0, 230, 90, 0.55),
      0 0 3px rgba(0, 0, 0, 0.4);
  }
  
  .scribe-title-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  
  .scribe-title {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #ffffff;
  }
  
  .scribe-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #d1d5db;
  }
  
  /* Main content */
  .scribe-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    gap: 20px;
    margin-top: 18px;
    flex: 1;
    min-height: 0;
  }
  
  .scribe-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  
  .scribe-section-title {
    margin: 0 0 12px;
    font-size: 0.98rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #4b5563;
  }
  
  /* Dropzone */
  .scribe-dropzone {
    position: relative;
    border-radius: 18px;
    border: 1px dashed rgba(15, 23, 42, 0.25);
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    padding: 22px 18px;
    cursor: pointer;
    transition:
      border-color 0.16s ease,
      box-shadow 0.16s ease,
      transform 0.08s ease,
      background 0.2s ease;
    overflow: hidden;
  }
  
  .scribe-dropzone::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(34, 197, 94, 0.12), transparent 40%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  
  .scribe-dropzone:hover {
    border-color: rgba(34, 197, 94, 0.7);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
  }
  
  .scribe-dropzone.scribe-dropzone-active::before {
    opacity: 1;
  }
  
  .scribe-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
  }
  
  .scribe-dropzone-inner {
    position: relative;
    text-align: left;
    pointer-events: none;
  }
  
  .scribe-drop-icon {
    font-size: 1.4rem;
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: #050608;
    color: #e5ffe5;
    margin-bottom: 8px;
  }
  
  .scribe-drop-main {
    margin: 0 0 4px;
    font-weight: 600;
    color: #0f172a;
  }
  
  .scribe-drop-sub {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
  }
  
  /* File meta */
  .scribe-file-meta {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #4b5563;
  }
  
  .scribe-file-name {
    margin: 0 0 2px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .scribe-file-note {
    margin: 0;
    font-size: 0.76rem;
    color: #6b7280;
  }
  
  /* Buttons */
  .scribe-controls {
    margin-top: 16px;
    display: flex;
    gap: 10px;
  }
  
  .scribe-btn {
    appearance: none;
    border-radius: 999px;
    border: none;
    font-size: 0.88rem;
    padding: 8px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    transition:
      background 0.1s ease,
      box-shadow 0.1s ease,
      transform 0.08s ease,
      color 0.1s ease,
      opacity 0.1s ease;
  }
  
  .scribe-btn-primary {
    background: linear-gradient(135deg, #00e35f, #00a849);
    color: #020617;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.55);
  }
  
  .scribe-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
  }
  
  .scribe-btn-primary:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(22, 163, 74, 0.7);
  }
  
  .scribe-btn-ghost {
    background: transparent;
    color: #111827;
    border: 1px solid rgba(148, 163, 184, 0.7);
  }
  
  .scribe-btn-ghost:hover {
    background: rgba(15, 23, 42, 0.04);
  }
  
  .scribe-hint {
    margin-top: 12px;
    font-size: 0.76rem;
    color: #6b7280;
  }
  
  /* Output */
  .scribe-output-wrapper {
    position: relative;
    flex: 1;
    min-height: 260px;
    max-height: 100%;
    border-radius: 18px;
    background: #020617;
    color: #e5e7eb;
    padding: 14px 16px;
    box-shadow:
      inset 0 0 0 1px rgba(15, 23, 42, 0.85),
      0 16px 36px rgba(15, 23, 42, 0.7);
    overflow: hidden;
  }
  
  .scribe-output {
    position: relative;
    width: 100%;
    height: 100%;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.7) transparent;
  }
  
  .scribe-output::-webkit-scrollbar {
    width: 6px;
  }
  
  .scribe-output::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.9);
    border-radius: 999px;
  }
  
  .scribe-output-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.86rem;
    color: #6b7280;
    text-align: center;
    pointer-events: none;
  }
  
  /* Status */
  .scribe-status {
    margin-top: 10px;
    min-height: 18px;
    font-size: 0.76rem;
    color: #4b5563;
  }

/* ─────────────────────────────────────────
   Scribe spinner (two PNG layers) – bottom of transcript
   ───────────────────────────────────────── */

/* Spinner lives *inside* the scroll area and rides at the bottom */
.scribe-spinner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;          /* sit near the bottom edge */
  top: auto;            /* don’t cover the whole height */
  display: none;        /* hidden by default */
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}


.scribe-spinner.active {
  display: flex;
}

/* Bottom layer (scroll / parchment) */
.scribe-spinner-layer1 {
  max-width: 180px;
  max-height: 180px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

/* Top layer (hand + quill), same size, animated */
.scribe-spinner-layer2 {
  position: absolute;
  max-width: 180px;
  max-height: 180px;
  transform-origin: center;
  animation: scribeHandSweep 2.1s ease-in-out infinite;
}

  
  /* Move layer2 side to side ~40% from center */
  @keyframes scribeHandSweep {
    0% {
      transform: translate(-40%, 10%);
    }
    50% {
      transform: translate(40%, 10%);
    }
    100% {
      transform: translate(-40%, 10%);
    }
  }
  
  
  /* Responsive */
  @media (max-width: 900px) {
    .scribe-shell {
      margin: 16px;
      min-height: auto;
    }
    .scribe-edge {
      display: none;
    }
    .scribe-main {
      border-radius: 18px;
    }
    .scribe-content {
      grid-template-columns: minmax(0, 1fr);
    }
    .scribe-output-wrapper {
      min-height: 220px;
    }
  }


/* ─────────────────────────────────────────
   Sidebar + hamburger (Mimic-style)
   ───────────────────────────────────────── */

   :root {
    /* tweak this to change how far past the edge it hides */
    --scribe-sidebar-hide-offset: 20px;
  }
  
  /* Sidebar slides in/out from the left */
  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    box-sizing: border-box;
    background: #000;
    color: #fff;
    z-index: 2000;
    overflow-y: auto;
    padding-top: 70px;
    padding-left: 10px;
  
    transform: translateX(calc(-100% - var(--scribe-sidebar-hide-offset)));
    transition: transform 0.3s ease-in-out;
  }
  
  #sidebar.active {
    transform: translateX(0);
  }
  
  #sidebar .sidebar-header {
    margin-bottom: 10px;
  }
  
  #sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  #sidebar li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid silver;
    position: relative;
  }
  
  #sidebar li a {
    flex: 1;
    text-decoration: none;
    color: silver;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  #sidebar li a:hover {
    color: #fff;
    text-decoration: none;
  }
  
  #sidebar li img {
    width: 20px;
    height: 20px;
  }
  
  /* Hamburger button in the top-left corner */
  #hamburgerMenu {
    position: fixed;
    top: 40px;        /* tweak to taste: 55–70px works well */
    left: 15px;
    z-index: 3000;
  }
  
  
  #hamburgerMenu img {
    width: 32px;
    height: 32px;
    cursor: pointer;
  }
  
  /* Mobile tweak: wider sidebar on small screens */
  @media (max-width: 900px) {
    #sidebar {
      width: 80%;
      transform: translateX(calc(-100% - var(--scribe-sidebar-hide-offset)));
    }
  
    #sidebar.active {
      transform: translateX(0);
    }
  }
  
  

  /* ─────────────────────────────────────────
   Scribe top & bottom bars (white theme)
   ───────────────────────────────────────── */

/* Top support bar – white with dark text */
#scribeSupportBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  background-color: #ffffff;
  color: #111827;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  z-index: 800;
}


.scribe-support-left,
.scribe-support-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Bottom bar – Privacy & Ethics + © */
#scribeFooterBar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  background-color: #ffffff;
  color: #111827;
  font-size: 0.85rem;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  z-index: 900;
}

#scribeFooterBar a {
  text-decoration: none;
  color: #111827;
  font-weight: 600;
  margin-right: 10px;
}

#scribeFooterBar a:hover {
  text-decoration: underline;
}


/* ================= */

/* ===========================
   Scribe Quota Popup (on-brand)
   =========================== */

/* Darkened overlay over the whole app */
.scribe-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 6, 8, 0.72);   /* matches overall dark bg */
  backdrop-filter: blur(4px);
}

/* Modal – white console-style card, like the main panel */
.scribe-modal {
  position: relative;
  max-width: 460px;
  width: 92%;
  padding: 22px 22px 26px;
  border-radius: 20px;
  box-sizing: border-box;

  background: #f7f8fb;               /* same as .scribe-main */
  color: #111827;
  border: 1px solid rgba(148, 163, 184, 0.6);

  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.06);
}

/* Small green accent bar at the top (echoes logo dot / primary button) */
.scribe-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(135deg, #00e35f, #00a849);
}

/* Close button */
.scribe-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.scribe-close-btn:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #111827;
  transform: scale(1.04);
}

/* Header */
.scribe-modal-header {
  padding-top: 6px;  /* makes room under the green bar */
}

.scribe-modal-header h2 {
  margin: 6px 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #050608;
}

.scribe-tier-line {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: #6b7280;
}

#scribeTierLabel {
  font-weight: 700;
  color: #059669; /* green accent */
}

/* Body */
.scribe-modal-body {
  font-size: 0.9rem;
  color: #111827;
}

#scribeQuotaMessage {
  margin: 0 0 10px;
}

/* Usage box: subtle card, like a mini console inside */
.scribe-quota-details {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px dashed rgba(148, 163, 184, 0.9);
  font-size: 0.85rem;
  color: #4b5563;
}

.scribe-quota-details strong {
  color: #111827;
}

.scribe-reset-note {
  margin-top: 4px;
  color: #6b7280;
}

/* Plans button – same vibe as .scribe-btn-primary */
.scribe-plans-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;

  border: none;
  color: #020617;
  background: linear-gradient(135deg, #00e35f, #00a849);
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.55);

  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.scribe-plans-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 30px rgba(22, 163, 74, 0.75);
}

/* Small responsive tweak so it still looks good on phones */
@media (max-width: 600px) {
  .scribe-modal {
    max-width: 95%;
    padding: 18px 18px 22px;
  }

  .scribe-modal-header h2 {
    font-size: 1.1rem;
  }

  .scribe-plans-button {
    width: 100%;
    justify-content: center;
  }
}
