/* ════════════════════════════════════════════════════════════════
   PURTA-I-NET — Global Root Theme Variables (Single Source of Truth)
   ════════════════════════════════════════════════════════════════ */
/* ── ACTIVE THEME IMPORT: Change this file name to switch theme (e.g. green.css, blue.css, navy.css, violet.css, red.css) ── */
@import 'themes/skyblue.css';

/* ── ACTIVE FONT IMPORT: Change this file name to switch font (e.g. helvetica.css, arial.css, times-new-roman.css, calibri.css, etc.) ── */
@import 'font-families/roboto.css';

:root {
  /* Master Default Typography Token */
  --font-family-default: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Background & Content Tokens */
  --bg-main: #f0f2f7;
  --bg-card: #ffffff;
  --purta-bg-light: #f8fafc;
  --purta-card-bg: #ffffff;

  /* Text & Typography */
  --text-main: #1f2937;
  --text-muted: #64748b;
  --purta-text-main: #0f172a;
  --purta-text-muted: #64748b;

  /* Borders & Radii */
  --border-color: #e2e8f0;
  --purta-border: #e2e8f0;
  --purta-radius: 12px;

  /* Search Highlight Tokens (Vibrant Yellow) */
  --purta-highlight-bg: #ffeb3b;
  --purta-highlight-text: #1a1a1a;

  /* Shadows */
  --purta-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --purta-shadow-md: 0 6px 20px rgba(0, 0, 0, 0.06);
  --purta-shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.10);
}

/* ════════════════════════════════════════════════════════════════
   Master Global Typography Engine (Single Point of Truth)
   ════════════════════════════════════════════════════════════════ */
html,
body,
button,
input,
select,
textarea,
optgroup,
table,
th,
td,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
label,
li,
ul,
ol,
div,
b,
strong,
em,
small,
figcaption {
  font-family: var(--font-family-base, var(--font-family-default));
}

/* Ensure form controls & buttons always use font-family-base */
button,
input,
select,
textarea {
  font-family: var(--font-family-base, var(--font-family-default)) !important;
}

/* ════════════════════════════════════════════════════════════════
   FontAwesome & Icon Preservation (Absolute High Priority)
   ════════════════════════════════════════════════════════════════ */
.fa,
.fas,
.far,
.fal,
.fad,
.fab,
.fa::before,
.fa::after,
.fas::before,
.fas::after,
.far::before,
.far::after,
.fal::before,
.fal::after,
.fad::before,
.fad::after,
.fab::before,
.fab::after,
[class^="fa-"],
[class*=" fa-"],
[class^="fa-"]::before,
[class*=" fa-"]::before,
[class^="fa-"]::after,
[class*=" fa-"]::after,
.glyphicon,
.glyphicon::before,
.glyphicon::after {
  font-family: 'FontAwesome' !important;
}

/* ════════════════════════════════════════════════════════════════
   Monospace Exceptions (Code Snippets, Terminals, Logs & Calculator)
   ════════════════════════════════════════════════════════════════ */
code,
kbd,
pre,
samp,
.font-monospace,
.font-family-monospace,
.code-pill-badge,
.calc-expr,
.calc-result,
.calc-history-expr,
.calc-history-res,
.bot-code-pre,
.ud-code-snippet {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;
}

/* ════════════════════════════════════════════════════════════════
   Global High-Visibility Yellow Search Highlight
   ════════════════════════════════════════════════════════════════ */
mark.search-highlight,
.search-highlight,
mark {
  background-color: var(--purta-highlight-bg) !important;
  color: var(--purta-highlight-text) !important;
  font-weight: 700 !important;
  padding: 1px 4px !important;
  border-radius: 3px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
  display: inline !important;
  line-height: inherit !important;
}

/* ════════════════════════════════════════════════════════════════
   Global Custom Scrollbar Styling (Theme Color & Small Width)
   ════════════════════════════════════════════════════════════════ */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color, #981b27) #f1f1f1;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color, #981b27);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark, #6b0f1a);
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}


/* ════════════════════════════════════════════════════════════════
   Global Standard Modal Overlay System (.bot-modal-overlay)
   ════════════════════════════════════════════════════════════════ */
.bot-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  overflow-y: auto;
  padding: 20px 10px;
  animation: purtaFadeIn 0.2s ease-out;
}


/* ════════════════════════════════════════════════════════════════
   Global Modern Purta Confirmation Prompt Modal (purta_prompt)
   ════════════════════════════════════════════════════════════════ */
.purta-prompt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  animation: purtaFadeIn 0.18s ease-out;
}

@keyframes purtaFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.purta-prompt-dialog {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(226, 232, 240, 0.9);
  min-width: 320px;
  max-width: 440px;
  animation: purtaPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes purtaPopIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.purta-prompt-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #334155;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.purta-prompt-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  flex: 1;
  line-height: 1.35;
}

.purta-prompt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.purta-btn-prompt {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none !important;
}

.purta-btn-prompt-yes {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
}

.purta-btn-prompt-yes:hover {
  background: var(--primary-color, #981b27);
  border-color: var(--primary-color, #981b27);
  color: #ffffff;
  transform: translateY(-1px);
}

.purta-btn-prompt-no {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #e11d48;
}

.purta-btn-prompt-no:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* ════════════════════════════════════════════════════════════════
   Global Modern Rich Action Tooltip Popover (.purta-action-tooltip)
   ════════════════════════════════════════════════════════════════ */
.purta-action-tooltip {
  position: fixed;
  z-index: 999999;
  background: var(--purta-card-bg, #ffffff);
  border: 1.5px solid var(--primary-color);
  border-radius: 9px;
  padding: 7px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  pointer-events: none;
  display: none;
  white-space: nowrap;
  animation: purtaTooltipFade 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes purtaTooltipFade {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.purta-tooltip-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.purta-tooltip-icon {
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.purta-tooltip-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--purta-text-main, #0f172a);
  letter-spacing: -0.01em;
}

.purta-tooltip-desc {
  font-size: 10.5px;
  color: var(--purta-text-muted, #64748b);
  font-weight: 500;
  padding-left: 2px;
}

/* Arrow pointing right (tooltip is to the left of the button) */
.purta-action-tooltip.arrow-right::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  margin-top: -5px;
  width: 9px;
  height: 9px;
  background: var(--purta-card-bg, #ffffff);
  border-top: 1.5px solid var(--primary-color);
  border-right: 1.5px solid var(--primary-color);
  transform: rotate(45deg);
}

/* Arrow pointing left (tooltip is to the right of the button) */
.purta-action-tooltip.arrow-left::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -6px;
  margin-top: -5px;
  width: 9px;
  height: 9px;
  background: var(--purta-card-bg, #ffffff);
  border-bottom: 1.5px solid var(--primary-color);
  border-left: 1.5px solid var(--primary-color);
  transform: rotate(45deg);
}

/* Arrow pointing down (tooltip is above the button) */
.purta-action-tooltip.arrow-down::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  margin-left: -5px;
  width: 9px;
  height: 9px;
  background: var(--purta-card-bg, #ffffff);
  border-bottom: 1.5px solid var(--primary-color);
  border-right: 1.5px solid var(--primary-color);
  transform: rotate(45deg);
}

/* Arrow pointing up (tooltip is below the button) */
.purta-action-tooltip.arrow-up::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  margin-left: -5px;
  width: 9px;
  height: 9px;
  background: var(--purta-card-bg, #ffffff);
  border-top: 1.5px solid var(--primary-color);
  border-left: 1.5px solid var(--primary-color);
  transform: rotate(45deg);
}