/**
 * The Events Calendar Plugin Override Styling
 * Version: 1.1.1
 */

/* ===================================
   TYPOGRAPHY OVERRIDES
   =================================== */

/* Headings - Oilvare Base Rough font */
.tribe-events h1,
.tribe-events h2,
.tribe-events h3,
.tribe-events h4,
.tribe-events h5,
.tribe-events h6,
.tribe-events-header h1,
.tribe-events-header h2,
.tribe-events-header h3,
.tribe-events-calendar-list__month-separator h3,
.tribe-events-c-top-bar__datepicker-time,
.tribe-events-c-nav__prev-label,
.tribe-events-c-nav__next-label,
.tribe-events-single-event-title,
.tribe-events-single-section-title {
    font-family: var(--wp--preset--font-family--oilvare-base-rough) !important;
    color: var(--wp--preset--color--contrast) !important;
}

/* Body text - Helvetica font */
.tribe-events,
.tribe-events p,
.tribe-events-calendar-list__event-datetime-wrapper,
.tribe-events-calendar-list__event-venue,
.tribe-events-calendar-list__event-description,
.tribe-events-c-search__input,
.tribe-common-c-btn,
.tribe-events-c-subscribe-dropdown__button-text,
.tribe-events-c-view-selector__button-text,
.tribe-events-c-view-selector__list-item-text,
.tribe-events-single-event-description,
.tribe-events-content,
.tribe-events-schedule,
.tribe-events-meta-list,
.tribe-events-address,
.tribe-common .tribe-common-b2,
.tribe-events-back a,
.tribe-events-nav-pagination a {
    font-family: var(--wp--preset--font-family--helvetica) !important;
}

/* ===================================
   DATE TAG STYLING (like upcoming-events)
   =================================== */

.tribe-events-calendar-list__event-date-tag {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 80px !important;
    min-width: 80px !important;
    height: 80px !important;
    background: var(--wp--preset--color--contrast) !important;
    color: white !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    align-self: flex-start !important;
    margin-left: 1.5rem !important;
    margin-right: 1.5rem !important;
}

/* Override the time element height */
.tribe-events-calendar-list__event-date-tag-datetime {
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Make event article/wrapper take full width */
.tribe-events-calendar-list__event-wrapper,
.tribe-events-calendar-list__event {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 !important;
}

.tribe-events-calendar-list__event-date-tag-weekday {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
    margin-bottom: 4px !important;
    color: white !important;
    font-family: var(--wp--preset--font-family--helvetica) !important;
}

.tribe-events-calendar-list__event-date-tag-daynum {
    font-size: 2rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: white !important;
    font-family: var(--wp--preset--font-family--helvetica) !important;
}

/* ===================================
   BUTTON STYLING
   =================================== */

/* Find Events button */
.tribe-events-c-search__button {
    background-color: var(--wp--preset--color--accent-2) !important;
    border-radius: 10px !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    font-family: var(--wp--preset--font-family--helvetica) !important;
    font-weight: 600 !important;
    transition: opacity 0.2s ease !important;
}

.tribe-events-c-search__button:hover {
    opacity: 0.9 !important;
}

/* Subscribe to Calendar button/dropdown */
.tribe-events-c-subscribe-dropdown__button,
.tribe-common-c-btn-border {
    background-color: transparent !important;
    border-radius: 10px !important;
    color: var(--wp--preset--color--accent-2) !important;
    border: 2px solid var(--wp--preset--color--accent-2) !important;
    padding: 0.75rem 1.5rem !important;
    font-family: var(--wp--preset--font-family--helvetica) !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.tribe-events-c-subscribe-dropdown__button:hover,
.tribe-common-c-btn-border:hover {
    background-color: var(--wp--preset--color--accent-2) !important;
    color: white !important;
}

.tribe-events-c-subscribe-dropdown__button:hover .tribe-events-c-subscribe-dropdown__button-text {
    color: white !important;
}

.tribe-events-c-subscribe-dropdown__button:hover .tribe-events-c-subscribe-dropdown__button-icon path {
    fill: white !important;
}

.tribe-events-c-subscribe-dropdown__button-text {
    color: var(--wp--preset--color--accent-2) !important;
    transition: color 0.2s ease !important;
}

.tribe-events-c-subscribe-dropdown__button-icon path {
    fill: var(--wp--preset--color--accent-2) !important;
    transition: fill 0.2s ease !important;
}

/* Today button in navigation */
.tribe-events-c-nav__today,
.tribe-events-c-top-bar__today-button {
    background-color: var(--wp--preset--color--accent-4) !important;
    border-radius: 10px !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    font-family: var(--wp--preset--font-family--helvetica) !important;
    font-weight: 600 !important;
    transition: opacity 0.2s ease !important;
}

.tribe-events-c-nav__today:hover,
.tribe-events-c-top-bar__today-button:hover {
    opacity: 0.9 !important;
}

/* ===================================
   ADDITIONAL REFINEMENTS
   =================================== */

/* Event titles - Oilvare font */
.tribe-events-calendar-list__event-title,
.tribe-events-calendar-list__event-title-link {
    font-family: var(--wp--preset--font-family--oilvare-base-rough) !important;
    color: var(--wp--preset--color--contrast) !important;
    transition: color 0.2s ease !important;
}

.tribe-events-calendar-list__event-title-link:hover {
    color: var(--wp--preset--color--accent-2) !important;
}

.tribe-events-calendar-list__event-row[data-event-source="community"] .tribe-events-calendar-list__event-title-link:hover {
    color: #5f84dd !important;
}

/* Thin separator lines between events in list view */
.tribe-events-calendar-list__event-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding-bottom: 1.5rem !important;
}

/* Month separator styling */
.tribe-events-calendar-list__month-separator-text {
    font-family: var(--wp--preset--font-family--oilvare-base-rough) !important;
    color: var(--wp--preset--color--contrast) !important;
}

/* ===================================
   MONTH VIEW OVERRIDES
   =================================== */

/* Day numbers in Oilvare font */
.tribe-events-calendar-month__day-date,
.tribe-events-calendar-month__day-date-link,
.tribe-events-calendar-month__day-date-daynum {
    font-family: var(--wp--preset--font-family--oilvare-base-rough) !important;
}

/* Color dot indicator for event source in month calendar cells */
.tribe-events-calendar-month__calendar-event[data-event-source="leadmaine"] .tribe-events-calendar-month__calendar-event-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--wp--preset--color--accent-2, #c53030);
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

.tribe-events-calendar-month__calendar-event[data-event-source="community"] .tribe-events-calendar-month__calendar-event-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5f84dd;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Multiday event bar color by source */
.tribe-events-calendar-month__multiday-event[data-event-source="leadmaine"] .tribe-events-calendar-month__multiday-event-bar-inner {
    background: var(--wp--preset--color--accent-2, #c53030) !important;
}

.tribe-events-calendar-month__multiday-event[data-event-source="community"] .tribe-events-calendar-month__multiday-event-bar-inner {
    background: #5f84dd !important;
}

/* ===================================
   DAY VIEW OVERRIDES
   =================================== */

/* Day view event titles in Oilvare font */
.tribe-events-calendar-day__event-title,
.tribe-events-calendar-day__event-title-link {
    font-family: var(--wp--preset--font-family--oilvare-base-rough) !important;
    color: var(--wp--preset--color--contrast) !important;
    transition: color 0.2s ease !important;
}

.tribe-events-calendar-day__event-title-link:hover {
    color: var(--wp--preset--color--accent-2) !important;
}

.tribe-events-calendar-day__event[data-event-source="community"] .tribe-events-calendar-day__event-title-link:hover {
    color: #5f84dd !important;
}

/* View selector buttons */
.tribe-events-c-view-selector__button {
    font-family: var(--wp--preset--font-family--helvetica) !important;
}

/* Search input */
.tribe-events-c-search__input {
    border-radius: 8px !important;
    font-family: var(--wp--preset--font-family--helvetica) !important;
}

/* Navigation buttons (prev/next) */
.tribe-events-c-nav__prev,
.tribe-events-c-nav__next {
    font-family: var(--wp--preset--font-family--helvetica) !important;
    transition: color 0.2s ease !important;
}

.tribe-events-c-nav__prev:hover:not(:disabled),
.tribe-events-c-nav__next:hover:not(:disabled) {
    color: var(--wp--preset--color--accent-2) !important;
}

/* Subscribe dropdown list items */
.tribe-events-c-subscribe-dropdown__list-item-link {
    font-family: var(--wp--preset--font-family--helvetica) !important;
}

/* ===================================
   RSVP STYLING
   =================================== */

/* Make RSVP wrapper full width */
.tribe-tickets__rsvp-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

/* Hide RSVP details wrapper */
.tribe-tickets__rsvp-details-wrapper {
    display: none !important;
}

/* Make actions wrapper full width when details are hidden */
.tribe-tickets__rsvp-actions-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

/* RSVP Going button - accent-2 background */
.tribe-tickets__rsvp-actions-button-going,
.tribe-common-c-btn.tribe-tickets__rsvp-form-button {
    background-color: var(--wp--preset--color--accent-2) !important;
    border-radius: 10px !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    font-family: var(--wp--preset--font-family--helvetica) !important;
    font-weight: 600 !important;
    transition: opacity 0.2s ease !important;
}

.tribe-tickets__rsvp-actions-button-going:hover,
.tribe-common-c-btn.tribe-tickets__rsvp-form-button:hover {
    opacity: 0.9 !important;
}

/* Can't go button styling */
.tribe-tickets__rsvp-actions-button-not-going {
    font-family: var(--wp--preset--font-family--helvetica) !important;
}

/* ===================================
   GOOGLE MAP STYLING
   =================================== */

/* Make map container full width */
.tribe-events-meta-group-gmap {
    width: 100% !important;
    max-width: 100% !important;
    grid-column: 1 / -1 !important;
}

/* Make map iframe taller */
.tribe-events-venue-map iframe {
    height: 500px !important;
}

#tribe-events-pg-template {
    padding-left: 0px !important;
    padding-right: 0px !important;
}

/* ===================================
   EVENT CONTENT IMAGE SIZING
   =================================== */

/* Prevent images from being cut off by inline dimensions */
.tribe-events-single-event-description img,
.tribe-events-content img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
    max-height: 600px !important;
    object-fit: contain !important;
}

#tribe-events-footer {
    display: none !important;
}

#tribe-events-c-small-cta__price, #tribe-events-c-small-cta__stock {
    display: none !important;
}

/* ===================================
   EVENT SOURCE BADGES (Archive List)
   =================================== */

.leadmaine-event-source-badge {
    display: inline-block;
    width: fit-content;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem !important;
    border-radius: 999px;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    font-family: var(--wp--preset--font-family--helvetica) !important;
}

.leadmaine-event-source-badge--leadmaine {
    background: var(--wp--preset--color--accent-2, #c53030);
    color: #fff;
}

.leadmaine-event-source-badge--community {
    background: #5f84dd;
    color: #fff;
}

/* Small badge variant for month view cells & tooltips */
.leadmaine-event-source-badge--small {
    font-size: var(--tec-font-size-0, 0.6rem);
    padding: 0.1rem 0.35rem !important;
    margin-bottom: 0.15rem;
    display: block;
    width: fit-content;
}

/* ===================================
   VENUE: Hide title, show location pin
   =================================== */

.tribe-events-calendar-list__event-venue-title {
    font-size: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    display: inline !important;
}

.tribe-events-calendar-list__event-venue-title::before {
    content: "\f3c5";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.85rem;
    margin-right: 0.35rem;
    color: var(--wp--preset--color--contrast, #1a1a2e);
}


/* ===================================
   SINGLE EVENT FEATURED IMAGE FIX
   =================================== */

/* Prevent featured image from being cut off */
.tribe-events-event-image,
.tribe-events-single .tribe-events-event-image {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
}

/* Override inline width/height attributes on the image */
.tribe-events-event-image img,
.tribe-events-single .tribe-events-event-image img,
.tribe-events-event-image img.wp-post-image,
.tribe-events-event-image img.attachment-full,
#tribe-events-content .tribe-events-event-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    overflow: visible !important;
    display: block !important;
    margin: 0 auto !important;
}

/* ===================================
   SINGLE EVENT RSVP BUTTON (ACF)
   =================================== */

.leadmaine-event-rsvp-button {
    margin-bottom: 1.5rem !important;
}

.leadmaine-event-rsvp-button .wp-block-button__link {
    background-color: #fff !important;
    color: var(--wp--preset--color--accent-2) !important;
    border: 2px solid var(--wp--preset--color--accent-2) !important;
    padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
}

.leadmaine-event-rsvp-button .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--accent-2) !important;
    color: #fff !important;
}

/* ===================================
   HIDE ADD TO CALENDAR & COST
   =================================== */

/* Hide Add to Calendar button/dropdown */
.tribe-events-c-subscribe-dropdown,
.tribe-events-c-subscribe-dropdown__container {
    display: none !important;
}

/* Hide Free/Cost elements */
.tribe-events-cost,
.tribe-events-event-cost,
span.tribe-events-cost,
span.tribe-events-event-cost,
.tribe-events-meta-item:has(.tribe-events-event-cost-label) {
    display: none !important;
}
