/*
 * WANNON DIGITAL PORTAL - GLOBAL STYLING SYSTEM
 *
 * This file is reserved STRICTLY for global/browser resets, accessibility parameters,
 * keyframe animations, page/printing layouts, and responsive CSS-variable layout bridges.
 *
 * CENTRAL REFERENCE (SINGLE SOURCE OF TRUTH):
 * All UI component and island-level styling values must NOT be defined in this file.
 * Instead, style values must be sourced directly from the TypeScript design tokens:
 *   src/lib/design-tokens.ts (designTokens.colors.*, designTokens.spacing.*, etc.)
 *
 * STYLING MODEL:
 * All layout-specific styles, colors, margins, paddings, and visual configurations
 * MUST be handled through inline styling objects. Avoid adding custom CSS classes here.
 */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --ocean: #0a2540;
  --sand: #f4f7fa;
  --sand-deep: #e6edf2;
  --coral: #ff6b47;
  --coral-deep: #4a1b0c;
  --tidal: #1b6b93;
  --bg: #ffffff;
  --surface: #f9fafc;
  --surface-muted: #f4f7fa;
  --surface-elevated: #ffffff;
  --text: var(--ocean);
  --text-soft: #27425f;
  --text-on-ocean: #ffffff;
  --muted: #52697f;
  --brand: var(--coral);
  --brand-contrast: var(--coral-deep);
  --border: rgba(10, 37, 64, 0.18);
  --border-strong: rgba(10, 37, 64, 0.34);
  --danger: #bc3f1f;
  --danger-bg: #fee2e2;
  --border-soft: rgba(10, 37, 64, 0.1);
  --border-muted: rgba(10, 37, 64, 0.18);
  --overlay-soft: rgba(244, 247, 250, 0.85);
  --success: #16a34a;
  --success-bg: #d1fae5;
  --warning: #e65100;
  --warning-bg: #fffbeb;
  --info: #3b82f6;
  --info-bg: #eff6ff;
  --shift-color-a: #ffe6d9;
  --shift-color-c: #d1e7dd;
  --shift-color-k: #d2e3fc;
  --shift-color-off: #f1f3f5;
  --shift-lightness: 90%;
  --shift-lightness-off: 92%;
  --overlay: rgba(10, 37, 64, 0.35);
  --ocean-overlay: rgba(10, 37, 64, 0.45);
  --lightbox-bg: rgba(6, 18, 36, 0.95);
  --gunmetal-2: #123253;
  --shadow-soft: 0 12px 28px rgba(10, 37, 64, 0.12);
  --shadow-elevated: 0 24px 50px rgba(10, 37, 64, 0.16);
  --sidebar-bg: #0a2540;
  --sidebar-text: #faf6f0;
  --glass-surface: rgba(249, 250, 252, 0.7);
  --glass-surface-strong: rgba(249, 250, 252, 0.86);
  --glass-border: rgba(10, 37, 64, 0.16);
  --line-strong: rgba(10, 37, 64, 0.1);
  --line-soft: rgba(10, 37, 64, 0.06);
  --header-bg: rgba(244, 247, 250, 0.85);
  --header-border: rgba(10, 37, 64, 0.14);
  --header-text: var(--ocean);
  --header-chip-bg: rgba(255, 255, 255, 0.9);
  --header-chip-border: rgba(10, 37, 64, 0.2);
  --layout-frame-max-width: 1280px;
  --layout-content-max-width: 1040px;
  --layout-gutter-mobile: 0.85rem;
  --layout-gutter-desktop: clamp(1rem, 3vw, 2.25rem);
  --layout-inline-padding: var(--layout-gutter-mobile);
  --layout-page-padding: 1.25rem;
  --layout-card-radius: 12px;
  --layout-card-border-left: 1px solid rgba(10, 37, 64, 0.18);
  --layout-card-border-right: 1px solid rgba(10, 37, 64, 0.18);
  --layout-card-margin-x: 0px;
  --layout-card-padding: 2rem 1.5rem;
  --layout-stat-card-padding: 1.5rem;

  --table-border-radius: 12px;
  --table-border-left: 1px solid rgba(10, 37, 64, 0.18);
  --table-border-right: 1px solid rgba(10, 37, 64, 0.18);
  --table-margin-x: 0px;
  --table-cell-max-width: 240px;
  --col-mobile-hidden: table-cell;
  --auth-bg: #0a2540;
  --auth-text: #faf6f0;
  --sidebar-bg: #0a2540;
  --sidebar-text: #faf6f0;
  --button-ocean-bg: #0a2540;
  --row-hover-bg: rgba(10, 37, 64, 0.06);
  --sidebar-hover-bg: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] {
  --ocean: #faf6f0;
  --sand: #0a2540;
  --sand-deep: #0c1c2e;
  --coral: #ff6b47;
  --coral-deep: #faf6f0;
  --tidal: #38bdf8;
  --bg: #061224;
  --surface: #0a2540;
  --surface-muted: #0c1c2e;
  --surface-elevated: #0f2e4d;
  --text: #faf6f0;
  --text-soft: #e2dcd5;
  --text-on-ocean: #0a2540;
  --muted: #a1b1c2;
  --brand: var(--coral);
  --brand-contrast: #061224;
  --border: rgba(250, 246, 240, 0.15);
  --border-strong: rgba(250, 246, 240, 0.3);
  --border-soft: rgba(250, 246, 240, 0.08);
  --border-muted: rgba(250, 246, 240, 0.12);
  --overlay-soft: rgba(6, 18, 36, 0.85);
  --ocean-overlay: rgba(6, 18, 36, 0.7);
  --lightbox-bg: rgba(6, 18, 36, 0.95);
  --header-bg: rgba(6, 18, 36, 0.85);
  --header-border: rgba(250, 246, 240, 0.12);
  --header-text: #faf6f0;
  --sidebar-bg: linear-gradient(180deg, #0c1c2e 0%, #061224 100%);
  --glass-surface: rgba(10, 37, 64, 0.7);
  --glass-surface-strong: rgba(10, 37, 64, 0.86);
  --glass-border: rgba(250, 246, 240, 0.12);
  --line-strong: rgba(250, 246, 240, 0.1);
  --line-soft: rgba(250, 246, 240, 0.06);
  --success: #34d399;
  --success-bg: #064e3b;
  --warning: #fb923c;
  --warning-bg: #451a03;
  --info: #60a5fa;
  --info-bg: #1e3a8a;
  --shift-color-a: #451a03;
  --shift-color-c: #064e3b;
  --shift-color-k: #1e3a8a;
  --shift-color-off: #1f2937;
  --shift-lightness: 22%;
  --shift-lightness-off: 16%;
  --danger: #f87171;
  --danger-bg: #450a0a;
  --layout-card-border-left: 1px solid rgba(250, 246, 240, 0.15);
  --layout-card-border-right: 1px solid rgba(250, 246, 240, 0.15);
  --table-border-left: 1px solid rgba(250, 246, 240, 0.15);
  --table-border-right: 1px solid rgba(250, 246, 240, 0.15);
  --auth-bg: #061224;
  --auth-text: #faf6f0;
  --button-ocean-bg: #0a2540;
  --row-hover-bg: rgba(250, 246, 240, 0.07);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --ocean: #faf6f0;
    --sand: #0a2540;
    --sand-deep: #0c1c2e;
    --coral: #ff6b47;
    --coral-deep: #faf6f0;
    --tidal: #38bdf8;
    --bg: #061224;
    --surface: #0a2540;
    --surface-muted: #0c1c2e;
    --surface-elevated: #0f2e4d;
    --text: #faf6f0;
    --text-soft: #e2dcd5;
    --text-on-ocean: #0a2540;
    --muted: #a1b1c2;
    --brand: var(--coral);
    --brand-contrast: #061224;
    --border: rgba(250, 246, 240, 0.15);
    --border-strong: rgba(250, 246, 240, 0.3);
    --border-soft: rgba(250, 246, 240, 0.08);
    --border-muted: rgba(250, 246, 240, 0.12);
    --overlay-soft: rgba(6, 18, 36, 0.85);
    --ocean-overlay: rgba(6, 18, 36, 0.7);
    --lightbox-bg: rgba(6, 18, 36, 0.95);
    --header-bg: rgba(6, 18, 36, 0.85);
    --header-border: rgba(250, 246, 240, 0.12);
    --header-text: #faf6f0;
    --sidebar-bg: linear-gradient(180deg, #0c1c2e 0%, #061224 100%);
    --sidebar-text: #faf6f0;
    --glass-surface: rgba(10, 37, 64, 0.7);
    --glass-surface-strong: rgba(10, 37, 64, 0.86);
    --glass-border: rgba(250, 246, 240, 0.12);
    --line-strong: rgba(250, 246, 240, 0.1);
    --line-soft: rgba(250, 246, 240, 0.06);
    --success: #34d399;
    --success-bg: #064e3b;
    --warning: #fb923c;
    --warning-bg: #451a03;
    --info: #60a5fa;
    --info-bg: #1e3a8a;
    --shift-color-a: #451a03;
    --shift-color-c: #064e3b;
    --shift-color-k: #1e3a8a;
    --shift-color-off: #1f2937;
    --shift-lightness: 22%;
    --shift-lightness-off: 16%;
    --danger: #f87171;
    --danger-bg: #450a0a;
    --layout-card-border-left: 1px solid rgba(250, 246, 240, 0.15);
    --layout-card-border-right: 1px solid rgba(250, 246, 240, 0.15);
    --table-border-left: 1px solid rgba(250, 246, 240, 0.15);
    --table-border-right: 1px solid rgba(250, 246, 240, 0.15);
    --auth-bg: #061224;
    --auth-text: #faf6f0;
    --button-ocean-bg: #0a2540;
    --row-hover-bg: rgba(250, 246, 240, 0.07);
  }
}

@media (min-width: 900px) {
  :root {
    --layout-inline-padding: var(--layout-gutter-desktop);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(
    circle at 12% 0%,
    rgba(27, 107, 147, 0.08) 0%,
    transparent 30%
  ),
    radial-gradient(
    circle at 88% 8%,
    rgba(255, 107, 71, 0.12) 0%,
    transparent 34%
  ),
    var(--bg);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

input,
textarea,
select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  background: var(--surface-elevated, #ffffff);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: none;
}

/* Unified Table Row Tactile Resets */
table tbody tr {
  transition: background 0.15s ease;
}

table tbody tr[data-clickable="true"] {
  cursor: pointer;
}

table tbody tr[data-clickable="true"]:hover {
  background-color: var(--row-hover-bg);
}

/* Printable Invoice Page Resets */
@media print {
  @page {
    size: auto;
    margin: 0mm;
  }
  body {
    background: #ffffff;
    margin: 1.6cm;
  }
}

/* Wannon Brand Loading Spinner Rotation Animation */
@keyframes wannon-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Prevent browser defaults from styling clicked/visited buttons and links with purple user-agent colors */
a:visited {
  color: inherit;
}

/* Sidebar & Modal Layout CSS Custom Properties for SSR-Hydration Sync */
:root {
  --sidebar-position: relative;
  --sidebar-width: 280px;
  --sidebar-opacity: 1;
  --sidebar-transform: none;
  --sidebar-pointer-events: auto;
  --sidebar-right: auto;
  --desktop-icon-display: inline-flex;
  --mobile-icon-display: none;

  /* Modal Layout Constants */
  --modal-top-offset: 4.5rem;
  --modal-container-padding: 1rem;
  --modal-border-radius: 1.15rem;
  --modal-border: 1px solid var(--border);
  --modal-width: var(--modal-desktop-width, min(94vw, 1080px));
  --modal-max-height: var(--modal-desktop-height, min(85vh, 760px));
  --modal-height: var(--modal-desktop-height, auto);
  --modal-body-padding: 1.5rem;
}

@media (max-width: 900px) {
  :root {
    --sidebar-position: absolute;
    --sidebar-width: 100%;
    --sidebar-opacity: 0;
    --sidebar-transform: translateY(8px);
    --sidebar-pointer-events: none;
    --sidebar-right: 0;
    --desktop-icon-display: none;
    --mobile-icon-display: inline-flex;
    --col-mobile-hidden: none;

    /* Full-Screen Mobile Modals Override */
    --modal-top-offset: 0;
    --modal-container-padding: 0;
    --modal-border-radius: 0;
    --modal-border: none;
    --modal-width: 100vw;
    --modal-max-height: 100vh;
    --modal-height: 100vh;
    --modal-body-padding: var(--layout-page-padding, 1.25rem);
  }
}

@media (max-width: 640px) {
  :root {
    --layout-page-padding: 0.5rem;
    --layout-card-radius: 12px;
    --layout-card-margin-x: 0px;
    --layout-card-padding: 1.25rem 1rem;
    --layout-stat-card-padding: 1rem;

    --table-border-radius: 12px;
    --table-margin-x: 0px;
    --table-cell-max-width: 120px;
  }
}

/* Hide number input spin buttons globally */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Wannon Brand Ambient Coastal Swell Background Keyframes */
@keyframes swell-one {
  0% {
    transform: translate3d(0px, 0px, 0) rotate(0deg) scale(2.75);
  }
  33% {
    transform: translate3d(120px, -130px, 0) rotate(120deg) scale(3.16);
  }
  66% {
    transform: translate3d(-100px, 80px, 0) rotate(240deg) scale(2.48);
  }
  100% {
    transform: translate3d(0px, 0px, 0) rotate(360deg) scale(2.75);
  }
}
@keyframes swell-two {
  0% {
    transform: translate3d(0px, 0px, 0) rotate(0deg) scale(3.15);
  }
  50% {
    transform: translate3d(-130px, 110px, 0) rotate(-180deg) scale(3.75);
  }
  100% {
    transform: translate3d(0px, 0px, 0) rotate(0deg) scale(3.15);
  }
}
@keyframes swell-three {
  0% {
    transform: translate3d(0px, 0px, 0) rotate(0deg) scale(2.25);
  }
  33% {
    transform: translate3d(-80px, -100px, 0) rotate(90deg) scale(2.03);
  }
  66% {
    transform: translate3d(110px, 80px, 0) rotate(270deg) scale(2.48);
  }
  100% {
    transform: translate3d(0px, 0px, 0) rotate(360deg) scale(2.25);
  }
}

/* Roster Print layout overrides */
[data-impersonation-banner="true"] {
  display: flex;
}

[data-roster-header="true"] {
  display: flex;
}

[data-roster-toolbar="true"] {
  display: flex;
}

[data-roster-table="true"] {
  table-layout: auto;
}

[data-roster-print-meta="true"] {
  display: none;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 4mm;
  }

  header,
  aside,
  footer,
  [data-fab-container],
  .no-print,
  button,
  .pill-button {
    display: none;
  }
  body {
    background: #ffffff;
    color: #000000;
    margin: 0;
    padding: 0;
  }
  main {
    overflow: visible;
    height: auto;
    background: #ffffff;
  }
  table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
  }
  th,
  td {
    border: 1px solid rgba(10, 37, 64, 0.18);
    padding: 6px;
  }

  [data-roster-screen-only="true"] {
    display: none;
  }

  [data-impersonation-banner="true"] {
    display: none;
  }

  [data-roster-header="true"] {
    display: none;
  }

  [data-roster-toolbar="true"] {
    display: none;
  }

  [data-roster-print-meta="true"] {
    display: grid;
    margin: 0 0 0.35rem;
    font-size: 10px;
  }

  [data-roster-page="true"] {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  [data-roster-grid="true"] {
    border-radius: 0;
    border: 1px solid rgba(10, 37, 64, 0.2);
    box-shadow: none;
    overflow: hidden;
  }

  [data-roster-table="true"] {
    min-width: 0;
    table-layout: fixed;
  }

  [data-roster-table="true"] [data-roster-emp-cell="true"] {
    width: 95px;
    min-width: 95px;
    max-width: 95px;
  }

  [data-roster-table="true"] [data-roster-day-cell="true"] {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
  }

  [data-roster-table="true"] th,
  [data-roster-table="true"] td {
    font-size: 9px;
    line-height: 1.1;
    padding: 2px;
    border-color: rgba(10, 37, 64, 0.3);
  }

  [data-roster-table="true"] [data-roster-hours-col="true"] {
    display: none;
  }

  [data-roster-table="true"] td {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* Strip default Leaflet styles for custom dynamic coloured shape labels */
.leaflet-tooltip.map-shape-label-wrapper {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Hide default pointing arrow on dynamically coloured labels */
.leaflet-tooltip.map-shape-label-wrapper::before {
  display: none;
}

/* Strips inner default browser borders & padding for color picker swatches */
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}
input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 6px;
}

@keyframes wannon-pulse-coral {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 71, 0.75);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(255, 107, 71, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 71, 0);
  }
}

/* Data Table Responsive Layout Bridges */
.data-table-header-bridge {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  padding: var(--header-pad-desktop);
  background-color: var(--header-bg);
  border-bottom: var(--header-border-bottom);
}

.data-table-desktop-bridge {
  display: table;
  width: 100%;
  border-collapse: collapse;
}

.mobile-list-bridge {
  display: none;
}

@media (max-width: 900px) {
  .data-table-header-bridge {
    padding: var(--header-pad-mobile);
  }
}

@media (max-width: 640px) {
  .data-table-desktop-bridge {
    display: none;
  }
  .mobile-list-bridge {
    display: flex;
    flex-direction: column;
  }
}

/* PWA Slide-up Animation */
@keyframes wannon-slide-up {
  from {
    transform: translateY(100%) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* PWA Backdrop Fade-in Animation */
@keyframes wannon-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Release History Details Transitions */
details:not([open]) summary span:last-child {
  display: none;
}
details[open] summary span:first-child {
  display: none;
}

/* Post-submission invalid form element styling */
.was-validated input:invalid,
.was-validated textarea:invalid,
.was-validated select:invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
  background-color: #fffaf9;
}

/* =====================================================================
   TIPTAP DOCUMENT EDITOR STYLES
   Required by the WD-DOCS document management module.
   The Tiptap editor renders ProseMirror-managed DOM nodes that cannot
   be styled via inline styles — these classes provide the base typography
   and layout for the editor and viewer.
   ===================================================================== */

.tiptap-content {
  outline: none;
  min-height: 450px;
  color: var(--ocean);
}

.tiptap-content h1 {
  font-size: 2.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem 0;
  line-height: 1.2;
}

.tiptap-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem 0;
  line-height: 1.3;
}

.tiptap-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem 0;
  line-height: 1.4;
}

.tiptap-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0.75rem 0 0.375rem 0;
  line-height: 1.5;
}

.tiptap-content h5 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem 0;
  line-height: 1.5;
}

.tiptap-content h6 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem 0;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tiptap-content p {
  margin: 0.5rem 0;
  line-height: 1.65;
}

.tiptap-content p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: var(--muted);
  pointer-events: none;
  height: 0;
}

.tiptap-content ul,
.tiptap-content ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.tiptap-content li {
  margin: 0.25rem 0;
}

.tiptap-content blockquote {
  border-left: 3px solid var(--coral);
  margin: 0.75rem 0;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  color: var(--text-soft);
}

.tiptap-content pre {
  background: #1e293b;
  color: #e2e8f0;
  font-family: "JetBrains Mono", monospace;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0.75rem 0;
}

.tiptap-content pre code {
  color: inherit;
  background: none;
  padding: 0;
  font-size: inherit;
}

.tiptap-content code {
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.875em;
  color: var(--coral-deep);
}

.tiptap-content a {
  color: var(--tidal);
  text-decoration: underline;
  cursor: pointer;
}

.tiptap-content a:hover {
  color: var(--coral);
}

.tiptap-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  overflow: hidden;
}

.tiptap-content th,
.tiptap-content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
  min-width: 100px;
}

.tiptap-content th {
  background: var(--surface);
  font-weight: 600;
}

.tiptap-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0.75rem 0;
}

.tiptap-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.tiptap-content ul[data-type="taskList"] {
  list-style: none;
  padding-left: 0;
}

.tiptap-content ul[data-type="taskList"] li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.tiptap-content ul[data-type="taskList"] li > label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.tiptap-content ul[data-type="taskList"] li > div {
  flex: 1 1 auto;
}

.tiptap-content ul[data-type="taskList"] input[type="checkbox"] {
  cursor: pointer;
  width: 1.1rem;
  height: 1.1rem;
}

.tiptap-content .ProseMirror-gapcursor {
  display: none;
  pointer-events: none;
  position: relative;
}

.tiptap-content .ProseMirror-gapcursor:after {
  content: "";
  display: block;
  position: absolute;
  top: -2px;
  width: 20px;
  border-top: 1px solid var(--ocean);
  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}

@keyframes ProseMirror-cursor-blink {
  to {
    visibility: hidden;
  }
}

.tiptap-content p.is-editor-empty:first-child::before {
  color: var(--muted);
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
}

/* Column layout support */
.tiptap-content .columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0.75rem 0;
}

.tiptap-content .column {
  min-width: 0;
}

/* Selected node highlighting */
.tiptap-content .ProseMirror-selectednode {
  outline: 2px solid var(--coral);
  border-radius: 4px;
}

/* Drag handle styles */
.tiptap-content .drag-handle {
  position: absolute;
  left: -1.5rem;
  top: 0;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.15s ease;
  display: flex;
  align-items: center;
  padding: 0.15rem;
  border-radius: 4px;
  color: var(--muted);
}

.tiptap-content .drag-handle:hover {
  background: var(--surface);
  color: var(--ocean);
}

.tiptap-content .drag-handle:active {
  cursor: grabbing;
}

/* Show drag handle on hover */
.tiptap-content [data-drag-handle]:hover > .drag-handle,
.tiptap-content .drag-handle.drag-handle--visible {
  opacity: 1;
}
