/**
 * ============================================================================
 * GIRI ORBIT — SEARCHABLE FONT PICKER & ADVANCED SELECTION STYLES (fontsAndSelection.css)
 * By GIRI Corporation (A Subsidiary of Giri Group)
 * ============================================================================
 */

/* -------------------------------------------------------------------------- */
/* 1. GLOBAL TEXT SELECTION HIGHLIGHT                                          */
/* -------------------------------------------------------------------------- */
::selection {
  background: #2563eb !important;
  color: #ffffff !important;
}
::-moz-selection {
  background: #2563eb !important;
  color: #ffffff !important;
}

/* -------------------------------------------------------------------------- */
/* 2. SEARCHABLE FLUENT FONT PICKER DROPDOWN                                   */
/* -------------------------------------------------------------------------- */
.fluent-font-picker-wrap {
  position: relative;
  display: inline-block;
  user-select: none;
}

.fluent-font-picker-btn {
  height: 26px;
  min-width: 140px;
  max-width: 160px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 12.5px;
}

.fluent-font-picker-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.fluent-font-picker-btn.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.font-picker-active-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  text-align: left;
  flex: 1;
}

.font-picker-arrow {
  font-size: 10px;
  color: #94a3b8;
  flex-shrink: 0;
}

.fluent-font-picker-dropdown {
  position: fixed !important;
  width: 300px !important;
  max-height: 380px !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 45px -4px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
  z-index: 100000 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  animation: fontDropdownPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fontDropdownPop {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.font-picker-search-box {
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  flex-shrink: 0;
}

.font-search-icon {
  color: #64748b;
  flex-shrink: 0;
}

.font-picker-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 12.5px;
  color: #0f172a;
  font-family: inherit;
}

.font-picker-search-input::placeholder {
  color: #94a3b8;
}

.font-picker-search-clear {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
}

.font-picker-search-clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.font-picker-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.font-picker-group-heading {
  padding: 6px 12px 2px 12px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
  background: #ffffff;
}

.font-picker-item {
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.1s;
  color: #0f172a;
}

.font-picker-item:hover,
.font-picker-item.highlighted {
  background: #f1f5f9;
}

.font-picker-item.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.font-item-preview {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.font-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.font-item-tag {
  font-size: 10px;
  color: #94a3b8;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 3px;
}

.font-item-check {
  font-size: 12px;
  color: #2563eb;
  font-weight: 800;
}

.font-picker-no-results {
  padding: 24px 16px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

/* -------------------------------------------------------------------------- */
/* 3. DRIFT FLOATING MINI FORMATTING TOOLBAR                                   */
/* -------------------------------------------------------------------------- */
.drift-floating-toolbar {
  position: absolute;
  background: #0f172a;
  color: #ffffff;
  border-radius: 8px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.15);
  z-index: 1000;
  animation: floatPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

@keyframes floatPop {
  from { transform: scale(0.9) translateY(4px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.drift-float-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12.5px;
  transition: background 0.15s;
}

.drift-float-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.drift-float-btn.active {
  background: #2563eb;
}

.drift-float-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
}

/* -------------------------------------------------------------------------- */
/* 4. AXIS SPREADSHEET RANGE DRAG SELECTION STYLES                            */
/* -------------------------------------------------------------------------- */
.axis-cell.in-selection-range {
  background: rgba(16, 124, 65, 0.12) !important;
  position: relative;
}

.axis-cell.range-top {
  border-top: 2px solid #107c41 !important;
}

.axis-cell.range-bottom {
  border-bottom: 2px solid #107c41 !important;
}

.axis-cell.range-left {
  border-left: 2px solid #107c41 !important;
}

.axis-cell.range-right {
  border-right: 2px solid #107c41 !important;
}

/* Autofill square handle at bottom-right of active selection */
.axis-autofill-handle {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 7px;
  height: 7px;
  background: #107c41;
  border: 1px solid #ffffff;
  cursor: crosshair;
  z-index: 50;
}

.axis-col-header.in-col-selection {
  background: #dcfce7 !important;
  color: #166534 !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #107c41 !important;
}

.axis-row-header.in-row-selection {
  background: #dcfce7 !important;
  color: #166534 !important;
  font-weight: 700 !important;
  border-right: 2px solid #107c41 !important;
}

/* -------------------------------------------------------------------------- */
/* 5. KINETIC PRESENTATION STAGE MARQUEE BOX                                   */
/* -------------------------------------------------------------------------- */
.kinetic-marquee-box {
  position: absolute;
  border: 1px dashed #c43e1c;
  background: rgba(196, 62, 28, 0.1);
  pointer-events: none;
  z-index: 99;
}

.kinetic-shape-item.selected {
  outline: 2px solid #c43e1c !important;
  box-shadow: 0 0 0 1px #ffffff;
  cursor: move;
}

.kinetic-resize-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border: 1px solid #c43e1c;
  border-radius: 1px;
}

.kinetic-resize-handle.nw { top: -4px; left: -4px; cursor: nw-resize; }
.kinetic-resize-handle.ne { top: -4px; right: -4px; cursor: ne-resize; }
.kinetic-resize-handle.sw { bottom: -4px; left: -4px; cursor: sw-resize; }
.kinetic-resize-handle.se { bottom: -4px; right: -4px; cursor: se-resize; }

/* -------------------------------------------------------------------------- */
/* 6. DRIFT RULER & PAPER CANVAS PRECISION 816PX ALIGNMENT                   */
/* -------------------------------------------------------------------------- */
#drift-top-ruler {
  width: 816px !important;
  min-width: 816px !important;
  max-width: 816px !important;
  box-sizing: border-box !important;
  margin: 12px auto 0 auto !important;
}

.drift-center-viewport {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.paper-sheet-container {
  width: 816px !important;
  min-width: 816px !important;
  max-width: 816px !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
}

/* Axis Status Bar Selection Telemetry Pills */
.axis-selection-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  color: #ffffff;
  margin-left: 8px;
}



/* -------------------------------------------------------------------------- */
/* 7. AXIS INTERACTIVE COLUMN & ROW RESIZERS                                  */
/* -------------------------------------------------------------------------- */
.axis-col-header {
  position: relative !important;
  user-select: none;
}

.axis-col-resizer {
  position: absolute;
  top: 0;
  right: -2px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 40;
  transition: background 0.15s;
}

.axis-col-resizer:hover,
.axis-col-resizer.resizing {
  background: #107c41;
}

.axis-row-header {
  position: relative !important;
  user-select: none;
}

.axis-row-resizer {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 6px;
  cursor: row-resize;
  z-index: 40;
  transition: background 0.15s;
}

.axis-row-resizer:hover,
.axis-row-resizer.resizing {
  background: #107c41;
}

/* -------------------------------------------------------------------------- */
/* 8. AXIS AUTOFILTER HEADER BUTTON & DROPDOWN MENU                           */
/* -------------------------------------------------------------------------- */
.axis-header-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 3px;
  margin-left: 4px;
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.15);
  cursor: pointer;
  font-size: 8px;
  color: #334155;
  vertical-align: middle;
  transition: all 0.15s;
}

.axis-header-filter-btn:hover {
  background: #107c41;
  color: #ffffff;
  border-color: #107c41;
}

.axis-filter-menu {
  position: absolute;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 10000;
  min-width: 200px;
  padding: 6px 0;
  font-family: Calibri, 'Segoe UI', sans-serif;
  animation: fontDropdownPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.axis-filter-item {
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #0f172a;
  cursor: pointer;
  transition: background 0.1s;
}

.axis-filter-item:hover {
  background: #f1f5f9;
  color: #107c41;
}

.axis-filter-sep {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 0;
}

/* -------------------------------------------------------------------------- */
/* 9. AXIS FUNCTION WIZARD & FIND MODALS                                      */
/* -------------------------------------------------------------------------- */
.axis-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

.axis-modal-dialog {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  font-family: Calibri, 'Segoe UI', sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.axis-modal-header {
  padding: 12px 18px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.axis-modal-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.axis-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.axis-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.axis-modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Function Wizard Specifics */
.axis-fx-catalog {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  height: 280px;
}

.axis-fx-cat-list {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow-y: auto;
  padding: 4px 0;
}

.axis-fx-cat-item {
  padding: 6px 10px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  transition: background 0.1s;
}

.axis-fx-cat-item.active,
.axis-fx-cat-item:hover {
  background: #dcfce7;
  color: #166534;
  font-weight: 600;
}

.axis-fx-func-list {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow-y: auto;
  padding: 4px 0;
}

.axis-fx-func-item {
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.axis-fx-func-item:hover,
.axis-fx-func-item.active {
  background: #f1f5f9;
  color: #107c41;
  font-weight: 600;
}

/* Find & Replace Modal */
.axis-find-modal-dialog {
  width: 440px;
}

.axis-find-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.axis-find-label {
  width: 90px;
  font-size: 12.5px;
  color: #334155;
  font-weight: 500;
}

.axis-find-input {
  flex: 1;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  font-family: Calibri, sans-serif;
}

.axis-find-input:focus {
  border-color: #107c41;
  box-shadow: 0 0 0 2px rgba(16, 124, 65, 0.15);
}

.axis-find-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.axis-btn-action {
  height: 30px;
  padding: 0 14px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.axis-btn-action:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.axis-btn-action.primary {
  background: #107c41;
  border-color: #107c41;
  color: #ffffff;
}

.axis-btn-action.primary:hover {
  background: #0d6535;
}

/* -------------------------------------------------------------------------- */
/* 10. CONDITIONAL FORMATTING STYLES                                          */
/* -------------------------------------------------------------------------- */
.cell-cf-gt {
  background-color: #dcfce7 !important;
  color: #166534 !important;
  font-weight: 600 !important;
}

.cell-cf-neg {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
  font-weight: 600 !important;
}

/* -------------------------------------------------------------------------- */
/* 11. KINETIC 8-POINT RESIZE HANDLES & SHAPE STUDIO                          */
/* -------------------------------------------------------------------------- */
.kinetic-resize-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border: 1px solid #c43e1c;
  border-radius: 1px;
  z-index: 100;
}

.kinetic-resize-handle.nw { top: -4px; left: -4px; cursor: nw-resize; }
.kinetic-resize-handle.n  { top: -4px; left: calc(50% - 4px); cursor: n-resize; }
.kinetic-resize-handle.ne { top: -4px; right: -4px; cursor: ne-resize; }
.kinetic-resize-handle.e  { top: calc(50% - 4px); right: -4px; cursor: e-resize; }
.kinetic-resize-handle.se { bottom: -4px; right: -4px; cursor: se-resize; }
.kinetic-resize-handle.s  { bottom: -4px; left: calc(50% - 4px); cursor: s-resize; }
.kinetic-resize-handle.sw { bottom: -4px; left: -4px; cursor: sw-resize; }
.kinetic-resize-handle.w  { top: calc(50% - 4px); left: -4px; cursor: w-resize; }

/* Kinetic Shape Formatting Floating Quick Bar */
.kinetic-shape-quickbar {
  position: absolute;
  background: #0f172a;
  color: #ffffff;
  border-radius: 8px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
  z-index: 1000;
  user-select: none;
  animation: floatPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.kinetic-quick-btn {
  height: 24px;
  padding: 0 6px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11.5px;
  transition: background 0.15s;
}

.kinetic-quick-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.kinetic-quick-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
}

/* -------------------------------------------------------------------------- */
/* 12. KINETIC DUAL-DISPLAY PRESENTER STUDIO & DRAWING CANVAS                  */
/* -------------------------------------------------------------------------- */
.presenter-studio-dual {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  width: 95vw;
  max-width: 1440px;
  height: 84vh;
  align-items: stretch;
}

.presenter-live-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.presenter-stage-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  color: #ffffff;
}

.presenter-next-preview {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  height: 170px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px;
}

.presenter-notes-box {
  flex: 1;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #cbd5e1;
  overflow-y: auto;
}

.presenter-draw-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 500;
}

.presenter-draw-canvas.drawing-active {
  pointer-events: auto;
  cursor: crosshair;
}


/* -------------------------------------------------------------------------- */
/* 13. AXIS ACTIVE CELL & HEADER PROMINENT HIGHLIGHTING (EXCEL 365 PARITY)    */
/* -------------------------------------------------------------------------- */
.axis-corner-cell {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 26px !important;
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 35 !important;
  box-sizing: border-box !important;
}

.axis-col-header {
  height: 26px !important;
  min-width: 95px !important;
  background: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
  text-align: center !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  box-sizing: border-box !important;
}

.axis-row-header {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  background: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
  text-align: center !important;
  position: sticky !important;
  left: 0 !important;
  z-index: 25 !important;
  box-sizing: border-box !important;
}

/* Active Row and Column Header Badges */
.axis-col-header.active-col-header,
.axis-col-header.in-col-selection {
  background: #dcfce7 !important;
  color: #166534 !important;
  font-weight: 700 !important;
  border-bottom: 2.5px solid #107c41 !important;
}

.axis-row-header.active-row-header,
.axis-row-header.in-row-selection {
  background: #dcfce7 !important;
  color: #166534 !important;
  font-weight: 700 !important;
  border-right: 2.5px solid #107c41 !important;
}

/* Active Cell Excel-Grade Signature Black Highlight Box */
.axis-cell.active-cell,
.axis-cell:focus,
.axis-cell:focus-visible {
  outline: 2px solid #000000 !important;
  outline-offset: -1px !important;
  box-shadow: inset 0 0 0 2px #000000, 0 0 0 1px #000000 !important;
  background-color: #ffffff !important;
  z-index: 30 !important;
  position: relative !important;
}

/* Ensure active cell autofill handle is always prominent in solid black */
.axis-cell.active-cell .axis-autofill-handle {
  display: block !important;
  position: absolute !important;
  bottom: -4px !important;
  right: -4px !important;
  width: 7px !important;
  height: 7px !important;
  background: #000000 !important;
  border: 1px solid #ffffff !important;
  cursor: crosshair !important;
  z-index: 50 !important;
}


/* -------------------------------------------------------------------------- */
/* 14. AXIS FORMULA AUTO-SUGGEST BOX & CALLOUT STYLES                         */
/* -------------------------------------------------------------------------- */
.axis-formula-suggest-box {
  position: absolute;
  top: 36px;
  left: 90px;
  width: 320px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.2);
  z-index: 10002;
  overflow: hidden;
  max-height: 240px;
  overflow-y: auto;
  font-family: var(--font-mono, monospace);
}

.axis-suggest-item {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.1s;
}

.axis-suggest-item:hover {
  background: #dcfce7;
}

.axis-suggest-item:last-child {
  border-bottom: none;
}

/* -------------------------------------------------------------------------- */
/* 15. SEALS, STAMPS & EQUATION RENDERING STYLES (DRIFT & SUITE)             */
/* -------------------------------------------------------------------------- */
.drift-stamp-badge,
.drift-stamp-wrapper {
  display: inline-block;
  vertical-align: middle;
  margin: 6px 12px;
  user-select: none;
}

.drift-stamp-badge:hover,
.drift-stamp-wrapper:hover {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

.drift-executive-seal-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #1e3a8a;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.12);
  margin: 12px 0;
  user-select: none;
  max-width: 440px;
}

.drift-executive-seal-badge:hover {
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.2);
}

.office-equation-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  color: #1e40af;
  margin: 0 4px;
  vertical-align: middle;
}

.office-equation-pill .eq-symbol-tag {
  font-weight: 700;
  color: #2563eb;
  font-size: 12px;
}

.office-equation-block {
  display: flex;
  justify-content: center;
  margin: 16px 0;
  padding: 12px;
}

.office-equation-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Recent Documents Hover */
.recent-doc-card:hover {
  transform: translateY(-2px);
  border-color: #94a3b8 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
}

/* Emoji Picker & Symbol Popovers */
.office-symbols-popover {
  position: fixed !important;
  z-index: 100005 !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  box-shadow: 0 20px 45px -4px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  animation: fontDropdownPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}


/* -------------------------------------------------------------------------- */
/* 16. MODERN GIRI AXIS SPREADSHEET STUDIO INTERFACE ENHANCEMENTS            */
/* -------------------------------------------------------------------------- */

/* Formula Bar & Name Box (Excel-Grade) */
.axis-formula-bar {
  height: 38px !important;
  min-height: 38px !important;
  background: #ffffff !important;
  border-bottom: 1px solid #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 12px !important;
  gap: 6px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  position: relative !important;
  z-index: 30 !important;
  transition: height 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.axis-formula-bar.expanded {
  height: 84px !important;
  align-items: flex-start !important;
  padding-top: 6px !important;
}

.axis-formula-bar.expanded .axis-formula-input {
  height: 70px !important;
}

.axis-name-box-wrap {
  display: flex;
  align-items: center;
}

.active-cell-pill {
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  height: 26px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  font-family: Calibri, -apple-system, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-transform: uppercase !important;
  cursor: text !important;
  outline: none !important;
  transition: all 0.15s !important;
  user-select: text !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.active-cell-pill:hover {
  border-color: #94a3b8 !important;
  background: #ffffff !important;
}

.active-cell-pill:focus {
  border-color: #107c41 !important;
  box-shadow: 0 0 0 2px rgba(16, 124, 65, 0.15) !important;
  background: #ffffff !important;
}

.axis-formula-divider {
  width: 1px;
  height: 18px;
  background: #e2e8f0;
  margin: 0 2px;
}

.axis-formula-action-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  transition: all 0.12s;
  padding: 0;
}

#btn-axis-formula-cancel:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

#btn-axis-formula-commit:hover {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.fx-icon-btn {
  width: 30px !important;
  height: 26px !important;
  border-radius: 4px !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  color: #0284c7 !important;
  font-family: "Cambria Math", "Times New Roman", serif !important;
  font-size: 14px !important;
  font-style: italic !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  user-select: none !important;
}

.fx-icon-btn:hover {
  background: #e0f2fe !important;
  border-color: #38bdf8 !important;
  color: #0369a1 !important;
  transform: scale(1.02);
}

.axis-formula-input {
  flex: 1 !important;
  height: 26px !important;
  border: 1px solid #e8edf2 !important;
  border-radius: 4px !important;
  padding: 0 10px !important;
  font-family: Calibri, "Segoe UI", sans-serif !important;
  font-size: 13px !important;
  color: #0f172a !important;
  outline: none !important;
  background: #f8fafc !important;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s !important;
  caret-color: #107c41 !important;
}

.axis-formula-input:focus {
  background: #ffffff !important;
  border-color: #107c41 !important;
  box-shadow: 0 0 0 2px rgba(16, 124, 65, 0.12) !important;
}

.axis-formula-expand-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s;
  margin-left: 2px;
}

.axis-formula-expand-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Collapsible Left Sidebar */
.axis-left-sidebar {
  width: 250px !important;
  min-width: 250px !important;
  max-width: 250px !important;
  background: #f8fafc !important;
  border-right: 1px solid #e2e8f0 !important;
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  overflow-y: auto !important;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.22s, max-width 0.22s, padding 0.22s, opacity 0.18s !important;
  z-index: 10 !important;
}

.axis-left-sidebar.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  border-right: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.axis-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.axis-sidebar-close-btn {
  background: transparent;
  border: none;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.12s;
}

.axis-sidebar-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.formula-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.formula-card-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  cursor: pointer !important;
  transition: all 0.15s !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.formula-card-item:hover {
  border-color: #107c41 !important;
  box-shadow: 0 2px 8px rgba(16, 124, 65, 0.12) !important;
  transform: translateY(-1px);
}

.formula-name {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  font-weight: 700;
  color: #107c41;
  display: block;
  margin-bottom: 2px;
}

.formula-desc {
  font-size: 11px;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

/* Grid Table & Typography */
.axis-table {
  border-collapse: collapse !important;
  table-layout: fixed !important;
  font-family: Calibri, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 11pt !important;
}

.axis-cell {
  font-family: inherit !important;
  font-size: 11pt !important;
  padding: 2px 6px !important;
  line-height: 20px !important;
  font-variant-numeric: tabular-nums !important;
  border: 1px solid #e2e8f0 !important;
  vertical-align: middle !important;
}

.axis-corner-cell {
  position: relative !important;
  cursor: pointer !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}

.axis-corner-cell::after {
  content: '';
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 7px 7px;
  border-color: transparent transparent #94a3b8 transparent;
}

.axis-corner-cell:hover {
  background: #e2e8f0 !important;
}

/* Bottom Sheet Tab Bar */
.axis-bottom-workbook-bar {
  height: 34px !important;
  min-height: 34px !important;
  background: #f1f5f9 !important;
  border-top: 1px solid #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 8px !important;
  font-size: 11.5px !important;
  z-index: 20 !important;
  user-select: none !important;
}

.axis-sheet-navigation-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: 6px;
}

.axis-sheet-nav-btn {
  width: 20px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.axis-sheet-nav-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.axis-sheet-tabs-list {
  display: flex !important;
  align-items: flex-end !important;
  height: 100% !important;
  gap: 3px !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
}

.axis-sheet-tabs-list::-webkit-scrollbar {
  display: none;
}

.axis-sheet-tab-item {
  height: 27px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  border-bottom: none !important;
  border-radius: 5px 5px 0 0 !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  cursor: pointer !important;
  transition: all 0.12s !important;
  position: relative !important;
  white-space: nowrap !important;
}

.axis-sheet-tab-item:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.axis-sheet-tab-item.active {
  background: #ffffff !important;
  color: #107c41 !important;
  font-weight: 700 !important;
  height: 28px !important;
  border-top: 2.5px solid #107c41 !important;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.04) !important;
  z-index: 2 !important;
}

.axis-sheet-color-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 0 0 2px 2px;
}

.axis-add-sheet-btn {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  color: #64748b !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  margin-left: 4px !important;
  transition: all 0.12s !important;
}

.axis-add-sheet-btn:hover {
  background: #e2e8f0 !important;
  color: #107c41 !important;
  border-color: #cbd5e1 !important;
}

/* Excel 1M Rows & 16K Columns Dimension Indicator Bar */
.axis-excel-dimension-bar {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  padding: 1px 6px !important;
  height: 22px !important;
  font-size: 11px !important;
  color: #334155 !important;
  margin: 0 10px !important;
}
.axis-excel-dimension-bar .excel-badge {
  background: #107c41 !important;
  color: #ffffff !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  padding: 1px 4px !important;
  border-radius: 2px !important;
  letter-spacing: 0.5px !important;
}
.axis-excel-dimension-bar .axis-dim-text {
  font-weight: 600 !important;
  font-family: var(--font-mono, monospace) !important;
  color: #0f172a !important;
  font-size: 11px !important;
}
.axis-dim-btn-group {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
}
.axis-dim-pill-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 3px !important;
  padding: 1px 5px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  line-height: 1.2 !important;
}
.axis-dim-pill-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

/* Status Bar Telemetry & Zoom Stepper */
.axis-live-calc-status {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.axis-status-ready {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.ready-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 4px #10b981;
}

.axis-status-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Calibri, -apple-system, sans-serif;
  font-size: 11px;
}

.axis-stat-pill {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  color: #334155;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.axis-zoom-stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 4px;
}

.axis-zoom-btn {
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: all 0.1s;
}

.axis-zoom-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.axis-zoom-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #334155;
  min-width: 34px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

/* Context Menus (Cell & Sheet Tab) */
.axis-cell-context-menu,
.axis-sheet-context-menu {
  position: fixed;
  z-index: 100000;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.05);
  min-width: 210px;
  padding: 5px 0;
  font-family: Calibri, 'Segoe UI', sans-serif;
  animation: fontDropdownPop 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.axis-ctx-item {
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: #0f172a;
  cursor: pointer;
  transition: background 0.1s;
  gap: 12px;
}

.axis-ctx-item:hover {
  background: #f1f5f9;
  color: #107c41;
}

.axis-ctx-item.danger:hover {
  background: #fef2f2;
  color: #ef4444;
}

.axis-ctx-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.axis-ctx-icon {
  font-size: 13px;
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.axis-ctx-kbd {
  font-size: 10px;
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
}

.axis-ctx-sep {
  height: 1px;
  background: #f1f5f9;
  margin: 4px 0;
}

/* Sheet Tab Color Swatch Submenu */
.axis-color-swatches-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
}

.axis-tab-color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.15);
  transition: transform 0.1s;
}

.axis-tab-color-dot:hover {
  transform: scale(1.2);
}

/* Cell Styles Gallery Popover */
.axis-cell-styles-popover {
  position: absolute;
  z-index: 100000;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 20px 40px -4px rgba(0, 0, 0, 0.25);
  padding: 14px;
  width: 320px;
  font-family: Calibri, 'Segoe UI', sans-serif;
  animation: fontDropdownPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.axis-styles-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
}

.axis-styles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.axis-style-swatch-item {
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.1s;
}

.axis-style-swatch-item:hover {
  transform: scale(1.03);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
