/* MEUGRL Lodge Custom Vanilla CSS System */
:root {
  --primary: #1e3a8a;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #0f766e;
  --accent: #d97706;
  --bg-dark: #0f172a;
  --bg-card: #ffffff;
  --bg-body: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #ca8a04;
  --warning-bg: #fefce8;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Header & Navigation */
.navbar {
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}

.nav-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.nav-brand span.lodge-badge {
  background: var(--accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 0.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-links a:hover, .nav-links a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.desktop-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-badge {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── User menu dropdown — Popover API, no JS ────────────────────────────── */
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
  user-select: none;
  padding: 0;
}

.user-menu-arrow {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
  transition: transform 0.18s ease;
  line-height: 1;
}

/* Arrow rotates when the dropdown popover is open — pure CSS, no JS */
body:has(#user-dropdown:popover-open) .user-menu-arrow {
  transform: rotate(180deg);
}

/* Visual appearance for the dropdown panel (shared by both old and new) */
.user-menu-dropdown {
  color: #1e293b;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  min-width: 190px;
  overflow: hidden;
}

/* Popover UA reset + positioning: fixed just below the navbar, right-aligned */
#user-dropdown {
  border: none;
  margin: 0;
  padding: 0;
  position: fixed;
  inset-block-start: 64px; /* sits below the ~64px tall navbar */
  inset-inline-end: 1.5rem;
  inset-block-end: auto;
  inset-inline-start: auto;
  width: 190px;
  max-width: calc(100vw - 2rem);
  max-height: none;
}

#user-dropdown:popover-open {
  animation: menuFadeIn 0.12s ease forwards;
}

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

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.1rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.13s;
}

.user-menu-item:hover {
  background: #f1f5f9;
}

.user-menu-item + .user-menu-item {
  border-top: 1px solid var(--border-color);
}

.role-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
}
.role-executive { background: #9333ea; color: #fff; }
.role-staff { background: #0284c7; color: #fff; }
.role-delegate { background: #16a34a; color: #fff; }
.role-member { background: #475569; color: #fff; }
.role-admin { background: #dc2626; color: #fff; }

/* ── Mobile Hamburger & Full-Screen Overlay ─────────────────────────────── */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: #ffffff;
  position: relative;
  z-index: 1100;
  touch-action: manipulation;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
}

.nav-toggle-bars span {
  display: block;
  height: 2.5px;
  width: 100%;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Burger → × morph: driven by CSS :has() reading popover state — no JS needed */
body:has(#mobile-nav-overlay:popover-open) .nav-toggle .nav-toggle-bars span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
body:has(#mobile-nav-overlay:popover-open) .nav-toggle .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}
body:has(#mobile-nav-overlay:popover-open) .nav-toggle .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ── Mobile Full-Screen Nav Popover ─────────────────────────────────────── */
/* Reset browser's [popover] UA styles then apply our dark overlay theme     */
#mobile-nav-overlay {
  /* UA reset */
  border: none;
  margin: 0;
  padding: 2rem 1.75rem 2.5rem;
  max-width: 100%;
  max-height: none;
  /* Position: sit below the sticky navbar (~60px), fill the rest of the screen */
  position: fixed;
  inset: 60px 0 0 0;
  width: 100%;
  height: calc(100vh - 60px);
  /* Dark lodge theme */
  background: #0f172a;
  /* Layout */
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  /* No default backdrop — the overlay itself fills the space */
}

#mobile-nav-overlay:popover-open {
  display: flex;
  animation: overlayFadeIn 0.22s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#mobile-nav-overlay::backdrop {
  display: none; /* Suppress default popover backdrop; overlay starts below the navbar */
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
}

.nav-overlay-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0.85rem 0.5rem;
  border-radius: 8px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-overlay-links a:hover,
.nav-overlay-links a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  padding-left: 0.75rem;
}

.nav-overlay-links a.active {
  border-left: 4px solid var(--accent);
}

.nav-overlay-user {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.nav-overlay-user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-overlay-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-overlay-actions a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  font-weight: 500;
}

.nav-overlay-actions a:hover {
  color: #ffffff;
}

/* Main Container */
.container {
  max-width: 1280px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  width: 100%;
  flex: 1;
}

/* Page Header */
.page-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

/* Cards & Layout */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Auth Cards */
.auth-wrapper {
  max-width: 460px;
  margin: 3rem auto;
}

.auth-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

.auth-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  color: #334155;
}

.form-control, .form-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--text-main);
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 42px;
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control-sm, .form-select-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.875rem;
  min-height: 34px;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.form-col {
  flex: 1;
  min-width: 200px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  min-height: 42px;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: #64748b;
  color: #ffffff;
}

.btn-secondary:hover {
  background: #475569;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background: #15803d;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: #f1f5f9;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  min-height: 32px;
}

.btn-lg {
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  min-height: 48px;
}

.btn-block {
  width: 100%;
}

/* ── Universal Responsive Data Tables (CSS-Tricks Stacked Card Pattern) ───── */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table th a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: #1e293b;
  vertical-align: middle;
}

.data-table tr:hover {
  background: #f8fafc;
}

/* Responsive Table Mode for Mobile (< 768px) */
@media (max-width: 768px) {
  .table-container.responsive-cards {
    border: none;
    background: transparent;
    overflow: visible;
  }

  .data-table.responsive-table,
  .data-table.responsive-table thead,
  .data-table.responsive-table tbody,
  .data-table.responsive-table th,
  .data-table.responsive-table td,
  .data-table.responsive-table tr {
    display: block;
    width: 100%;
  }

  /* Hide table headers on mobile */
  .data-table.responsive-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
  }

  /* Each row transforms into a clean isolated card */
  .data-table.responsive-table tbody tr {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .data-table.responsive-table tbody tr:hover {
    box-shadow: var(--shadow-md);
    background: var(--bg-card);
  }

  /* Each cell shows label on left and value on right */
  .data-table.responsive-table td {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    padding: 0.55rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    font-size: 0.88rem;
    min-height: 2.2rem;
    word-break: break-word;
    gap: 0.75rem;
  }

  .data-table.responsive-table td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .data-table.responsive-table td[data-label]::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    flex-shrink: 0;
  }
}

/* ── Filter Card & Mobile Collapsible Controls ───────────────────────────── */
.filter-card {
  background: #f8fafc;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.filter-toggle-btn {
  display: none;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-active { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-approved { background: #dbeafe; color: #1e40af; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* Alert / Toast Messages */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.925rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #bbf7d0; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #fef08a; }
.alert-info { background: var(--primary-light); color: var(--primary-hover); border: 1px solid #bfdbfe; }

/* HTMX Loading Indicator */
.htmx-indicator {
  display: none;
  opacity: 0;
  transition: opacity 200ms ease-in;
}
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator {
  display: inline-block;
  opacity: 1;
}

.spinner {
  border: 3px solid rgba(0, 0, 0, 0.1);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border-left-color: var(--primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Footer */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}

footer a {
  color: #cbd5e1;
  text-decoration: underline;
}

/* Graphviz Org SVG Box */
.org-container {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  height: 580px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.org-container.panning {
  cursor: grabbing;
}

.org-pan-layer {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.org-select {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.85rem;
  background: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
  min-height: 34px;
}

.org-select:focus {
  border-color: var(--primary);
}

.org-select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8fafc;
}

.dot-code-box {
  background: #0f172a;
  color: #38bdf8;
  font-family: monospace;
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: pre-wrap;
  overflow-x: auto;
  max-height: 260px;
}

/* ── Mobile Layout Media Queries ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar {
    padding: 0.65rem 1rem;
  }

  .nav-brand {
    font-size: 1.15rem;
  }

  .nav-brand img {
    width: 36px;
    height: 36px;
  }

  .nav-brand span.lodge-badge {
    display: none; /* Keep navbar clean on small screens */
  }

  .nav-links, .desktop-auth {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .container {
    padding: 0 1rem;
    margin: 1.25rem auto;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .page-title {
    font-size: 1.4rem;
  }

  .card {
    padding: 1rem;
    margin-bottom: 1.25rem;
  }

  .form-col {
    min-width: 100%;
  }

  .filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.75rem;
  }

  .filter-collapsible {
    display: none;
  }

  .filter-collapsible.is-expanded {
    display: block;
  }

  .org-container {
    height: 420px;
  }

  /* Lock body scroll when the mobile nav popover is open — pure CSS, no JS */
  body:has(#mobile-nav-overlay:popover-open) {
    overflow: hidden;
  }
}


/* ── SMS Status Ribbon & Components ─────────────────────────────────────── */

.sms-ribbon {
  position: sticky;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: ribbonSlideDown 0.25s ease-out;
}

.sms-ribbon--running {
  background: linear-gradient(90deg, #1e40af, #2563eb);
}

.sms-ribbon--ok {
  background: linear-gradient(90deg, #15803d, #16a34a);
}

.sms-ribbon--error {
  background: linear-gradient(90deg, #b91c1c, #dc2626);
}

.sms-ribbon-msg {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sms-ribbon-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: ribbonSpin 0.75s linear infinite;
}

.sms-ribbon-detail {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.sms-ribbon-detail:hover {
  background: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.sms-ribbon-cancel-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sms-ribbon-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.sms-ribbon-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.35rem;
  line-height: 1;
  border-radius: 4px;
}

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

#send-sms-drawer {
  display: none;
  animation: drawerSlideDown 0.2s ease-out;
}

#send-sms-drawer.is-open {
  display: block;
}

@keyframes ribbonSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@keyframes ribbonSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ── SMS Character Counter Component ─────────────────────────────────────── */

.sms-counter-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.sms-counter-wrapper textarea {
  width: 100%;
  padding-bottom: 2rem;
  box-sizing: border-box;
}

.sms-char-counter {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  background: var(--bg-card, rgba(255, 255, 255, 0.92));
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-color, #e2e8f0);
  pointer-events: none;
  user-select: none;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
