/* ======================================================
   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);
}

/* ======================================================
   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;
}




/* ======================================================
   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: 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;
  padding: 16px 0;
}

@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); }
}

/* ======================================================
   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,
.hipsy-event-date-pop {
  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;
}

/* 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);
}


/* ======================================================
   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: center;
}

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

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

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

.hipsy-event-desc-pop {
    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: 50px;
  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-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;
}


/* 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: #6a4bd9;
}

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

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


.hipsy-readmore-btn {
    margin-top: 10px;
    padding: 0;
    background: none;
    border: none;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.hipsy-readmore-btn:hover {
    color: #000;
}

.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);
}

/* ======================================================
   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;
}

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

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

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


/* ======================================================
   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;
}


/* ======================================================
   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;
}
