/* Reserve scrollbar gutter so layout doesn't shift when content height changes
   (e.g. switching between the Home and Calendar tabs on the gateway page). */
html { scrollbar-gutter: stable; }

/* Hide scrollbar while allowing scroll */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Reusable Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.grid {
    display: grid;
  }
.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) {
    .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media (min-width: 1024px) {
    .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

}
.gap-4 {
gap: 1rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}
.nav-link:hover {
    color: #1d4ed8;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}
.form-input:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
}
.description {
    font-size: 0.875rem;
    color: #6b7280;
}
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}
.btn-primary {
    background-color: #3b82f6;
    color: #ffffff;
}
.btn-primary:hover {
    background-color: #2563eb;
}
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}
.btn-secondary {
    background-color: #e5e7eb;
    color: #374151;
  }
  .btn-secondary:hover {
    background-color: #d1d5db;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    border-left: 2px solid #e5e7eb;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0;
    width: 1rem;
    height: 1rem;
    background-color: #3b82f6;
    border-radius: 50%;
}
.timeline-content {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}
.timeline-date {
    font-size: 0.75rem;
    color: #9ca3af;
}
.timeline-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.timeline-images img {
    max-width: 70px;
    max-height: 70px;
    object-fit: cover;
    border-radius: 0.25rem;
}

/* ── Home widget board (pages#home) edit-mode affordances ──
   The board root carries `.home-editing` while the Edit toggle is on. */
.home-edit-only { display: none; }
.home-board.home-editing .home-edit-only { display: flex; }

/* While editing, pass-through links stay VISIBLE (so the user can see the
   widget they're arranging) but are inert — a drag/tap can't navigate away.
   Must not hide content: a widget whose body is links (Jump in, Upcoming,
   Needs-attention rows) would otherwise blank out in edit mode. */
.home-board.home-editing .home-not-editing { pointer-events: none; }

/* Overlay: covers the widget body in edit mode, blocking interaction and
   applying a subtle gray wash so the content recedes behind the controls. */
.home-widget-overlay {
  display: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 5;
  pointer-events: all;
  background: color-mix(in srgb, var(--pm-fg-1) 8%, transparent);
}
/* Elements that must vanish entirely in edit mode (not just inert). */
.home-board.home-editing .home-edit-hidden { display: none !important; }

.home-board.home-editing [data-widget-id] { outline: 1.5px dashed transparent; transition: outline-color .15s; }
.home-board.home-editing [data-widget-id]:hover { outline-color: var(--pm-primary); }
.home-board.home-editing [data-widget-id]:hover .home-widget-overlay { display: block; }

/* Done button: outlined green pill when edit mode is active.
   !important required to override the inline style on the button element. */
.home-board.home-editing [data-edit-toggle] {
  background: var(--pm-primary-surface) !important;
  border: 1.5px solid var(--pm-primary) !important;
  color: var(--pm-primary) !important;
}
