/* Add-in component layouts, scoped for the Scribe host. Generated by scripts/build-scribe-tool-styles.cjs. */
/* ==========================================================================
   THE JURA TRANSLATION LAYER (Theme Engine)
   ========================================================================== */

/* 1. THE DEFAULT STATE (Colorful / Light Mode) */

/* 2. THE DARK GRAY STATE */

/* 3. THE BLACK STATE */
#scribe-tools *, #scribe-tools *::before, #scribe-tools *::after { box-sizing: border-box; }

/* Dynamic Scrollbars */
#scribe-tools ::-webkit-scrollbar { width: 10px; }
#scribe-tools ::-webkit-scrollbar-track { background: transparent; }
#scribe-tools ::-webkit-scrollbar-thumb { 
    background: var(--jura-text-muted); 
    border: 3px solid var(--jura-surface-bg); 
    border-radius: 6px; 
}
#scribe-tools ::-webkit-scrollbar-thumb:hover { background: var(--jura-text-primary); }

/* ==========================================================================
   1. THE PIVOT (Tabs)
   ========================================================================== */
#scribe-tools .ms-Pivot {
  display: flex;
  background-color: var(--ms-bg);
  /* The solid border below the tabs provides a faint track for the gradient to sit on */
  border-bottom: 1px solid var(--ms-border); 
  padding: 0; /* Removed side padding so tabs stretch edge-to-edge */
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

#scribe-tools .ms-Pivot-link {
  flex: 1; /* Forces the tabs to equally consume all horizontal space */
  background: transparent;
  border: none;
  color: var(--jura-text-muted); /* Standard Unselected Grey */
  font-family: var(--ms-font);
  font-size: 12px;
  font-weight: 600;
  padding: 12px 0;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative; /* Required to anchor the gradient line below */
}

#scribe-tools .ms-Pivot-link:hover {
  color: var(--jura-text-primary); /* Slight physical reaction on hover */
  background-color: var(--ms-bg-hover);
}

#scribe-tools .ms-Pivot-link.is-selected {
  color: var(--jura-accent); /* Accent color for selected state */
}



/* ==========================================================================
   2. INTAKE FORM (Native TextFields)
   ========================================================================== */
#scribe-tools .ms-TextField {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

#scribe-tools .ms-Label {
  color: var(--ms-text-primary);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

#scribe-tools .ms-TextField-field {
  background-color: var(--jura-control-bg, #353535);
  border: 1px solid var(--jura-glass-border, #444444);
  border-bottom: 1px solid var(--jura-text-muted, #888888); 
  border-radius: 2px;
  color: var(--jura-text-primary, var(--ms-text-primary));
  font-family: var(--ms-font);
  font-size: 13px;
  padding: 6px 10px;
  width: 100%;
  outline: none;
  transition: border-color 0.1s;
  resize: none;
}

#scribe-tools .ms-TextField-field:focus {
  border-color: var(--jura-accent, var(--ms-brand));
  border-bottom: 2px solid var(--jura-accent, var(--ms-brand));
  padding-bottom: 5px; 
}

#scribe-tools .ms-TextField-field::placeholder { color: var(--jura-text-muted, var(--ms-text-disabled)); }

/* ==========================================================================
   3. NATIVE BUTTONS
   ========================================================================== */
#scribe-tools .ms-Button {
  background-color: var(--jura-surface-hover, #333333);
  border: 1px solid var(--jura-glass-border, #444444);
  color: var(--jura-text-primary, var(--ms-text-primary));
  border-radius: 2px;
  font-family: var(--ms-font);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.1s;
}

#scribe-tools .ms-Button:hover { background-color: var(--jura-divider); border-color: var(--jura-text-muted); }
#scribe-tools .ms-Button:active { background-color: var(--jura-glass-bg); }

#scribe-tools .ms-Button--primary {
  background-color: var(--jura-accent-hover, var(--ms-brand));
  border-color: var(--jura-accent, var(--ms-brand));
  color: var(--jura-accent, #000000); 
}

#scribe-tools .ms-Button--primary:hover { background-color: var(--jura-accent); border-color: var(--jura-accent); color: var(--jura-surface-bg); }

/* ==========================================================================
   4. CONTINUOUS LISTS (The Camouflage Lines)
   ========================================================================== */
#scribe-tools .fluent-list-item {
  position: relative;
  padding: 14px 16px;
  cursor: pointer;
  background: transparent;
}

#scribe-tools .fluent-list-item:hover {
  background-color: var(--ms-bg-hover);
}

/* The Fading Separator Line */
#scribe-tools .fluent-list-item::after {
  content: '';
  position: absolute;
  bottom: 0; 
  left: 10px; 
  right: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--jura-divider) 10%, var(--jura-divider) 90%, transparent);
}

/* Kills the border on the absolute last item */
#scribe-tools .fluent-list-item:last-child::after { display: none; }

#scribe-tools .fluent-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--jura-text-primary, var(--ms-text-primary));
  margin-bottom: 4px;
  line-height: 1.3;
}

#scribe-tools .fluent-subtitle {
  font-size: 11px;
  color: var(--jura-text-muted, var(--ms-text-secondary));
}

/* The Native Insert Action */
#scribe-tools .ms-InsertAction {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--jura-surface-hover, var(--ms-bg-hover));
  border: 1px solid var(--jura-glass-border, var(--ms-border));
  color: var(--jura-text-primary, var(--ms-text-primary));
  border-radius: 2px;
  padding: 4px 10px;
  font-size: 11px;
  font-family: var(--ms-font);
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.1s, background-color 0.1s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#scribe-tools .fluent-list-item:hover .ms-InsertAction { opacity: 1; }
#scribe-tools .ms-InsertAction:hover { background-color: var(--jura-accent, var(--ms-brand)); border-color: var(--jura-accent, var(--ms-brand)); color: var(--jura-surface-bg, #000); }

/* Scanners & Loaders */
#scribe-tools .ms-Spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--jura-glass-border, var(--ms-border));
  border-top: 2px solid var(--jura-accent, var(--ms-brand));
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

#scribe-tools .spin {
  animation: spin 1s linear infinite;
}

#scribe-tools .scanning-text {
  color: var(--jura-text-muted, var(--ms-text-disabled));
  animation: pulse 1.5s infinite alternate;
}
@keyframes pulse { 0% { opacity: 0.5; } 100% { opacity: 1; } }

/* ==========================================================================
   5. INTERACTIVE CARDS
   ========================================================================== */
#scribe-tools .case-card {
  transition: background-color 0.2s ease;
  border-radius: 4px; 
}

#scribe-tools .case-card:hover {
  background-color: var(--jura-surface-hover); 
}

/* ==========================================================================
   6. SUMMARY VIEW REFINEMENTS
   ========================================================================== */
#scribe-tools .hover-tint {
  transition: background-color 0.2s ease;
  border-radius: 4px;
}
#scribe-tools .hover-tint:hover {
  background-color: var(--jura-surface-hover);
}

#scribe-tools .intake-scroll {
    scrollbar-gutter: stable;
}
 
#scribe-tools .intake-scroll::-webkit-scrollbar {
    width: 6px;
}
 
#scribe-tools .clickable {
    cursor: pointer;
}

/* Strategic briefing panel reveal. Deliberately NOT a height transition —
   height:'auto' animations (whether CSS or framer-motion) are unreliable
   inside Word's WebView2 taskpane and can silently collapse to 0px. This
   animates only opacity/transform, which WebView2 handles fine, while the
   panel's actual height is just normal document flow. */
@keyframes briefingFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

#scribe-tools .briefing-fade-in {
    animation: briefingFadeIn 0.15s ease-out;
}