/* ═══════════════════════════════════════════
   SQL TERMINAL PORTFOLIO — PHOSPHOR CRT THEME
   ═══════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --green: #33ff66;
  --green-dim: #1a9940;
  --green-glow: rgba(51, 255, 102, 0.55);
  --bg-screen: #0a1a0a;
  --bg-body: #111;
  --bezel: #1c1c1c;
  --bezel-ring: #333;
  --font: "VT323", "Courier New", monospace;
  --line-h: 1.55;
  --fs: clamp(1rem, 2.2vw, 1.35rem);
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  font-family: var(--font);
  font-size: var(--fs);
  color: var(--green);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: auto;
  cursor:
    url("../img/cursors/normal-select.svg") 0 0,
    auto !important;
}

#terminal,
#desktop,
.contacts-window,
.settings-window,
.finder-window {
  cursor:
    url("../img/cursors/normal-select.svg") 0 0,
    auto !important;
}

a,
button,
.menubar-item,
.cc-toggle,
.cc-btn,
.cc-color-dot,
.dock-icon,
.desktop-file-icon,
.finder-dot,
.settings-dot,
.contacts-dot,
.mail-dot,
.safari-dot,
.control,
.nav-btn,
.sidebar-icon,
.finder-icon,
.finder-sidebar-item,
.finder-sidebar li,
.contacts-list-item,
.quick-action,
.action-icon,
.contacts-footer-btn,
.sidebar-item,
li[data-target] {
  cursor:
    url("../img/cursors/link-select.svg") 11 0,
    pointer !important;
}

/* Non-functional menu / chrome — no pointer, not a control */
.menubar-item.ui-chrome--inactive,
.finder-toolbar-right .ui-chrome--inactive,
.quick-action.ui-chrome--inactive,
.mail-chrome-toolbar .ui-chrome--inactive,
.mail-compose-toolbar .ui-chrome--inactive {
  cursor: default !important;
  pointer-events: none;
}

input,
textarea,
pre,
.line,
#inputDisplay {
  cursor:
    url("../img/cursors/text-select.svg") 12 12,
    text !important;
}

/* ── Shared macOS Window Controls ── */
.mac-close,
.mac-min,
.mac-max {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mac-close::after,
.mac-min::after,
.mac-max::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
  background-size: 60%;
  background-repeat: no-repeat;
  background-position: center;
}

/* Reveal all icons if any button in the group is hovered */
.mac-controls:hover .mac-close::after,
.mac-controls:hover .mac-min::after,
.mac-controls:hover .mac-max::after {
  opacity: 1;
}

/* Custom SVG Icons mapped to color paths */
.mac-close::after {
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7M7 1L1 7' stroke='%234c0000' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.mac-min::after {
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4H7' stroke='%23995700' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.mac-max::after {
  background-image: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.5 4.5L10.5 1.5M10.5 1.5V4.5M10.5 1.5H7.5M4.5 7.5L1.5 10.5M1.5 10.5V7.5M1.5 10.5H4.5' stroke='%23006500' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ── Custom Scrollbar (macOS Style) ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 100, 100, 0.4);
  border-radius: 10px;
  border: 1px solid transparent; /* Acts as padding */
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 100, 100, 0.7);
}

.dark-theme ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.dark-theme ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}
