/* ======================================================
   TANTRIC DANCE — DESIGN TOKENS
   ====================================================== */

:root {
  --td-bg: #F6EFE7;
  --td-card-bg: #FFFFFF;
  --td-primary: #7E57C2;
  --td-primary-dark: #3E2A5F;
  --td-accent: #F3C98B;
  --td-text: #3E2A5F;
  --td-muted: #7f7f7f;

  --td-link: var(--td-primary);
  --td-date: var(--td-primary);
  --td-readmore: var(--td-primary);
  --td-shadow: rgba(0,0,0,0.18);
  --td-shadow-strong: rgba(0,0,0,0.28);
  --td-spinner: var(--td-primary);
}


/* ======================================================
   TEMPLATE STYLES
   ====================================================== */


.hipsy-theme-minimal {
  --td-primary: #111;
  --td-primary-dark: #111;
  --td-text: #222;
  --td-link: #111;
  --td-date: #111;
  --td-readmore: #111;
  --td-shadow: rgba(0,0,0,0.18);
  --td-shadow-strong: rgba(0,0,0,0.28);
  --td-spinner: #111;
}

.hipsy-theme-conscious {
  --td-primary: #7E57C2;
  --td-primary-dark: #3E2A5F;
  --td-accent: #F3C98B;
  --td-shadow: rgba(126,87,194,0.22);
  --td-shadow-strong: rgba(126,87,194,0.34);
  --td-link: var(--td-primary);
  --td-date: var(--td-primary);
  --td-readmore: var(--td-primary);
  --td-spinner: var(--td-primary);
}

.hipsy-theme-red {
  --td-primary: #7b1e2b;
  --td-primary-dark: #4a0f18;
  --td-accent: #e3a1aa;
  --td-shadow: rgba(123,30,43,0.22);
  --td-shadow-strong: rgba(123,30,43,0.34);
  --td-link: var(--td-primary);
  --td-date: var(--td-primary);
  --td-readmore: var(--td-primary);
  --td-spinner: var(--td-primary);
}

.hipsy-theme-hipsy {
  /* Core surfaces */
  --td-bg: #28776d;
  --td-card-bg: #ffffff;

  /* Brand / primary */
  --td-primary: #28776d;  /* buttons, primary accents */
  --td-primary-dark: #344382; /* highlighted background (darker teal) */

  /* Links / highlights */
  --td-link: #384f39;                /* A href / highlighted text */
  --td-link-secondary: #28776d;      /* secondary link color */

  /* Text */
  --td-text: #384f39;
  --td-muted: #7f7f7f;
  --td-muted: oklch(55.1% .027 264.364);  /* gray-500 */

  /* Date + readmore should follow primary unless overridden */
  --td-date: #009c51;
  --td-readmore: #009c51;

  /* Shadows should be theme-tinted (teal) not pure black */
  --td-shadow: color-mix(in oklab, #28776d 22%, transparent);
  --td-shadow-strong: color-mix(in oklab, #28776d 34%, transparent);

  /* Spinner uses primary */
  --td-spinner: var(--td-primary);
}

.hipsy-dark {
  --td-bg: #0f0f0f;
  --td-card-bg: #1a1a1a;
  --td-text: #eaeaea;
  --td-muted: #999;
}

.hipsy-dark .hipsy-event-card {
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* ======================================================
   GRID LAYOUT
   ====================================================== */

.hipsy-events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .hipsy-events-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .hipsy-events-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1400px) {
  .hipsy-events-grid { grid-template-columns: repeat(4, 1fr); }
}


/* ======================================================
   VIEWS (grid | list | feed | card)
   ====================================================== */

/* Default (grid) is already defined above. */
.hipsy-events-grid.hipsy-view-grid {}

/* LIST: single column, no shadow, tight rows */
.hipsy-events-grid.hipsy-view-list {
  display: block;
  gap: 0;
  --td-shadow: none;
  --td-shadow-strong: none;
}

.hipsy-view-list .hipsy-event-card {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 6px 0;
  margin: 0;
  border-bottom: 1px solid rgba(0,0,0,0.10);
  transform: none !important;
  transition: background 160ms ease;
}

/* List layout: image tile + content in same row (no flex) */
.hipsy-view-list .hipsy-event-card.hipsy-has-thumb {
  display: grid;
  grid-template-columns: 72px 1fr;
  column-gap: 12px;
  align-items: start;
}
.hipsy-view-list .hipsy-event-thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--td-card-bg);
}
.hipsy-view-list .hipsy-event-thumb .hipsy-event-image-wrap {
  width: 100%;
  height: 100%;
}
.hipsy-view-list .hipsy-event-thumb .hipsy-event-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.hipsy-dark .hipsy-view-list .hipsy-event-card {
  border-bottom-color: rgba(255,255,255,0.12);
}

.hipsy-view-list .hipsy-event-card:hover {
  background: rgba(0,0,0,0.03);
}
.hipsy-dark .hipsy-view-list .hipsy-event-card:hover {
  background: rgba(255,255,255,0.05);
}

.hipsy-view-list .hipsy-event-thumb {
  max-width: 96px;
}

.hipsy-view-list .hipsy-event-head-row { display: block; }

.hipsy-view-list .hipsy-event-date {
  white-space: nowrap;
  font-size: 0.95rem;
  opacity: 0.9;
  margin-top: 2px;
}


.hipsy-view-list .hipsy-event-title {
  margin: 0;
}

/* List view: remove global location top padding */
.hipsy-view-list .hipsy-event-location {
  padding-top: 0;
}

/* FEED: date badge left + content right */
.hipsy-events-grid.hipsy-view-feed {
  display: block;
  gap: 0;
}

.hipsy-view-feed .hipsy-event-card {
  box-shadow: none;
  border-radius: 14px;
  padding: 12px;
  margin: 0 0 14px 0;
  background: var(--td-card-bg);
  transform: none !important;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.hipsy-view-feed .hipsy-event-card:hover {
  background: rgba(126,87,194,0.06);
  box-shadow: 0 10px 25px var(--td-shadow);
}


.hipsy-view-feed .hipsy-feed-col--head .hipsy-event-location {
  margin-top: 4px;
}
/* Feed layout: 3 columns on top, rest full width (no flex) */
.hipsy-view-feed .hipsy-feed-top {
  display: grid;
  grid-template-columns: 72px 56px 1fr;
  row-gap: 0;
  column-gap: 4px;
  align-items: start;
}
.hipsy-view-feed .hipsy-feed-col--image { min-width: 72px; }
.hipsy-view-feed .hipsy-feed-col--date { min-width: 56px; }
.hipsy-view-feed .hipsy-feed-col--head { text-align: left; }

.hipsy-view-feed .hipsy-event-location { text-align: left; justify-self: start; }

.hipsy-view-feed .hipsy-feed-thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--td-card-bg);
  box-shadow: 0 10px 25px var(--td-shadow);
}
.hipsy-view-feed .hipsy-feed-thumb .hipsy-event-image-wrap {
  width: 100%;
  height: 100%;
}
.hipsy-view-feed .hipsy-feed-thumb .hipsy-event-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hipsy-view-feed .hipsy-event-title--feed,
.hipsy-view-feed .hipsy-event-date--feed {
  text-align: left;
}

.hipsy-view-feed .hipsy-feed-bottom {
  margin-top: 10px;
}


.hipsy-view-feed .hipsy-feed-row {
  display: flex;
  row-gap: 0;
  column-gap: 8px;
}

.hipsy-view-feed .hipsy-feed-left {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}



.hipsy-view-feed .hipsy-feed-thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--td-card-bg);
  box-shadow: 0 10px 25px var(--td-shadow);
}

.hipsy-view-feed .hipsy-feed-thumb .hipsy-event-image-wrap {
  width: 100%;
  height: 100%;
}

.hipsy-view-feed .hipsy-feed-thumb .hipsy-event-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hipsy-view-feed .hipsy-event-title--feed {
  text-align: left;
  margin-top: 0;
}

.hipsy-view-feed .hipsy-feed-badge {
  width: 52px;
  border-radius: 14px;
  background: var(--td-card-bg);
  box-shadow: 0 10px 25px var(--td-shadow);
  text-align: center;
  padding: 10px 6px;
}

.hipsy-view-feed .hipsy-feed-day {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--td-text);
}

.hipsy-view-feed .hipsy-feed-mon {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--td-muted);
}

.hipsy-view-feed .hipsy-feed-time {
  margin-top: 4px;
  font-size: 0.75rem;
  line-height: 1.1;
  color: var(--td-muted);
}

.hipsy-view-feed .hipsy-feed-time {
  margin-top: 4px;
  font-size: 0.75rem;
  line-height: 1.1;
  color: var(--td-muted);
}

.hipsy-view-feed .hipsy-feed-right {
  flex: 1 1 auto;
  min-width: 0;
}

.hipsy-view-feed .hipsy-event-date--feed {
  margin-top: 2px;
}

/* CARD: larger cards, 1–2 columns */
.hipsy-events-grid.hipsy-view-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 900px) {
  .hipsy-events-grid.hipsy-view-card { grid-template-columns: repeat(2, 1fr); }

/* Card view: remove default shadow, add hover affordance */
.hipsy-view-card .hipsy-event-card {
  box-shadow: none;
  border: 1px solid rgba(0,0,0,0.10);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}
.hipsy-dark .hipsy-view-card .hipsy-event-card {
  border-color: rgba(255,255,255,0.12);
}
.hipsy-view-card .hipsy-event-card:hover {
  box-shadow: 0 10px 25px var(--td-shadow);
  transform: translateY(-2px);
}

}

.hipsy-view-card .hipsy-event-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.hipsy-view-card .hipsy-event-date {
  white-space: nowrap;
}



.hipsy-view-card .hipsy-card-thumb {
  border-radius: 14px;
  overflow: hidden;
  background: var(--td-card-bg);
}

.hipsy-view-card .hipsy-card-thumb .hipsy-event-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.hipsy-view-card .hipsy-card-thumb .hipsy-event-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hipsy-view-card .hipsy-event-date {
  margin-top: 4px;
}

/* ======================================================
   EVENT CARD
   ====================================================== */

.hipsy-event-card {
  background: var(--td-card-bg);
  border-radius: 14px;
  box-shadow: 0 10px 25px var(--td-shadow);
  padding: 14px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.hipsy-event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px var(--td-shadow-strong);
}

/* ======================================================
   IMAGE
   ====================================================== */

.hipsy-event-image-wrap {
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 12px;
}

.hipsy-event-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  transition: transform 0.25s ease;
}

.hipsy-event-card:hover .hipsy-event-image {
  transform: scale(1.03);
}

/* ======================================================
   TEXT CONTENT
   ====================================================== */

.hipsy-event-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--td-date);
  margin-bottom: 4px;
}

.hipsy-event-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--td-primary-dark);
  margin: 0 0 6px 0;
}

/* Ensure title link inherits the themed title color */
.hipsy-event-title a {
  color: inherit;
  text-decoration: none;
}

.hipsy-event-title a:hover {
  opacity: 0.85;
}


.hipsy-event-desc {
  font-size: 0.9rem;
  color: var(--td-text);
  line-height: 1.45;
}

.hipsy-event-location {
  font-size: 0.85rem;
  padding-top: 6px;
  margin-bottom: 8px;
  text-align: center;
}

.hipsy-event-location a {
  color: var(--td-muted) !important;
}

.hipsy-event-location a:hover {
    opacity: 0.8;
}


/* ======================================================
   UPCOMING EVENT STYLES
   ====================================================== */
   
/* ======================================================
   UPCOMING / GRID CTA BUTTON — TOKEN DRIVEN
   ====================================================== */

/* Wrapper (optional, for alignment) */
.hipsy-event-actions {
  margin-top: 12px;
  text-align: center;
}

/* The button / link itself */
.hipsy-event-actions a,
.hipsy-event-actions button {
  display: inline-block;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;

  background-color: transparent;
  color: var(--td-primary);

  border: 1px solid var(--td-primary);
  border-radius: 999px;

  text-decoration: none;
  cursor: pointer;

  transition: all 0.25s ease;
}

/* Hover */
.hipsy-event-actions a:hover,
.hipsy-event-actions button:hover {
  background-color: var(--td-primary);
  color: #fff;
  text-decoration: none;
}

/* Focus (accessibility) */
.hipsy-event-actions a:focus,
.hipsy-event-actions button:focus {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--td-primary) 20%, transparent);
}

/* ======================================================
   SPINNER
   ====================================================== */

.hipsy-popup-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.hipsy-events-spinner {
    display: flex;
    justify-content: center;
    padding: 24px;
}

.hipsy-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0,0,0,0.15);
    border-top-color: var(--td-spinner);
    border-radius: 50%;
    animation: hipsy-spin 0.8s linear infinite;
}

.hipsy-dark .hipsy-spinner {
  border-color: rgba(255,255,255,0.15);
  border-top-color: var(--td-spinner);
}


@keyframes hipsy-spin {
    to { transform: rotate(360deg); }
}

/* ======================================================
   LOAD MORE
   ====================================================== */

.hipsy-load-more {
    margin: 24px auto;
    display: block;
    padding: 10px 18px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--td-primary);
    color: var(--td-primary);
    cursor: pointer;
    font-weight: 600;
}

.hipsy-load-more:hover {
    background: var(--td-primary);
    color: #fff;
}


/* ======================================================
   UPCOMING EVENT STYLES
   ====================================================== */

.hipsy-events-grid--upcoming {
  display: block;              /* kill grid */  
  max-width: 720px;
    margin: 0 auto;
}

   .hipsy-events-grid--upcoming > .hipsy-event-card {
    width: 100%;
}

/* Upcoming event only */
.hipsy-upcoming-event {
    max-width: 640px;
    margin: 0 auto;
}

/* Cards inside upcoming event */
.hipsy-upcoming-event .hipsy-event-card {
    border-radius: 18px;
    background: #111;
}

/* Hide elements only for upcoming event */
.hipsy-upcoming-event .hipsy-event-tags {
    display: none;
}




/* ======================================================
   POPUP
   ====================================================== */

#hipsy-popup {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}

#hipsy-popup .hipsy-popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

/* Keep the PANEL fixed-size; scroll the inner area */
#hipsy-popup .hipsy-popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 720px;
  max-height: calc(100vh - 40px);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* important */
}

#hipsy-popup .hipsy-popup-inner {
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hipsy-event-date-pop {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--td-date);
  margin-bottom: 16px;
  text-align: right;
}

h2.hipsy-event-title-pop {
  padding-top: 25px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--td-primary);
  margin: 0 0 6px 0;
  text-align: left;
}

.hipsy-event-title-pop a {
  text-decoration: none;
  color: inherit;
}

.hipsy-event-title-pop a:hover {
  opacity: 0.85;
}

.hipsy-event-desc-pop {
    margin-top: -10px;
    overflow: hidden;
    transition: max-height 0.35s ease;
    font-size: 16px;
}

.hipsy-event-desc-pop.is-open {
    max-height: none !important;
}

.hipsy-event-location-pop {
  font-size: 1.2rem;
  padding-top: 20px;
  padding-bottom: 20px;
  text-align: center;
  font-weight: 600;
  display: block;
}

.hipsy-event-location-pop a {
    color: #222121 !important;
}

.hipsy-event-location-pop a:hover {
    opacity: 0.8;
}

.hipsy-event-location-pop::before {
  content: "📍";
  margin-right: 6px;
}


.hipsy-event-tags-pop {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 10px;
  margin-bottom: 10px;
}




/* ======================================================
   POPUP CONTENT STYLES
   ====================================================== */

.hipsy-popup-cover {
  width: 100%;
  margin: 0 0 12px 0;
}

.hipsy-popup-cover-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

#hipsy-popup .hipsy-popup-close {
  position: absolute;
      top: -9px;
    right: -5px;
    width: 40px;
    height: 40px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(255,255,255,.92);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
/* Layering so close button can sit "outside" panel (if DOM allows) */
#hipsy-popup .hipsy-popup-overlay { z-index: 1; }
#hipsy-popup .hipsy-popup-content { z-index: 2; }
#hipsy-popup .hipsy-popup-close   { z-index: 3; }

/* Remove duplicate intent: date pop should be defined once */
.hipsy-event-date { 
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--td-date);
  margin-bottom: 4px;
}

/* If using .hipsy-ticket-modal-panel in CSS, ensure it exists in JS markup */
#hipsy-ticket-modal .hipsy-ticket-modal-panel {
  max-height: calc(100vh - 40px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}


/* Date styling */

/* Popup header row: title left, datebox right */
#hipsy-popup .hipsy-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  row-gap: 0;
  column-gap: 8px;
  margin: 0 0 10px 0;
}

#hipsy-popup .hipsy-event-title-pop {
  margin: 0;
  line-height: 1.15;
  flex: 1;
}

/* POPUP styling */
h2.hipsy-event-title {
    font-size: 22px;
    padding-bottom: 20px;
}

.hipsy-event-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #222;
}

.hipsy-event-desc p {
    margin: 0 0 1.1em;
}

.hipsy-event-desc h3.hipsy-section {
    margin: 1.8em 0 0.6em;
    font-size: 14pt;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--td-text)
}

h3.hipsy-section {
    font-size: 1.1em;
    line-height: 1.3em;
}

.hipsy-event-desc strong {
    display: block;
    margin-top: 0.6em;
}

.hipsy-desc-full {
    margin-top: 12px;
}

/* Popup links */
.hipsy-event-popup .hipsy-event-desc-pop a,
.hipsy-event-popup .hipsy-event-desc-pop a:visited {
  color: var(--td-link);
  font-weight: 600;
}
.hipsy-event-popup .hipsy-event-desc-pop a:hover,
.hipsy-event-popup .hipsy-event-desc-pop a:focus {
  opacity: 0.85;
  text-decoration: underline;
}

/* Popup section headers */
.hipsy-event-popup .hipsy-event-desc-pop h3.hipsy-section {
  color: var(--td-link);
  padding-top: 10px;
  padding-bottom: 3px;
}

html.hipsy-no-scroll,
body.hipsy-no-scroll {
  overflow: hidden !important;
}

/* Ensure ticket modal panel scrolls internally if needed */
#hipsy-ticket-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,.65);
}

#hipsy-ticket-modal .hipsy-ticket-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(255,255,255,.92);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}


#hipsy-ticket-modal .hipsy-ticket-modal-panel {
  max-height: calc(100vh - 40px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}



/* ---------------------------------------------
   FIX LINK VISIBILITY IN HIPSY POPUP
--------------------------------------------- */


.hipsy-event-popup a,
.hipsy-event-popup a:visited,
.hipsy-event-popup h3 a {
  color: var(--td-link);
  font-weight: 600;
}

.hipsy-event-popup a:hover,
.hipsy-event-popup a:focus {
    opacity : 0.85;
    text-decoration: underline;
}



/* ======================================================
   POPUP FOOTER BUTTONS — ORGANISER PROMINENT
   ====================================================== */

/* ======================================================
   POPUP FOOTER BUTTONS — AUTO FLOW
   ====================================================== */

.hipsy-popup-footer-cols {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 12px;
}

.hipsy-popup-footer-cols button {
  padding: 14px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(180deg, #fff, #f0f0f0);
  color: #222;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 14px var(--td-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.hipsy-popup-footer-cols button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px var(--td-shadow-strong);
}

/* HIPSY EVENT PAGE — SECONDARY (same as shop) */
.hipsy-popup-open-event,
.hipsy-popup-open-shop,
.hipsy-popup-open-organiser {
  box-shadow: 0 6px 14px var(--td-shadow);
}

.hipsy-popup-open-event:hover,
.hipsy-popup-open-shop:hover,
.hipsy-popup-open-organiser:hover {
  box-shadow: 0 12px 26px var(--td-shadow-strong);
}



/* 👉 ORGANISER — PRIMARY */
.hipsy-popup-open-organiser {
    background: linear-gradient(180deg, #ffffff, #f0f0f0);
    color: #222;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* HIPSY SHOP — SECONDARY */
.hipsy-popup-open-shop {
    background: linear-gradient(180deg, #ffffff, #f0f0f0);
    color: #222;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* Hover / Focus */
.hipsy-popup-footer-cols button:hover,
.hipsy-popup-footer-cols button:focus-visible {
    transform: translateY(-3px);
}

/* ORGANISER hover */
.hipsy-popup-open-organiser:hover {
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
}

/* SHOP hover */
.hipsy-popup-open-shop:hover {
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
}

/* Active */
.hipsy-popup-footer-cols button:active {
    transform: translateY(0);
}



/* ======================================================
   POPUP: FORCE TOKEN-DRIVEN TYPOGRAPHY (LIGHT MODE)
   ====================================================== */

#hipsy-popup .hipsy-event-desc-pop,
#hipsy-popup .hipsy-event-desc,
#hipsy-popup .hipsy-event-location-pop {
  color: var(--td-text) !important;
}

#hipsy-popup .hipsy-event-location-pop a {
  color: var(--td-link) !important;
}


/* ======================================================
   POPUP TICKET CTA — BASE
   ====================================================== */

.hipsy-popup-ticket-cta {
    margin-top: 14px;
    text-align: center;
}

.hipsy-theme-minimal .hipsy-popup-show-tickets {
    background: #111;
    color: #fff;
}

.hipsy-theme-conscious .hipsy-popup-show-tickets {
    background: linear-gradient(135deg, #7E57C2, #F3C98B);
    color: #fff;
}

.hipsy-theme-red .hipsy-popup-show-tickets {
    background: #7b1e2b;
    color: #fff;
}

.hipsy-theme-hipsy .hipsy-popup-show-tickets {
  background: #28776d;
  color: oklch(95.3% .051 180.801);
}

.hipsy-theme-hipsy .hipsy-popup-show-tickets:hover {
  background: oklch(43.7% .078 188.216);
  color: #fff;
}

.hipsy-theme-custom .hipsy-popup-show-tickets {
    background: var(--td-primary);
    color: #fff;
}

.hipsy-theme-custom .hipsy-popup-show-tickets:hover {
    background: var(--td-primary-dark);
    color: #fff;
}



/* ======================================================
   LOAD MORE — TOKEN DRIVEN
   ====================================================== */

.hipsy-load-more-wrapper {
    display: flex;
    justify-content: center;
    margin: 32px 0;
}

.hipsy-load-more {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 999px;

    background: transparent;
    border: 1px solid var(--td-primary);
    color: var(--td-primary);

    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;

    cursor: pointer;
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* Hover */
.hipsy-load-more:hover {
    background: var(--td-primary);
    color: #fff;
    box-shadow: 0 8px 20px var(--td-shadow);
    transform: translateY(-2px);
}

/* Active */
.hipsy-load-more:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px var(--td-shadow);
}

/* Disabled / loading */
.hipsy-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* ======================================================
   READ MORE
   ====================================================== */

.hipsy-readmore-btn {
    margin-top: 10px;
    padding: 0;
    background: none;
    border: none;
    color: var(--td-readmore);
    opacity: 0.85;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.hipsy-readmore-btn:hover {
    opacity: 1;
}

   .hipsy-popup-read-more {
    display: inline-block;
    text-align: center;
    cursor: pointer;
    margin: 14px 0;
    font-size: 13px;
    user-select: none;
    font-size: 18px;
    width: 100%;
    text-align: center;
    color: var(--td-readmore);
    opacity: 0.85;
}

.hipsy-popup-read-more:hover {
    opacity: 1;
}

/* FORCE POPUP "READ MORE" TO USE THEME TOKEN */
#hipsy-popup .hipsy-readmore-btn,
#hipsy-popup .hipsy-popup-read-more {
  color: var(--td-readmore) !important;
}

#hipsy-popup .hipsy-readmore-btn:hover,
#hipsy-popup .hipsy-popup-read-more:hover {
  color: var(--td-readmore) !important;
  opacity: 1;
}


/* ======================================================
   FIX: POPUP TITLE + READ MORE USE THEME TOKENS
   Put this at the VERY END of the CSS file
   ====================================================== */

/* Popup title (covers both -pop and non-pop variants) */
#hipsy-popup h2.hipsy-event-title-pop,
#hipsy-popup h2.hipsy-event-title,
#hipsy-popup .hipsy-event-title-pop,
#hipsy-popup .hipsy-event-title {
  color: var(--td-primary) !important;
}

/* Read more (covers both class variants you use) */
#hipsy-popup .hipsy-popup-read-more,
#hipsy-popup .hipsy-readmore-btn {
  color: var(--td-readmore) !important;
}

/* Hover */
#hipsy-popup .hipsy-popup-read-more:hover,
#hipsy-popup .hipsy-readmore-btn:hover {
  opacity: 0.85;
  color: var(--td-readmore) !important;
}


/* ======================================================
   CANONICAL POPUP LAYOUT + TOKENS (FINAL OVERRIDES)
   ====================================================== */

/* Panel should always be token-driven */
#hipsy-popup .hipsy-popup-content {
  background: var(--td-card-bg);
  color: var(--td-text);
}

/* The inner scroll area */
#hipsy-popup .hipsy-popup-inner {
  color: var(--td-text);
}

/* Title always uses primary token */
#hipsy-popup .hipsy-event-title-pop,
#hipsy-popup h2.hipsy-event-title-pop {
  color: var(--td-primary) !important;
}

/* Read more always uses token */
#hipsy-popup .hipsy-popup-read-more,
#hipsy-popup .hipsy-readmore-btn {
  color: var(--td-readmore) !important;
}

/* Popup links always use token */
#hipsy-popup .hipsy-event-desc-pop a,
#hipsy-popup .hipsy-event-desc-pop a:visited {
  color: var(--td-link) !important;
}

/* ======================================================
   HEADER ROW USED BY YOUR PHP MARKUP (.hipsy-popup-title-row)
   ====================================================== */

#hipsy-popup .hipsy-popup-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}


/* ======================================================
   CANONICAL CALENDAR BOX (YOU ARE USING .hipsy-calbox)
   ====================================================== */

#hipsy-popup .hipsy-calbox {
  --hipsy-primary: var(--td-primary);
  flex: 0 0 auto;
  width: 60px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--hipsy-primary) 35%, transparent);
  background: var(--td-card-bg);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  text-align: center;
  margin-bottom: 5px;
}

#hipsy-popup .hipsy-calbox-top {
  background: var(--hipsy-primary);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
  padding: 6px 0;
}

#hipsy-popup .hipsy-calbox-day {
  color: var(--td-text);
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
}

#hipsy-popup .hipsy-calbox-time {
  color: color-mix(in srgb, var(--td-text) 85%, transparent);
  font-weight: 600;
  font-size: 12px;
  padding: 0 0 10px 0;
}

.hipsy-calrow{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.hipsy-calbox-time{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
}

.hipsy-calbox-time-end-text{
  display:block;
  margin-top:-2px;
  font-size:0.85em;
  opacity:.85;
}


/* End parts slightly smaller */
#hipsy-popup .hipsy-calbox-day-end,
#hipsy-popup .hipsy-calbox-time-end-text {
  font-size: 0.9em;
  opacity: 0.9;
}

/* MULTI-DAY: keep date on one line, time on one line */
#hipsy-popup .hipsy-calbox.hipsy-calbox-multi .hipsy-calbox-day,
#hipsy-popup .hipsy-calbox.hipsy-calbox-multi .hipsy-calbox-time {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

/* SINGLE-DAY: stack end time under start time */
#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-time-sep {
  display: none;
}

/* Hide end date on single-day */
#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-day-sep,
#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-day-end {
  display: none;
}

/* Slightly wider when multi-day */
#hipsy-popup .hipsy-calbox.hipsy-calbox-multi {
  min-width: 150px; /* tweak */
}



/* Dark mode (if you add .hipsy-dark to #hipsy-popup OR a parent) */
#hipsy-popup.hipsy-dark .hipsy-calbox {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
}
#hipsy-popup.hipsy-dark .hipsy-calbox-day,
#hipsy-popup.hipsy-dark .hipsy-calbox-time {
  color: rgba(255,255,255,.92);
}

.hipsy-popup-ticket-footer.hipsy-popup-footer-cols{
  display:flex;
  gap:10px;
  justify-content:center;
  align-items:center;
  margin-top:14px;
  flex-wrap:wrap;
}

.hipsy-popup-ticket-footer button{
  padding:10px 14px;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
}


.hipsy-popup-show-tickets.hipsy-ticketshop-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px 12px;
  border:1px solid currentColor;
  border-radius:10px;
  background:transparent;
  cursor:pointer;
}
.hipsy-ticketshop-panel{ margin-top:0px; }

.hipsy-popup-show-tickets {
    background: #fff;
    color: #000;
    width: 100%;
    border: 1px solid #747474;
    border-radius: 10px;
    font-size: 18px;
    padding: 6px 10px;
}


/* ======================================================
   CALBOX V2 — SINGLE TILE, MULTI-DAY RANGE
   Put this at the VERY END of your CSS
   ====================================================== */

/* 1) Let the tile grow when needed (multi-day wider) */
#hipsy-popup .hipsy-calbox {
  width: auto;          /* override width:60px */
  min-width: 60px;      /* keep single-day compact */
  padding: 0;           /* keep your existing look */
  text-align: center;
}

/* Keep inner padding only in the bottom area (optional) */
#hipsy-popup .hipsy-calbox-time {
  padding-bottom: 10px; /* keep your original spacing */
}

/* 2) SINGLE-DAY look (keep your "big day" style) */
#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-day {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  display: block; /* back to single-number style */
}

/* Hide end date parts on single day */
#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-day-sep,
#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-day-end {
  display: none;
}

/* Single-day time: stacked, centered */
#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-time {
  display: flex;
  flex-direction: column;
  align-items: center;   /* you said: endtime below starttime and a bit smaller */
  gap: 2px;
}
#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-time-sep {
  display: none;
}
#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-time-end-text {
  display: block;
  margin-top: -2px;
  font-size: 0.85em;
  opacity: 0.85;
}

/* 3) MULTI-DAY range: date + time inline (end smaller) */
#hipsy-popup .hipsy-calbox.hipsy-calbox-multi {
  min-width: 90px;      /* wider tile for ranges */
}

/* Multi-day date line: inline + smaller than single day */
#hipsy-popup .hipsy-calbox.hipsy-calbox-multi .hipsy-calbox-day {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  font-size: 16px;       /* smaller than 26px */
  font-weight: 800;
  line-height: 1.1;
  padding: 6px 0px;
}

/* Multi-day time line: inline + smaller end time */
#hipsy-popup .hipsy-calbox.hipsy-calbox-multi .hipsy-calbox-time {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  padding-bottom: 10px;
}

/* End parts smaller (multi and single both OK) */
#hipsy-popup .hipsy-calbox-day-end,
#hipsy-popup .hipsy-calbox-time-end-text {
  font-size: 0.88em;
  opacity: 0.9;
}
/* ======================================================
   CALBOX FINAL — SINGLE TILE, MULTI-DAY RANGE (CLEAN)
   Put this at the VERY END of your CSS
   ====================================================== */

/* Base tile: allow it to size naturally */
#hipsy-popup .hipsy-calbox{
  width: auto !important;      /* kills earlier fixed width */
  min-width: 60px;             /* single-day stays compact */
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
}

/* Reset any earlier forced layouts */
#hipsy-popup .hipsy-calbox-day,
#hipsy-popup .hipsy-calbox-time{
  line-height: inherit;
  display: block;
  white-space: normal;
}

/* -----------------------
   SINGLE DAY (compact)
   day big, end time below start time (smaller)
   ----------------------- */
#hipsy-popup .hipsy-calbox.hipsy-calbox-single{
  min-width: 60px;
}

#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-day{
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-day-sep,
#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-day-end{
  display: none;
}

#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-time{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-bottom: 10px;
}

#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-time-sep{
  display: none;
}

#hipsy-popup .hipsy-calbox.hipsy-calbox-single .hipsy-calbox-time-end-text{
  font-size: 0.85em;
  opacity: 0.85;
  margin-top: -2px;
  display: block;
}
/* ======================================================
   MULTI-DAY TILE — 90px + time in one row (FINAL)
   ====================================================== */

#hipsy-popup .hipsy-calbox.hipsy-calbox-multi{
  width: 90px;          /* fixed width as requested */
  min-width: 90px;
}

/* Date line stays one row */
#hipsy-popup .hipsy-calbox.hipsy-calbox-multi .hipsy-calbox-day{
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

/* Time line: ONE ROW: start - end */
#hipsy-popup .hipsy-calbox.hipsy-calbox-multi .hipsy-calbox-time{
  display: flex;
  flex-direction: row;   /* important */
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  padding-bottom: 10px;
}

/* Ensure the separator is visible on multi-day */
#hipsy-popup .hipsy-calbox.hipsy-calbox-multi .hipsy-calbox-time-sep{
  display: inline;
  opacity: 0.9;
}

/* End time slightly smaller (optional) */
#hipsy-popup .hipsy-calbox.hipsy-calbox-multi .hipsy-calbox-time-end-text{
  font-size: 0.9em;
  opacity: 0.9;
}

/* ======================================================
   FIX: month bar stays inside rounded border (FINAL)
   ====================================================== */

/* Parent tile must clip its children */
#hipsy-popup .hipsy-calbox{
  border-radius: 12px;
  overflow: hidden;            /* <- key: clips the top bar */
  background: var(--td-card-bg);
}

/* Ensure header spans exactly the inner width */
#hipsy-popup .hipsy-calbox .hipsy-calbox-top{
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  margin: 0;                   /* no stray margins */
  box-sizing: border-box;

  background: var(--td-primary);
  color: #fff;

  padding: 4px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.2;
  border-radius: 0;            /* let parent clipping handle corners */
}

/* ======================================================
   MOBILE Poppup Fixes
   ====================================================== */

#hipsy-popup .hipsy-popup-overlay{
  pointer-events: auto;
}


  @media (max-width: 640px) { 
    #hipsy-popup .hipsy-popup-inner {padding: 0px;}
    .hipsy-calrow {margin-right: 10px;}
    .hipsy-popup-title-row {gap: 0px;}
    .hipsy-popup-cover-img {padding-top:14px;}
    .hipsy-popup-title-row {padding-left: 14px;}
    .hipsy-event-desc-pop, .hipsy-event-location-pop {padding: 0px 14px;}
    .hipsy-theme-red .hipsy-popup-show-tickets {width: 92%; margin-left: 14px;}
    .hipsy-popup-footer-cols {padding-bottom: 20px;}
  h2.hipsy-event-title-pop {padding-top: 10px; padding-bottom: 20px;}
}