/* ==========================================================================
   1. FORCE THE MONTH GRID INTO A STANDARD VERTICAL CARD FEED
   ========================================================================== */
/* gap (not margin) carries the spacing between day cells and between week
   rows — margin-bottom on the last event card of a <td> isn't reliably
   reflected in that <td>'s height once it's a flex item, so cards that end
   a week row could end up flush against the next week's first card.

   NOTE: the real <tbody> renders with an empty class attribute (class=""),
   not ".tribe-events-calendar-month__body" — that class never actually
   existed on it, so it was never turned into a flex column and the <tr>
   week-rows inside it stayed in native table layout, where margin/gap has
   no effect on table rows at all. Target the real element directly instead. */
.tribe-events-calendar-month,
.tribe-events-calendar-month tbody,
.tribe-events-calendar-month__week {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 24px !important;
}

/* Hide the Mon-Sun header labels cleanly */
.tribe-events-calendar-month__header,
thead.tribe-events-calendar-month__header {
    display: none !important;
}

/* Guarantee TEC's screen-reader-only accessibility markup stays truly
   off-screen even if TEC's own core CSS bundle isn't loaded in this
   context (e.g. the calendar embed iframe) — prevents it contributing
   to layout width/height. */
.tribe-events-calendar-month__multiday-event-hidden,
.tribe-common-a11y-visual-hide {
    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;
}

/* Hide entire week rows with zero events too — otherwise an empty week
   (all its day cells hidden individually) still sits in the tbody's flex
   column as an invisible flex item, consuming an extra `gap` on each side
   of it and doubling the visual spacing around that empty week. */
.tribe-events-calendar-month__week:not(:has(.tribe-events-calendar-month__calendar-event)) {
    display: none !important;
}

/* Hide days without active events listed */
.tec-list-day:not(:has(.tribe-events-calendar-month__calendar-event)) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    border: none !important;
    margin: 0 !important;
}

/* The day cell is now just a plain layout wrapper — the white card lives on
   each individual event instead, so multiple events sharing a day still get
   their own separate cards. */
.tec-list-day {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: auto !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

/* Neutralize the inner day-cell wrapper too — it carries its own default
   white-box styling from TEC core CSS, which was previously masked by the
   old white box on .tec-list-day sitting right on top of it. */
.tribe-events-calendar-month__day-cell--desktop {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* ==========================================================================
   2. THE CURE: STRIP ALL TIMED EVENT PILL CONTAINERS, GIVE EACH EVENT ITS
      OWN INDEPENDENT WHITE CARD
   ========================================================================== */

/* Neutral pass-through wrapper (single-day events only wrap in this div) */
.calendar-list-event {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Each event card — single-day and multi-day alike — gets its own white module.
   No margin here: cross-day/cross-week spacing comes from the flex `gap`
   above. When two events share a single day cell, the sibling rule below
   adds the gap between them instead. */
.tribe-events-calendar-month__calendar-event,
.tribe-events-calendar-month__day--past .tribe-events-calendar-month__calendar-event {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
    margin: 0 !important;
    transform: none !important;
}

/* Multiple events sharing the same day cell: space the later one(s) away
   from the one before, regardless of whether either is wrapped in the
   single-day ".calendar-list-event" div or is a bare multiday/all-day article. */
.calendar-list-event ~ .calendar-list-event,
.calendar-list-event ~ .tribe-events-calendar-month__calendar-event,
.tribe-events-calendar-month__calendar-event ~ .calendar-list-event,
.tribe-events-calendar-month__calendar-event ~ .tribe-events-calendar-month__calendar-event {
    margin-top: 24px !important;
}

/* Force inner details content blocks to clear backgrounds and display as a block line */
.tribe-events-calendar-month__calendar-event-details,
.tribe-events-calendar-month__calendar-event-link {
    display: block !important;
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 !important;
    width: 100% !important;
}

/* ==========================================================================
   3. UNIFY BOTH EVENT TYPE TITLES AND METADATA TEXTS
   ========================================================================== */

/* Targets the movie text links for both formats uniformly */
.tribe-events-calendar-month__calendar-event-title,
.tribe-events-calendar-month__calendar-event-title a,
.tribe-events-calendar-month__calendar-event-link,
.tribe-events-calendar-month__calendar-event-title-link {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #0f172a !important; /* Beautiful deep slate color */
    text-decoration: none !important;
    display: block !important;
    line-height: 1.3 !important;
    margin-top: 4px !important;
}

/* Normalizes scheduling strings below titles uniformly */
.tribe-events-calendar-month__calendar-event-datetime,
.tribe-events-calendar-month__calendar-event-meta,
.tribe-common-b2--bold {
    font-size: 0.9rem !important;
    color: #64748b !important; /* Elegant slate gray text format */
    font-weight: 600 !important;
    display: block !important;
    margin-bottom: 2px !important;
}

/* ==========================================================================
   4. KILL THE HOVER ACTIONS & POPUP INTERFERENCES
   ========================================================================== */
.tribe-events-calendar-month__calendar-event:hover {
    background: #ffffff !important;
    transform: none !important;
}

/* "Ver más" button: keep white text on hover, just darken the background
   instead of the default white-bg/black-text hover it was inheriting. */
.ver-mas-boton:hover {
    background: #464646 !important;
    color: #ffffff !important;
}

.tribe-events-calendar-month__calendar-event-tooltip,
.tribe-events-tooltip,
[role="tooltip"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}
/* Próximos eventos (mobile): hide TEC's built-in mobile day list, which
   duplicates the event cards, and centre the Histórico de eventos button.
   Added 2026-11-13. */
.tribe-events-calendar-month-mobile-events,
.tribe-events-header__messages--mobile {
    display: none !important;
}
.tribe-events-c-top-bar__datepicker .custom-history-wrapper {
    display: flex;
    justify-content: center;
}
