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

.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
   ====================================================== */
   
/* 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: 500;
    letter-spacing: 0.3px;

    background-color: transparent;
    color: #111;

    border: 1px solid #111;
    border-radius: 999px; /* pill shape */

    text-decoration: none;
    cursor: pointer;

    transition: all 0.25s ease;
}

/* Hover */
.hipsy-event-actions a:hover,
.hipsy-event-actions button:hover {
    background-color: #111;
    color: #fff;
}

/* Optional: focus (accessibility) */
.hipsy-event-actions a:focus,
.hipsy-event-actions button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.15);
}


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

#hipsy-popup .hipsy-popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 640px;
  max-width: 720px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

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

.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
   ====================================================== */

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



/* ---------------------------------------------
   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 {
    text-align: center;
    cursor: pointer;
    opacity: 0.85;
    margin: 14px 0;
    font-size: 13px;
    user-select: none;
    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;
}

/* ======================================================
   PATCH 6.7.1 — POPUP FOOTER COLUMNS + TICKET ICON
   ====================================================== */
.screen-reader-text,
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.hipsy-ticket-icon {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    flex: 0 0 auto;
    vertical-align: -0.18em;
    color: currentColor;
}

.hipsy-ticket-link .hipsy-ticket-icon,
.hipsy-popup-show-tickets .hipsy-ticket-icon {
    transform: none;
}

.hipsy-ticket-icon-only,
.hipsy-ticket-link:has(.hipsy-ticket-icon) {
    min-width: 44px;
    min-height: 44px;
    padding-left: 14px !important;
    padding-right: 14px !important;
    border-radius: 999px;
}

.hipsy-popup-ticket-footer.hipsy-popup-footer-cols {
    margin-top: 18px;
}

.hipsy-popup-footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
    width: 100%;
}

.hipsy-popup-footer-cols button {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
}

.hipsy-popup-footer-cols button:focus-visible {
    outline: 2px solid var(--td-link);
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .hipsy-popup-footer-cols {
        grid-template-columns: 1fr;
    }

    .hipsy-popup-footer-cols button {
        min-height: 46px;
    }
}

/* ======================================================
   SHORTCODE VIEWS: grid | list | feed | card | map
   ====================================================== */

.hipsy-events-grid.hipsy-view-grid {
  grid-template-columns: repeat(var(--hipsy-columns, 1), minmax(0, 1fr));
}

.hipsy-events-grid > .hipsy-event-card,
.hipsy-events-grid .hipsy-list-item,
.hipsy-events-grid .hipsy-feed-item {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box;
  justify-self: stretch !important;
}

.hipsy-events-grid .hipsy-event-title,
.hipsy-events-grid .hipsy-event-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

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

@media (min-width: 1024px) {
  .hipsy-events-grid.hipsy-view-grid {
    grid-template-columns: repeat(var(--hipsy-columns, 3), minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .hipsy-events-grid.hipsy-view-grid {
    grid-template-columns: repeat(var(--hipsy-columns, 4), minmax(0, 1fr));
  }
}

.hipsy-events-grid.hipsy-view-list {
  display: grid !important;
  grid-template-columns: repeat(var(--hipsy-columns, 1), minmax(0, 1fr)) !important;
  gap: 0 24px;
  --td-shadow: none;
  --td-shadow-strong: none;
}

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

.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,
.hipsy-view-feed .hipsy-feed-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,
.hipsy-view-feed .hipsy-feed-thumb .hipsy-event-image-wrap {
  width: 100%;
  height: 100%;
  margin: 0;
}

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

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

.hipsy-view-list .hipsy-event-date,
.hipsy-view-list .hipsy-event-location {
  text-align: left;
  padding-top: 0;
}

.hipsy-events-grid.hipsy-view-feed {
  display: grid !important;
  grid-template-columns: repeat(var(--hipsy-columns, 1), minmax(0, 1fr)) !important;
  gap: 14px 24px;
}

.hipsy-view-feed .hipsy-event-card {
  box-shadow: none;
  border-radius: 14px;
  padding: 12px;
  margin: 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-top {
  display: grid;
  grid-template-columns: 72px 56px 1fr;
  column-gap: 8px;
  align-items: start;
}

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

.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;
  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-bottom {
  margin-top: 10px;
}

.hipsy-events-grid.hipsy-view-card {
  display: grid !important;
  grid-template-columns: repeat(var(--hipsy-columns, 1), minmax(0, 1fr)) !important;
  gap: 18px;
}

.hipsy-view-card .hipsy-event-card {
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: none;
}

.hipsy-view-card .hipsy-event-card:hover {
  box-shadow: 0 10px 25px var(--td-shadow);
  transform: translateY(-2px);
}

.hipsy-view-card .hipsy-card-thumb .hipsy-event-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
}

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

.hipsy-events-grid.hipsy-view-map {
  display: block !important;
  padding: 0 !important;
}

.hipsy-events-grid.hipsy-columns-1 { --hipsy-columns: 1; }
.hipsy-events-grid.hipsy-columns-2 { --hipsy-columns: 2; }
.hipsy-events-grid.hipsy-columns-3 { --hipsy-columns: 3; }
.hipsy-events-grid.hipsy-columns-4 { --hipsy-columns: 4; }
.hipsy-events-grid.hipsy-columns-5 { --hipsy-columns: 5; }
.hipsy-events-grid.hipsy-columns-6 { --hipsy-columns: 6; }

.hipsy-events-grid.hipsy-view-grid.hipsy-columns-1,
.hipsy-events-grid.hipsy-view-list.hipsy-columns-1,
.hipsy-events-grid.hipsy-view-feed.hipsy-columns-1,
.hipsy-events-grid.hipsy-view-card.hipsy-columns-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }

.hipsy-events-grid.hipsy-view-grid.hipsy-columns-2,
.hipsy-events-grid.hipsy-view-list.hipsy-columns-2,
.hipsy-events-grid.hipsy-view-feed.hipsy-columns-2,
.hipsy-events-grid.hipsy-view-card.hipsy-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

.hipsy-events-grid.hipsy-view-grid.hipsy-columns-3,
.hipsy-events-grid.hipsy-view-list.hipsy-columns-3,
.hipsy-events-grid.hipsy-view-feed.hipsy-columns-3,
.hipsy-events-grid.hipsy-view-card.hipsy-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

.hipsy-events-grid.hipsy-view-grid.hipsy-columns-4,
.hipsy-events-grid.hipsy-view-list.hipsy-columns-4,
.hipsy-events-grid.hipsy-view-feed.hipsy-columns-4,
.hipsy-events-grid.hipsy-view-card.hipsy-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

.hipsy-events-grid.hipsy-view-grid.hipsy-columns-5,
.hipsy-events-grid.hipsy-view-list.hipsy-columns-5,
.hipsy-events-grid.hipsy-view-feed.hipsy-columns-5,
.hipsy-events-grid.hipsy-view-card.hipsy-columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }

.hipsy-events-grid.hipsy-view-grid.hipsy-columns-6,
.hipsy-events-grid.hipsy-view-list.hipsy-columns-6,
.hipsy-events-grid.hipsy-view-feed.hipsy-columns-6,
.hipsy-events-grid.hipsy-view-card.hipsy-columns-6 { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }

.hipsy-events-map-shell {
  position: relative;
  width: 100%;
}

.hipsy-events-map {
  width: 100%;
  min-height: 620px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(19, 24, 35, 0.10);
  border: 1px solid rgba(35, 42, 53, 0.08);
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

.hipsy-map-empty {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: #334155;
  font-size: 16px;
  text-align: center;
}

.hipsy-map-leaflet-popup .leaflet-popup-content-wrapper {
  border-radius: 18px;
  padding: 0;
}

.hipsy-map-leaflet-popup .leaflet-popup-content {
  margin: 0;
  min-width: 260px;
}

.hipsy-map-popup-card {
  padding: 14px;
  background: #fff;
}

.hipsy-map-popup-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
  text-decoration: none;
}

.hipsy-map-popup-title:hover {
  text-decoration: underline;
}

.hipsy-map-popup-date,
.hipsy-map-popup-location-footer {
  font-size: 13px;
  color: #475569;
}

.hipsy-map-popup-location-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(100, 116, 139, 0.14);
}

.hipsy-events-grid.hipsy-align-left,
.hipsy-events-grid.hipsy-align-center,
.hipsy-events-grid.hipsy-align-right { justify-items: stretch; }

.hipsy-events-grid.hipsy-align-left .hipsy-event-card,
.hipsy-events-grid.hipsy-align-left .hipsy-event-body,
.hipsy-events-grid.hipsy-align-left .hipsy-event-actions,
.hipsy-events-grid.hipsy-align-left .hipsy-event-tags { text-align: left; justify-content: flex-start; }

.hipsy-events-grid.hipsy-align-center .hipsy-event-card,
.hipsy-events-grid.hipsy-align-center .hipsy-event-body,
.hipsy-events-grid.hipsy-align-center .hipsy-event-actions,
.hipsy-events-grid.hipsy-align-center .hipsy-event-tags { text-align: center; justify-content: center; }

.hipsy-events-grid.hipsy-align-right .hipsy-event-card,
.hipsy-events-grid.hipsy-align-right .hipsy-event-body,
.hipsy-events-grid.hipsy-align-right .hipsy-event-actions,
.hipsy-events-grid.hipsy-align-right .hipsy-event-tags { text-align: right; justify-content: flex-end; }

.hipsy-events-grid.hipsy-template-simple .hipsy-event-card {
  box-shadow: none;
  border-color: rgba(0,0,0,0.08);
}

.hipsy-view-grid.hipsy-template-simple .hipsy-event-card,
.hipsy-view-card.hipsy-template-simple .hipsy-event-card {
  background: transparent;
}

.hipsy-view-list.hipsy-template-simple .hipsy-event-card,
.hipsy-view-feed.hipsy-template-simple .hipsy-event-card {
  background: transparent;
  border-radius: 0;
}

.hipsy-events-grid.hipsy-template-compact {
  gap: 8px 16px;
}

.hipsy-events-grid.hipsy-template-compact .hipsy-event-card {
  gap: 8px;
  padding: 8px;
}

.hipsy-view-grid.hipsy-template-compact .hipsy-event-desc,
.hipsy-view-list.hipsy-template-compact .hipsy-event-desc,
.hipsy-view-feed.hipsy-template-compact .hipsy-event-desc,
.hipsy-view-card.hipsy-template-compact .hipsy-event-desc {
  display: none;
}

.hipsy-view-list.hipsy-template-compact .hipsy-event-card.hipsy-has-thumb,
.hipsy-view-feed.hipsy-template-compact .hipsy-feed-top {
  grid-template-columns: 56px 48px 1fr;
}

.hipsy-view-list.hipsy-template-compact .hipsy-event-card.hipsy-has-thumb {
  grid-template-columns: 56px 1fr;
}

.hipsy-view-list.hipsy-template-compact .hipsy-event-thumb,
.hipsy-view-feed.hipsy-template-compact .hipsy-feed-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
}

.hipsy-view-feed.hipsy-template-compact .hipsy-feed-badge {
  width: 44px;
  padding: 7px 5px;
  border-radius: 10px;
}

.hipsy-events-grid.hipsy-template-modern .hipsy-event-card {
  border-radius: 20px;
  border: 1px solid rgba(126,87,194,0.16);
}

.hipsy-view-grid.hipsy-template-modern .hipsy-event-card,
.hipsy-view-card.hipsy-template-modern .hipsy-event-card {
  box-shadow: 0 16px 38px var(--td-shadow);
}

.hipsy-view-list.hipsy-template-modern .hipsy-event-card,
.hipsy-view-feed.hipsy-template-modern .hipsy-event-card {
  background: var(--td-card-bg);
  border-bottom: 0;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 10px 25px var(--td-shadow);
}

.hipsy-view-map.hipsy-template-simple .hipsy-events-map {
  box-shadow: none;
  border-radius: 8px;
}

.hipsy-view-map.hipsy-template-compact .hipsy-events-map {
  min-height: 420px;
  border-radius: 12px;
}

.hipsy-view-map.hipsy-template-modern .hipsy-events-map {
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(19, 24, 35, 0.16);
}

@media (max-width: 640px) {
  .hipsy-events-grid.hipsy-view-grid,
  .hipsy-events-grid.hipsy-view-list,
  .hipsy-events-grid.hipsy-view-feed,
  .hipsy-events-grid.hipsy-view-card {
    grid-template-columns: 1fr !important;
  }

  .hipsy-view-feed .hipsy-feed-top {
    grid-template-columns: 56px 1fr;
  }

  .hipsy-view-feed .hipsy-feed-col--image {
    display: none;
  }

  .hipsy-events-map {
    min-height: 480px;
    border-radius: 18px;
  }
}

/* Final shortcode layout guard: keep shortcode columns and equal card widths stable. */
.hipsy-events-grid.hipsy-view-list,
.hipsy-events-grid.hipsy-view-feed,
.hipsy-events-grid.hipsy-view-card {
  display: grid !important;
  align-items: stretch;
}

.hipsy-events-grid.hipsy-view-list.hipsy-columns-2,
.hipsy-events-grid.hipsy-view-feed.hipsy-columns-2,
.hipsy-events-grid.hipsy-view-card.hipsy-columns-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.hipsy-events-grid.hipsy-view-list.hipsy-columns-3,
.hipsy-events-grid.hipsy-view-feed.hipsy-columns-3,
.hipsy-events-grid.hipsy-view-card.hipsy-columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.hipsy-events-grid.hipsy-view-grid > .hipsy-event-card,
.hipsy-events-grid.hipsy-view-list > .hipsy-event-card,
.hipsy-events-grid.hipsy-view-feed > .hipsy-event-card,
.hipsy-events-grid.hipsy-view-card > .hipsy-event-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  justify-self: stretch !important;
}

.hipsy-view-feed .hipsy-event-date--feed {
  display: none !important;
}

@media (max-width: 640px) {
  .hipsy-events-grid.hipsy-view-list,
  .hipsy-events-grid.hipsy-view-feed,
  .hipsy-events-grid.hipsy-view-card {
    grid-template-columns: 1fr !important;
  }
}
