/**
 * @file
 * components.css: buttons, tabs, messages, cards, feeds, pager, breadcrumb,
 * wiki toolbar, node full views, interaction bar, collapsible comments, and temple styling.
 */

/* Page title and breadcrumb */
.page-title {
  position: relative;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  font-family: var(--font-serif-heading);
}

.page-title::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 4rem;
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--kaliyattam-gold);
}

.site-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--theme-text-muted);
}

.site-breadcrumb li + li::before {
  content: "\203A";
  margin-inline: 0.5em;
}

.site-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.site-breadcrumb a:hover {
  color: var(--theme-accent);
}

/* Buttons */
.button,
.btn,
input[type="submit"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-full);
  background: var(--theme-surface);
  color: var(--theme-text);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.button:hover,
.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background: var(--theme-surface-warm);
  box-shadow: var(--shadow-sm);
  color: var(--theme-text);
}

.button--primary,
.button.btn-primary,
.btn.btn-primary,
.btn-primary,
.button--primary:hover,
.btn-primary:hover {
  border-color: transparent;
  background: var(--kaliyattam-gradient);
  color: var(--kaliyattam-text-light, #ffffff);
}

.button--primary:hover,
.btn-primary:hover {
  box-shadow: var(--shadow-crimson);
  transform: translateY(-1px);
  color: var(--kaliyattam-text-light, #ffffff);
}

.button--directions {
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--kaliyattam-border);
}

/* Sidebar "Add new content" quick action block */
#block-kaliyattam-minimal-mnaddnewcontentblock {
  margin-bottom: var(--space-4);
}

#block-kaliyattam-minimal-mnaddnewcontentblock .field__item,
#block-kaliyattam-minimal-mnaddnewcontentblock .block__content {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

#block-kaliyattam-minimal-mnaddnewcontentblock a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.7rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  background: var(--kaliyattam-gradient);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(137, 0, 0, 0.25);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

#block-kaliyattam-minimal-mnaddnewcontentblock a:hover {
  background: #6b0000;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(137, 0, 0, 0.35);
  transform: translateY(-1px);
}

/* Local tasks */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--theme-border);
}

.tabs a {
  display: block;
  padding: var(--space-2) var(--space-4);
  border-bottom: 3px solid transparent;
  color: var(--theme-text-secondary);
  font-weight: 600;
  text-decoration: none;
}

.tabs a:hover,
.tabs a.is-active {
  border-bottom-color: var(--theme-accent);
  color: var(--theme-accent);
}

/* Messages */
.messages {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-inline-start: 4px solid var(--theme-border);
  border-radius: var(--radius-md);
  background: var(--theme-surface-alt);
}

.messages--status { border-inline-start-color: #15803d; }
.messages--warning { border-inline-start-color: var(--kaliyattam-gold); }
.messages--error { border-inline-start-color: #b91c1c; }

/* Node display: full view card mode */
.node--view-mode-full {
  background: var(--theme-surface, #ffffff);
  border: 1px solid var(--theme-border, #e7ded4);
  border-radius: var(--radius-lg, 14px);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--theme-card-shadow, 0 2px 8px rgba(0, 0, 0, 0.04));
  color: var(--theme-text, #1c1917);
  max-width: 100%;
}

.node--view-mode-full .node__title {
  padding: 0;
  margin: 0 0 1.25rem;
  font-family: var(--font-serif-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
}

.node-cover-image,
.location-cover-image {
  margin-bottom: 1.5rem;
  border-radius: 10px;
  overflow: hidden;
}

.node-cover-image img,
.location-cover-image img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* Reduced image size in card and teaser view modes across timeline, posts, listings */
.node--view-mode-card .node-cover-image,
.node--view-mode-teaser .node-cover-image,
.node--view-mode-card .location-cover-image,
.node--view-mode-teaser .location-cover-image {
  height: 220px;
  max-height: 220px;
  overflow: hidden;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.node--view-mode-card .node-cover-image img,
.node--view-mode-teaser .node-cover-image img,
.node--view-mode-card .location-cover-image img,
.node--view-mode-teaser .location-cover-image img {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-normal, 0.3s ease);
}

.node--view-mode-card:hover .node-cover-image img,
.node--view-mode-teaser:hover .node-cover-image img,
.node--view-mode-card:hover .location-cover-image img,
.node--view-mode-teaser:hover .location-cover-image img {
  transform: scale(1.03);
}

.node--view-mode-card .field--name-field-media,
.node--view-mode-teaser .field--name-field-media,
.node--view-mode-card .field--name-field-featured-image,
.node--view-mode-teaser .field--name-field-featured-image {
  margin: 0.5rem 0 1rem;
  border-radius: 8px;
  overflow: hidden;
}

.node--view-mode-card .field--name-field-media .field__items,
.node--view-mode-teaser .field--name-field-media .field__items,
.node--view-mode-card .field--name-field-media .field__item,
.node--view-mode-teaser .field--name-field-media .field__item {
  height: 220px;
  max-height: 220px;
  overflow: hidden;
}

.node--view-mode-card .field--name-field-media img,
.node--view-mode-teaser .field--name-field-media img,
.node--view-mode-card .field--name-field-featured-image img,
.node--view-mode-teaser .field--name-field-featured-image img {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.node--view-mode-card .km-carousel,
.node--view-mode-teaser .km-carousel,
.node--view-mode-card .km-carousel__viewport,
.node--view-mode-teaser .km-carousel__viewport,
.node--view-mode-card .km-carousel__slide,
.node--view-mode-teaser .km-carousel__slide {
  height: 220px;
  max-height: 220px;
}

.node--view-mode-card .km-carousel__slide img,
.node--view-mode-card .km-carousel__slide video,
.node--view-mode-teaser .km-carousel__slide img,
.node--view-mode-teaser .km-carousel__slide video {
  height: 100%;
  max-height: 220px;
  object-fit: cover;
}

.node--view-mode-card .post-main-content img,
.node--view-mode-teaser .post-main-content img,
.node--view-mode-card .node-main-fields img,
.node--view-mode-teaser .node-main-fields img {
  max-height: 220px;
  width: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin: 0.5rem 0;
}

.node--view-mode-teaser,
.node--view-mode-card {
  overflow: hidden;
  border: 1px solid var(--theme-border-subtle);
  border-radius: var(--radius-lg);
  background: var(--theme-surface);
  box-shadow: var(--theme-card-shadow);
  transition: box-shadow var(--transition-normal);
}

.node--view-mode-teaser:hover,
.node--view-mode-card:hover {
  box-shadow: var(--theme-card-shadow-hover);
}

.node__title {
  margin: 0;
  padding: var(--space-4) var(--space-4) 0;
  font-size: var(--text-xl);
}

.node__title a {
  color: var(--theme-text);
  text-decoration: none;
}

.node__title a:hover {
  color: var(--theme-accent);
}

.node__content {
  padding: 0;
}

.node--view-mode-teaser .node__content,
.node--view-mode-card .node__content {
  padding: var(--space-4);
}

.node__meta {
  margin: 0 0 var(--space-3);
  color: var(--theme-text-muted);
  font-size: var(--text-sm);
}

/* Node Header, Subtle Author & Metadata (LinkedIn Reference) */
.node-post-author-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.node-author-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--theme-accent, #890000);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.node-author-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.node-author-name-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.node-author-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--theme-text, #18181b);
  text-decoration: none;
}

.node-author-name:hover {
  color: var(--theme-accent, #890000);
  text-decoration: underline;
}

.node-author-badge {
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.node-meta-time {
  font-size: 0.775rem;
  color: var(--theme-text-muted, #71717a);
}

.node-time-link {
  color: inherit;
  text-decoration: none;
}

.node-time-link:hover {
  text-decoration: underline;
  color: var(--theme-accent, #890000);
}

.node-post-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}


.node-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  padding: 0;
}

.node-header-row .node__title {
  margin: 0;
  padding: 0;
  font-family: var(--font-serif-heading, Georgia, serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
}

.node-header-row .node__title a {
  color: var(--theme-text, #18181b);
  text-decoration: none;
}

.node-header-row .node__title a:hover {
  color: var(--theme-accent, #890000);
}

.node-header-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Subtle metadata line under title */
.node-meta-subtle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--theme-text-muted, #71717a);
  margin-bottom: 0.85rem;
}

.node-meta-subtle .meta-dot {
  color: #9ca3af;
}

.node-meta-subtle .node-author-link {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.node-meta-subtle .node-author-link:hover {
  color: var(--theme-accent, #890000);
  text-decoration: underline;
}

.node-bundle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Mini dynamic calendar icon for .node-bundle-pill--event */
.pill-cal-icon {
  display: inline-flex;
  flex-direction: column;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #ffffff;
  border: 1px solid #6ee7b7;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
  margin-right: 0.15rem;
}

.pill-cal-top {
  width: 100%;
  height: 3.5px;
  background: #10b981;
  flex-shrink: 0;
}

.pill-cal-day {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7.5px;
  font-weight: 700;
  color: #065f46;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.02em;
}

:root[data-theme="dark"] .pill-cal-icon,
html.dark .pill-cal-icon {
  background: #064e3b;
  border-color: #059669;
}

:root[data-theme="dark"] .pill-cal-top,
html.dark .pill-cal-top {
  background: #10b981;
}

:root[data-theme="dark"] .pill-cal-day,
html.dark .pill-cal-day {
  color: #d1fae5;
}

.node-bundle-pill--event {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.node-bundle-pill--theyyam {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.node-bundle-pill--location {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Professional LinkedIn-Style Interaction Bar */
.node-interaction-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding-top: 0.65rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--theme-border-subtle, #e5e7eb);
  border-bottom: none !important;
}

.node-interaction-bar .flag,
.node-interaction-bar .action-flag {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.node-interaction-bar .action-flag a,
.node-interaction-bar .action-flag button,
.node-interaction-bar button.action-flag,
.node-interaction-bar a.action-flag,
.node-interaction-bar .timeline-action-btn,
.node-interaction-bar .timeline-action-link,
ul.links.inline li {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  padding: 0.45rem 0.85rem !important;
  border-radius: 6px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  background: transparent !important;
  color: var(--theme-text-secondary, #4b5563) !important;
  border: none !important;
  cursor: pointer !important;
  line-height: 1.3 !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
}

.node-interaction-bar .action-flag a:hover,
.node-interaction-bar .action-flag button:hover,
.node-interaction-bar button.action-flag:hover,
.node-interaction-bar a.action-flag:hover,
.node-interaction-bar .timeline-action-btn:hover,
.node-interaction-bar .timeline-action-link:hover,
ul.links.inline li:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: var(--theme-accent, #890000) !important;
}

:root[data-theme="dark"] .node-interaction-bar .action-flag a:hover,
:root[data-theme="dark"] .node-interaction-bar .action-flag button:hover,
:root[data-theme="dark"] .node-interaction-bar button.action-flag:hover,
:root[data-theme="dark"] .node-interaction-bar a.action-flag:hover,
:root[data-theme="dark"] .node-interaction-bar .timeline-action-btn:hover,
:root[data-theme="dark"] .node-interaction-bar .timeline-action-link:hover,
html.dark .node-interaction-bar .action-flag a:hover,
html.dark .node-interaction-bar .action-flag button:hover,
html.dark .node-interaction-bar button.action-flag:hover,
html.dark .node-interaction-bar a.action-flag:hover,
html.dark .node-interaction-bar .timeline-action-btn:hover,
html.dark .node-interaction-bar .timeline-action-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fca5a5 !important;
}

:root[data-theme="dark"] .node-interaction-bar .action-flag-view-post,
html.dark .node-interaction-bar .action-flag-view-post {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid #3f3f46 !important;
  color: #a1a1aa !important;
}

:root[data-theme="dark"] .node-interaction-bar .action-flag-view-post:hover,
html.dark .node-interaction-bar .action-flag-view-post:hover {
  background: rgba(137, 0, 0, 0.2) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.node-interaction-bar a.action-flag-view-post,
.node-interaction-bar .action-flag-view-post {
  margin-left: auto !important;
  font-size: 0.82rem !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: var(--radius-sm, 6px) !important;
  background: var(--theme-surface-subtle, #f4f4f5) !important;
  border: 1px solid var(--theme-border-subtle, #e4e4e7) !important;
  color: var(--theme-text-muted, #71717a) !important;
  text-decoration: none !important;
}

.node-interaction-bar a.action-flag-view-post:hover,
.node-interaction-bar .action-flag-view-post:hover {
  background: #fef2f2 !important;
  color: var(--theme-accent, #890000) !important;
  border-color: rgba(137, 0, 0, 0.2) !important;
}

/* SVG Mask Icons for Interaction Bar */
.action-flag-favorite::before,
.flag-bookmark a::before,
.flag-follow-content a::before {
  content: "";
  display: inline-block;
  width: 17px;
  height: 17px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  flex-shrink: 0;
}

.action-flag-like::before,
.flag-like-node a::before {
  content: "";
  display: inline-block;
  width: 17px;
  height: 17px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3'/%3E%3C/svg%3E") no-repeat center / contain;
  flex-shrink: 0;
}

.btn-copy-link::before {
  content: "";
  display: inline-block;
  width: 17px;
  height: 17px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cline x1='8.59' y1='13.51' x2='15.42' y2='17.49'/%3E%3Cline x1='15.41' y1='6.51' x2='8.59' y2='10.49'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cline x1='8.59' y1='13.51' x2='15.42' y2='17.49'/%3E%3Cline x1='15.41' y1='6.51' x2='8.59' y2='10.49'/%3E%3C/svg%3E") no-repeat center / contain;
  flex-shrink: 0;
}

.comments-scroll-btn::before {
  content: "";
  display: inline-block;
  width: 17px;
  height: 17px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  flex-shrink: 0;
}

/* Active / unflag states fill the icons with vivid theme colors */
.action-unflag a::before {
  background-color: var(--theme-accent, #890000);
}

.flag-bookmark.action-unflag a::before,
.flag-follow-content.action-unflag a::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='1'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='1'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  background-color: #d97706;
}

.flag-bookmark.action-unflag a,
.flag-follow-content.action-unflag a {
  background: rgba(245, 158, 11, 0.1) !important;
  color: #d97706 !important;
}

.flag-like-node.action-unflag a::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='1'%3E%3Cpath d='M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='1'%3E%3Cpath d='M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3'/%3E%3C/svg%3E") no-repeat center / contain;
  background-color: #e11d48;
}

.flag-like-node.action-unflag a {
  background: rgba(225, 29, 72, 0.1) !important;
  color: #e11d48 !important;
}

.comments-scroll-btn.is-active::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='1'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='1'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center / contain;
  background-color: var(--theme-accent, #890000);
}

.node-interaction-bar .flag a {
  font-size: 0 !important;
}

.node-interaction-bar .action-count {
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.06);
  font-weight: 700;
  color: inherit;
  margin-left: 0.15rem;
}

.comments-scroll-btn.is-active {
  background: rgba(137, 0, 0, 0.08) !important;
  color: var(--theme-accent, #890000) !important;
}

/* Collapsible Comments Section: only hide when JavaScript is enabled */
html.js .node-comments-section.comments-collapsible:not(.is-open) {
  display: none !important;
}

.node-comments-section.comments-collapsible.is-open {
  display: block !important;
  animation: commentsReveal 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes commentsReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.node-comments-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
}

.comments-title {
  font-family: var(--font-serif-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--theme-text, #1c1917);
  margin-bottom: 1.25rem;
}

/* Temple / Location Full View Components */
.location-address-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  background: var(--theme-surface-warm, #f8fafc);
  border: 1px solid var(--theme-border-subtle, #e2e8f0);
}

.location-address-icon {
  font-size: 1.35rem;
}

.location-address-text p {
  margin: 0;
  line-height: 1.5;
  font-weight: 500;
}

.temple-map-section {
  margin-block: 1.5rem;
  padding: 1.25rem;
  background: var(--theme-surface-alt, #fafbfc);
  border: 1px solid var(--theme-border-subtle, #e2e8f0);
  border-radius: 12px;
}

.temple-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--theme-border-subtle, #e2e8f0);
}

.temple-map-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--theme-text, #1c1917);
}

.temple-map-canvas {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--theme-border-subtle, #cbd5e1);
}

.theyyam-related {
  margin-block: 2.5rem;
}

.theyyam-related-title {
  font-family: var(--font-serif-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--theme-text, #1c1917);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theyyam-related-icon {
  font-size: 1.35rem;
}

.theyyam-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 1.25rem;
}

.theyyam-card-wrapper {
  display: flex;
}

.theyyam-card-wrapper > article {
  width: 100%;
}

/* Minicard: Visual Thumbnail Card with Gradient Title Overlay (Inspired by reference) */
.minicard-theyyam {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: var(--theme-surface-warm, #1c1917);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--theme-border-subtle, #e5e7eb);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.minicard-theyyam:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  border-color: var(--theme-accent, #890000);
}

.minicard-theyyam__link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.minicard-theyyam__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.minicard-theyyam__media div,
.minicard-theyyam__media picture {
  width: 100%;
  height: 100%;
}

.minicard-theyyam__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.minicard-theyyam:hover .minicard-theyyam__media img {
  transform: scale(1.05);
}

.minicard-theyyam__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2c2523 0%, #1a1615 100%);
}

.minicard-theyyam__placeholder-icon {
  font-size: 3rem;
  opacity: 0.6;
}

.minicard-theyyam__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem 1rem 1rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.5) 40%,
    rgba(0, 0, 0, 0.1) 70%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
}

.minicard-theyyam__title {
  margin: 0;
  color: #ffffff !important;
  font-family: var(--font-serif-heading, Georgia, serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* Dark mode enhancements for minicard */
:root[data-theme="dark"] .minicard-theyyam,
html.dark .minicard-theyyam {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .minicard-theyyam:hover,
html.dark .minicard-theyyam:hover {
  border-color: #f87171;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* Referenced Events & Posts on Temples and Theyyam */
.referenced-references-section {
  margin-block: 2.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.referenced-block {
  background: var(--theme-surface-warm, #f8fafc);
  border: 1px solid var(--theme-border-subtle, #e2e8f0);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.referenced-block:hover {
  border-color: var(--theme-border, #cbd5e1);
  box-shadow: var(--shadow-sm);
}

.referenced-block-title {
  font-family: var(--font-serif-heading, Georgia, serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  color: var(--theme-text, #1c1917);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.referenced-icon {
  font-size: 1.15rem;
}

.referenced-titles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.referenced-title-item {
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.45;
}

.referenced-title-item::before {
  content: "•";
  position: absolute;
  left: 0.25rem;
  color: var(--theme-accent, #890000);
  font-size: 1.1rem;
  line-height: 1.2;
}

.referenced-title-link,
.referenced-title-item a {
  color: var(--theme-text, #1c1917);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.referenced-title-link:hover,
.referenced-title-item a:hover {
  color: var(--theme-accent, #890000);
  text-decoration: underline;
}

:root[data-theme="dark"] .referenced-block,
html.dark .referenced-block {
  background: var(--theme-surface, #18181b);
  border-color: var(--theme-border, #27272a);
}

:root[data-theme="dark"] .referenced-title-link,
:root[data-theme="dark"] .referenced-title-item a,
html.dark .referenced-title-link,
html.dark .referenced-title-item a {
  color: var(--theme-text, #e2e8f0);
}

:root[data-theme="dark"] .referenced-title-link:hover,
:root[data-theme="dark"] .referenced-title-item a:hover,
html.dark .referenced-title-link:hover,
html.dark .referenced-title-item a:hover {
  color: #fca5a5;
}

:root[data-theme="dark"] .referenced-title-item::before,
html.dark .referenced-title-item::before {
  color: #fca5a5;
}

.theyyam-simple-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.theyyam-list-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--theme-surface-warm, #f8fafc);
  border: 1px solid var(--theme-border-subtle, #e2e8f0);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.theyyam-list-row:hover {
  border-color: var(--theme-accent, #890000);
  background: var(--theme-surface, #ffffff);
  box-shadow: var(--shadow-sm);
}

.theyyam-list-media img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.theyyam-list-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: rgba(137, 0, 0, 0.08);
  font-size: 1.5rem;
}

.theyyam-list-body {
  flex: 1;
  min-width: 0;
}

.theyyam-list-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
}

.theyyam-list-title a {
  color: var(--theme-text, #1c1917);
  text-decoration: none;
}

.theyyam-list-snippet {
  font-size: 0.85rem;
  color: var(--theme-text-secondary, #64748b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theyyam-list-more-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--theme-accent, #890000);
  background: rgba(137, 0, 0, 0.06);
  text-decoration: none;
  white-space: nowrap;
}

.theyyam-list-more-btn:hover {
  background: var(--theme-accent, #890000);
  color: #ffffff;
}

.wiki-node-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--theme-border-subtle, #e2e8f0);
  font-size: 0.82rem;
  color: var(--theme-text-muted, #71717a);
}

.wiki-node-footer a {
  color: var(--theme-text-secondary, #52525b);
  text-decoration: none;
}

.wiki-node-footer a:hover {
  color: var(--theme-accent, #890000);
}

/* Individual Comment cards */
.comment {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--theme-border-subtle);
  background: var(--theme-surface-warm);
  border-radius: var(--radius-md);
}

/* Dark mode adjustments */

:root[data-theme="dark"] .node--view-mode-full,
html.dark .node--view-mode-full {
  background: var(--theme-surface);
  border-color: var(--theme-border);
}

:root[data-theme="dark"] .node-interaction-bar .flag a,
:root[data-theme="dark"] .node-interaction-bar .action-flag,
:root[data-theme="dark"] .node-interaction-bar .timeline-action-btn,
:root[data-theme="dark"] .node-interaction-bar .timeline-action-link,
html.dark .node-interaction-bar .flag a,
html.dark .node-interaction-bar .action-flag,
html.dark .node-interaction-bar .timeline-action-btn,
html.dark .node-interaction-bar .timeline-action-link {
  background: rgba(255, 255, 255, 0.08);
  color: #f4f4f5;
  border-color: rgba(255, 255, 255, 0.12);
}

:root[data-theme="dark"] .location-address-box,
:root[data-theme="dark"] .temple-map-section,
:root[data-theme="dark"] .theyyam-list-row,
html.dark .location-address-box,
html.dark .temple-map-section,
html.dark .theyyam-list-row {
  background: var(--theme-surface-warm);
  border-color: var(--theme-border);
}


:root[data-theme="dark"] .node-author-link,
html.dark .node-author-link {
  color: var(--theme-text, #f4f4f5);
}

/* Pager */
.pager__items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1);
  margin: var(--space-5) 0;
  padding: 0;
  list-style: none;
}

.pager__item a {
  display: block;
  min-width: 2.25rem;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  text-align: center;
  text-decoration: none;
}

.pager__item.is-active a,
.pager__item a:hover {
  background: var(--theme-accent);
  color: var(--theme-surface);
}

/* ==========================================================================
   TIMELINE STREAM (MATCHING SCREENSHOT 1)
   ========================================================================== */

/* Timeline Toolbar: Segmented control bar [ Latest ] [ Popular ] [ 🔍 Search ] */
.timeline-toolbar {
  margin-bottom: var(--space-4, 1rem);
}

.timeline-toolbar__segmented-bar {
  display: inline-flex;
  align-items: center;
  background: var(--theme-surface, #ffffff);
  border: 1px solid var(--theme-border, #e5e7eb);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  gap: 2px;
}

.timeline-toolbar__btn,
.timeline-toolbar__segmented-bar a,
a.timeline-toolbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1.15rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--theme-text-secondary, #4b5563);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
  text-decoration: none !important;
}

.timeline-toolbar__btn:hover,
.timeline-toolbar__btn:focus,
a.timeline-toolbar__btn:hover,
a.timeline-toolbar__btn:focus {
  background: var(--theme-surface-alt, #f3f4f6);
  color: var(--theme-text, #111827);
  text-decoration: none !important;
}

.timeline-toolbar__btn.is-active,
a.timeline-toolbar__btn.is-active {
  background: #fee2e2;
  color: var(--theme-accent, #890000);
  font-weight: 700;
  text-decoration: none !important;
}

:root[data-theme="dark"] .timeline-toolbar__btn.is-active,
html.dark .timeline-toolbar__btn.is-active,
:root[data-theme="dark"] a.timeline-toolbar__btn.is-active,
html.dark a.timeline-toolbar__btn.is-active {
  background: rgba(185, 28, 28, 0.25);
  color: #fca5a5;
  text-decoration: none !important;
}

/* Two-Tier Events Toolbar */
.events-toolbar {
  margin-bottom: 1.25rem;
}

.events-toolbar__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.events-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.events-toolbar__views {
  display: inline-flex;
  align-items: center;
  background: var(--theme-bg-subtle, #f3f4f6);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--theme-border, #e5e7eb);
}

.events-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--theme-text, #374151);
  background: var(--theme-surface, #ffffff);
  border: 1px solid var(--theme-border, #e5e7eb);
  border-radius: 9999px;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.events-pill:hover {
  background: var(--theme-hover, #f9fafb);
  border-color: var(--theme-accent, #890000);
  color: var(--theme-accent, #890000);
}

.events-pill.is-active {
  background: var(--theme-accent, #890000);
  border-color: var(--theme-accent, #890000);
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(137, 0, 0, 0.25);
}

.events-pill__reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.25rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  font-size: 0.8125rem;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}

.events-pill__reset:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #890000;
}

.events-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--theme-text-muted, #6b7280);
  border-radius: 7px;
  text-decoration: none !important;
  transition: all 0.15s ease-in-out;
}

.events-view-btn:hover {
  color: var(--theme-text, #111827);
  background: rgba(0, 0, 0, 0.04);
}

.events-view-btn.is-active {
  color: var(--theme-accent, #890000);
  background: var(--theme-surface, #ffffff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.km-geo-fallback-notice {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
  width: 100%;
}

/* Dark mode overrides for events toolbar */
:root[data-theme="dark"] .events-pill,
html.dark .events-pill {
  background: var(--theme-surface, #1f2937);
  border-color: var(--theme-border, #374151);
  color: var(--theme-text, #f3f4f6);
}

:root[data-theme="dark"] .events-pill:hover,
html.dark .events-pill:hover {
  background: #374151;
  color: #fca5a5;
  border-color: #ef4444;
}

:root[data-theme="dark"] .events-pill.is-active,
html.dark .events-pill.is-active {
  background: #991b1b;
  border-color: #ef4444;
  color: #ffffff !important;
}

:root[data-theme="dark"] .events-toolbar__views,
html.dark .events-toolbar__views {
  background: #111827;
  border-color: #374151;
}

:root[data-theme="dark"] .events-view-btn.is-active,
html.dark .events-view-btn.is-active {
  background: #1f2937;
  color: #fca5a5;
}

/* Timeline Search Drawer */
.timeline-toolbar__search-drawer {
  display: none;
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--theme-surface, #ffffff);
  border: 1px solid var(--theme-border, #e5e7eb);
  border-radius: 12px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.05));
}

.timeline-toolbar__search-drawer.is-open {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

.timeline-toolbar__search-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.timeline-toolbar__filter-item {
  flex: 1;
  min-width: 200px;
}

.timeline-toolbar__filter-item .form-item {
  margin: 0;
}

.timeline-toolbar__filter-item--proximity {
  flex: 2;
  min-width: 280px;
}

.timeline-toolbar__filter-item--proximity fieldset {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.timeline-toolbar__filter-item--proximity fieldset > legend {
  display: none;
}

.timeline-toolbar__filter-item--proximity #edit-proximity-wrapper > .fieldset-wrapper,
.timeline-toolbar__filter-item--proximity #edit-proximity > .fieldset-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.timeline-toolbar__filter-item--proximity .origin-address-autocomplete,
.timeline-toolbar__filter-item--proximity .form-item-proximity-source-configuration-origin-address {
  flex: 1 1 200px;
  min-width: 180px;
  order: 1;
}

.timeline-toolbar__filter-item--proximity .form-item-proximity-value {
  flex: 0 0 90px;
  max-width: 100px;
  order: 2;
}

.timeline-toolbar__filter-item--proximity .description,
.timeline-toolbar__filter-item--proximity [id*="description"],
.timeline-toolbar__filter-item--proximity [class*="description"] {
  display: none !important;
}

.timeline-toolbar__actions {
  margin: 0;
}

.timeline-toolbar__actions input[type="submit"],
.timeline-toolbar__actions .button {
  background: var(--theme-accent, #890000);
  color: #ffffff;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

/* View structure on timeline */
.view-timeline-site > form[id*="views-exposed-form-timeline-site"],
.view-timeline-site > .views-exposed-form {
  margin-bottom: 0.75rem;
}

.view-timeline-site > .view-header {
  margin-bottom: 1.25rem;
}

/* Ensure infinite scroll pager sits in natural document flow below content */
[data-drupal-views-infinite-scroll-pager].visually-hidden {
  position: static !important;
  clip: auto !important;
  height: 1px !important;
  width: 100% !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

/* "Add post" button on /posts feed matching "Add an Event" on /events page */
.view-timeline-type header,
.view-timeline-site header,
.views-element-container header:has(a[href*="/node/add/post"]) {
  margin-bottom: 1rem;
}

.view-timeline-type header a,
.view-timeline-site header a,
.views-element-container header a[href*="/node/add/post"] {
  margin-bottom: 0.5rem;
}

/* User Card in Left Sidebar */
#block-kaliyattam-minimal-user-card {
  background: var(--theme-surface, #ffffff);
  border: 1px solid var(--theme-border, #e5e7eb);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

:root[data-theme="dark"] #block-kaliyattam-minimal-user-card,
html.dark #block-kaliyattam-minimal-user-card {
  background: var(--theme-surface, #1e293b);
  border-color: var(--theme-border, #334155);
}

.user-card-widget {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.user-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--theme-accent, #890000);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.user-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--theme-text, #18181b);
}

.user-card-role-badge {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid #fde68a;
  align-self: flex-start;
}

:root[data-theme="dark"] .user-card-role-badge,
html.dark .user-card-role-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

.user-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.25rem;
}

.user-card-actions a.btn,
.user-card-actions a {
  flex: 1;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  padding: 0.45rem 0.75rem !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.user-card-actions a .icon {
  display: none !important;
}


:root[data-theme="dark"] .user-card-avatar,
html.dark .user-card-avatar {
  background: #b91c1c !important;
  color: #ffffff !important;
}


/* About Kaliyattam block heading (Screenshot 1) */
#block-kaliyattam-minimal-about h2,
[id*="about"] h2:not(.visually-hidden) {
  font-family: var(--font-serif-heading, Georgia, serif);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--theme-accent, #890000);
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--theme-border-subtle, #f4ede4);
}

/* Timeline Feed Cards (Screenshot 1) */
.node--view-mode-card {
  background: var(--theme-surface, #ffffff);
  border: 1px solid var(--theme-border, #e5e7eb);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.node--view-mode-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Pinned card highlight: 4px amber border on left */
.node--view-mode-card.node--sticky,
.node--sticky {
  border-left: 4px solid #d97706 !important;
}

/* Event Full Page Card Layout (Matching Sacred kaliyattam temple card reference) */
.event-full-card,
.event-full-view {
  background: var(--theme-surface, #ffffff);
  border: 1px solid var(--theme-border, #e5e7eb);
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 2rem;
}

.event-meta-subtle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--theme-border-subtle, #f4ede4);
  font-size: 0.84rem;
  color: var(--theme-text-muted, #71717a);
}

.event-meta-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.event-chips-row,
.post-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.event-chips-row .field,
.post-chips-row .field {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 500;
  margin: 0;
}

.event-chips-row .field .field__label,
.post-chips-row .field .field__label {
  display: none !important;
}

.event-chips-row .field--name-field-when,
.event-chips-row .field--name-field-events,
.post-chips-row .field--name-field-events {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.event-chips-row .field--name-field-when::before,
.event-chips-row .field--name-field-events::before,
.post-chips-row .field--name-field-events::before {
  content: "📅";
  font-size: 0.95rem;
}

.event-chips-row .field--name-field-theyyam,
.post-chips-row .field--name-field-theyyam {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.event-chips-row .field--name-field-theyyam::before,
.post-chips-row .field--name-field-theyyam::before {
  content: "🎭";
  font-size: 0.95rem;
}

.event-chips-row .field--name-field-where,
.post-chips-row .field--name-field-where {
  background: #f4f4f5;
  color: #3f3f46;
  border: 1px solid #e4e4e7;
}

.event-chips-row .field--name-field-where::before,
.post-chips-row .field--name-field-where::before {
  content: "📍";
  font-size: 0.95rem;
}

.event-chips-row a,
.post-chips-row a {
  color: inherit;
  text-decoration: none;
}

.event-chips-row a:hover,
.post-chips-row a:hover {
  text-decoration: underline;
}

.event-media-cover {
  margin: 1.25rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.event-media-cover img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 480px;
}

.event-main-content,
.post-main-content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--theme-text, #18181b);
  margin-bottom: 1.5rem;
}

.event-full-card .field--name-body .field__label,
.event-main-content .field__label,
.post-full-card .field--name-field-content .field__label,
.post-main-content .field__label {
  display: none !important;
}

.post-full-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--theme-border, #e4e4e7);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

:root[data-theme="dark"] .event-full-card,
:root[data-theme="dark"] .post-full-card,
html.dark .event-full-card,
html.dark .post-full-card {
  background: var(--theme-surface, #18181b);
  border-color: var(--theme-border, #27272a);
}

:root[data-theme="dark"] .event-chips-row .field--name-field-when,
:root[data-theme="dark"] .event-chips-row .field--name-field-events,
:root[data-theme="dark"] .post-chips-row .field--name-field-events,
html.dark .event-chips-row .field--name-field-when,
html.dark .event-chips-row .field--name-field-events,
html.dark .post-chips-row .field--name-field-events {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}

:root[data-theme="dark"] .event-chips-row .field--name-field-theyyam,
:root[data-theme="dark"] .post-chips-row .field--name-field-theyyam,
html.dark .event-chips-row .field--name-field-theyyam,
html.dark .post-chips-row .field--name-field-theyyam {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

:root[data-theme="dark"] .event-chips-row .field--name-field-where,
:root[data-theme="dark"] .post-chips-row .field--name-field-where,
html.dark .event-chips-row .field--name-field-where,
html.dark .post-chips-row .field--name-field-where {
  background: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  border-color: rgba(255, 255, 255, 0.15);
}


.node-pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.node--view-mode-card .node__title {
  font-family: var(--font-serif-heading, Georgia, serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.6rem;
  padding: 0;
}

.node--view-mode-card .node__title a {
  color: var(--theme-text, #18181b);
  text-decoration: none;
}

.node--view-mode-card .node__title a:hover {
  color: var(--theme-accent, #890000);
}

/* Content pills for Event Date, Theyyam, and Temple */
.node--view-mode-card .field--name-field-when,
.node--view-mode-card .field--name-field-theyyam,
.node--view-mode-card .field--name-field-where {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 500;
  margin-top: 0.6rem;
  margin-right: 0.4rem;
  vertical-align: middle;
}

/* 1. Date pill: Mint green */
.node--view-mode-card .field--name-field-when {
  display: inline-flex;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  width: fit-content;
}

.node--view-mode-card .field--name-field-when::before {
  content: "📅";
  font-size: 0.95rem;
}

/* 2. Theyyam pill: Warm sand/amber */
.node--view-mode-card .field--name-field-theyyam {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.node--view-mode-card .field--name-field-theyyam::before {
  content: "🎭";
  font-size: 0.95rem;
}

/* 3. Temple pill: Warm stone/gray */
.node--view-mode-card .field--name-field-where {
  background: #f4f4f5;
  color: #3f3f46;
  border: 1px solid #e4e4e7;
}

.node--view-mode-card .field--name-field-where::before {
  content: "📍";
  font-size: 0.95rem;
}

.node--view-mode-card .field--name-field-when .field__label,
.node--view-mode-card .field--name-field-theyyam .field__label,
.node--view-mode-card .field--name-field-where .field__label {
  display: none !important;
}

.node--view-mode-card .field--name-field-when .field__items,
.node--view-mode-card .field--name-field-when .field__item,
.node--view-mode-card .field--name-field-theyyam .field__items,
.node--view-mode-card .field--name-field-theyyam .field__item,
.node--view-mode-card .field--name-field-where .field__items,
.node--view-mode-card .field--name-field-where .field__item {
  display: inline-flex;
  align-items: center;
}

.node--view-mode-card .field--name-field-theyyam a,
.node--view-mode-card .field--name-field-where a {
  color: inherit;
  text-decoration: none;
}

.node--view-mode-card .field--name-field-theyyam a:hover,
.node--view-mode-card .field--name-field-where a:hover {
  text-decoration: underline;
}

:root[data-theme="dark"] .node--view-mode-card,
html.dark .node--view-mode-card {
  background: var(--theme-surface, #18181b);
  border-color: var(--theme-border, #27272a);
}

:root[data-theme="dark"] .node--view-mode-card .field--name-field-when,
html.dark .node--view-mode-card .field--name-field-when {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}

:root[data-theme="dark"] .node--view-mode-card .field--name-field-theyyam,
html.dark .node--view-mode-card .field--name-field-theyyam {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

:root[data-theme="dark"] .node--view-mode-card .field--name-field-where,
html.dark .node--view-mode-card .field--name-field-where {
  background: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Leaflet map on /temples/map and /events/map */
#leaflet-map-view-locations-map-page-1,
.view-locations-map .leaflet-container,
#leaflet-map-view-events-page-map,
.view-events .leaflet-container {
  border-radius: var(--radius-lg, 12px);
  border: 1px solid var(--theme-border-subtle, #e4e4e7);
  box-shadow: var(--theme-card-shadow, 0 1px 3px rgba(0, 0, 0, 0.05));
  margin-top: 0.75rem;
  margin-bottom: 2rem;
  overflow: hidden;
  z-index: 1;
}

.view-locations-map .view-header {
  margin-bottom: 0.75rem;
}

.view-locations-map .view-header a.button,
.view-locations-map .view-header .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: var(--theme-surface, #ffffff);
  border: 1px solid var(--theme-border-subtle, #e4e4e7);
  color: var(--theme-text, #18181b);
  font-size: 0.825rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.view-locations-map .view-header a.button:hover,
.view-locations-map .view-header .btn:hover {
  border-color: var(--theme-accent, #890000);
  color: var(--theme-accent, #890000);
}


/* Lightweight Performant Media Carousel (CSS Scroll-Snap) */
.km-carousel {
  position: relative;
  width: 100%;
  margin: 0.5rem 0 1rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--theme-surface-alt, #f3f4f6);
}

.km-carousel__viewport {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.km-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.km-carousel__track {
  display: flex;
  width: 100%;
  align-items: center;
}

.km-carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--theme-surface-alt, #f3f4f6);
}

.km-carousel__slide img,
.km-carousel__slide video,
.km-carousel__slide iframe {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.node--view-mode-card .km-carousel__slide img,
.node--view-mode-card .km-carousel__slide video {
  max-height: 380px;
}

.km-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 0;
}

.km-carousel__btn:hover {
  background: #ffffff;
  color: #111827;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.km-carousel__btn:disabled {
  opacity: 0;
  pointer-events: none;
}

.km-carousel__btn--prev {
  left: 10px;
}

.km-carousel__btn--next {
  right: 10px;
}

:root[data-theme="dark"] .km-carousel__btn,
html.dark .km-carousel__btn {
  background: rgba(30, 41, 59, 0.95);
  color: #f3f4f6;
  border-color: rgba(255, 255, 255, 0.15);
}

:root[data-theme="dark"] .km-carousel__btn:hover,
html.dark .km-carousel__btn:hover {
  background: #1e293b;
  color: #ffffff;
}

.km-carousel__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
  padding: 4px 8px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.65);
}

.km-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.km-carousel__dot.is-active {
  background: #ffffff;
  width: 18px;
  border-radius: 4px;
}

/* Hide contextual link outlines and triggers on the front-end */
.contextual,
.contextual-links,
[data-contextual-id],
.contextual-region .contextual {
  display: none !important;
}

.contextual-region {
  outline: none !important;
}

/* -------------------------------------------------------------
 * Nearby Button Badges & Map Markers
 * ------------------------------------------------------------- */
.node-nearby-distance-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  animation: fadeIn 0.3s ease;
}

html.dark .node-nearby-distance-badge,
[data-theme="dark"] .node-nearby-distance-badge {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.km-user-location-marker {
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-loc-pulse {
  display: block;
  width: 16px;
  height: 16px;
  background-color: #2563eb;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.8);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* ==========================================================================
   Help Documentation Navigation & Table of Contents Styles
   ========================================================================== */
.help-topics-bar {
  margin: 1.25rem 0 2rem 0;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.help-topics-nav {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.65rem 0.85rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center;
}

.help-topics-nav li,
.help-topics-nav .help-topic-item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
}

.help-topics-nav a,
.help-topic-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 0.92rem !important;
  line-height: 1.3 !important;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

.help-topics-nav a:hover,
.help-topic-link:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #890000 !important;
  transform: translateY(-1px);
}

.help-topics-nav a.is-active,
.help-topic-link.is-active {
  background: #890000 !important;
  color: #ffffff !important;
  border-color: #890000 !important;
  box-shadow: 0 2px 4px rgba(137, 0, 0, 0.25);
}

.help-toc-box {
  margin: 1.5rem 0 2.5rem 0;
  padding: 1.25rem 1.5rem;
  background: #fefefe;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #890000;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.help-toc-box .help-toc-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.help-toc-box ol {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.8;
}

.help-toc-box li a {
  color: #890000;
  text-decoration: none;
  font-weight: 500;
}

.help-toc-box li a:hover {
  text-decoration: underline;
}

/* Help Documentation Images & Video Embedding */
.help-page-content img,
.help-doc-img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid #e2e8f0 !important;
  margin: 1.25rem 0 !important;
  display: block;
}

.help-page-content video,
.help-doc-video {
  width: 100% !important;
  max-width: 860px !important;
  height: auto !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
}

.help-video-card {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: #faf5f5;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-align: center;
}





