/* CALENDAR */

:root {
    --tec-events-header-height: 200px;
}

/* Calendar / Single Event Container width */
@media (min-width: 48em) {
    .tribe-events-page-template #content .wrap {
        max-width: 118rem;
    }
}

/* Reduce top padding of calendar container */
section.tribe-common-l-container.tribe-events-l-container {
    padding-top: 1.5rem !important;
}

/* Page heading */
.events-heading.custom-events-heading {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

/* Search button */
.tribe-common-c-btn.tribe-events-c-search__button {
    background-color: #FFF !important;
    border: 2px solid #3D547B !important;
    color: #3D547B !important;
    margin-right: 0.75rem !important;
    padding: 0.5rem 3.75rem !important;
    text-transform: uppercase;
}

/* Set search bar, button, and month/list view button container height */
.tribe-common--breakpoint-medium.tribe-events .tribe-events-header--has-event-search .tribe-events-header__events-bar {
    align-items: center;
    display: flex;
    height: 4.5rem !important;
}

/* List and Month view buttons container height */
.tribe-events .tribe-events-c-events-bar__views {
    height: 100% !important;
}

/* Nav arrow placement */
article ul, .content-area ul.tribe-events-c-top-bar__nav-list {
    margin: 0 !important;
}

/* Remove nav arrow margin */
.tribe-events .tribe-events-c-top-bar__nav-list-item {
    margin: 0;
}

/* Remove margin from month dropdown to better align the row of items */
button.tribe-common-c-btn__clear.tribe-common-h3.tribe-common-h--alt.tribe-events-c-top-bar__datepicker-button {
    margin: 0;
}

/* Highlight selected day */
.tribe-events .tribe-events-calendar-month__day-cell--selected,
.tribe-events .tribe-events-calendar-month__day-cell--selected:hover,
.tribe-events .tribe-events-calendar-month__day-cell--selected:active,
.tribe-events .tribe-events-calendar-month__day-cell--selected:focus {
    background-color: #3D547B;
    color: #FFF;
}

/* Adjust margin and padding on List and Month links */
.tribe-events-c-view-selector__list-item.tribe-events-c-view-selector__list-item--list,
.tribe-events-c-view-selector__list-item.tribe-events-c-view-selector__list-item--month {
    margin-bottom: 0;
    padding: 1rem 0;
}

.content-area ul.tribe-events-c-view-selector__list {
    margin: 0 !important;
}

li.tribe-events-c-view-selector__list-item.tribe-events-c-view-selector__list-item--month.tribe-events-c-view-selector__list-item--active,
li.tribe-events-c-view-selector__list-item.tribe-events-c-view-selector__list-item--list.tribe-events-c-view-selector__list-item--active,
li.tribe-events-c-view-selector__list-item.tribe-events-c-view-selector__list-item--month,
li.tribe-events-c-view-selector__list-item.tribe-events-c-view-selector__list-item--list {
    padding: 0;
}

/* Change color of year in datepicker */
.tribe-events .datepicker .datepicker-switch,
.tribe-events .datepicker .datepicker-switch:hover,
.tribe-events .datepicker .datepicker-switch:focus,
.tribe-events .datepicker .datepicker-switch:active {
    background-color: #3D547B;
    color: #FFF !important;
    font-weight: 600;
    padding: 1.2rem 0 !important;
}

/* Change background of selected month in datepicker */
.tribe-events .datepicker .month.active, 
.tribe-events .datepicker .month.focused, 
.tribe-events .datepicker .month.active.focused,
.tribe-events .datepicker .year.active, 
.tribe-events .datepicker .year.focused, 
.tribe-events .datepicker .year.active.focused {
    color: #FFF;
    background-color: #3D547B;
}

/* Change background of current month and year in datepicker */
.tribe-events .datepicker .month.current,
.tribe-events .datepicker .year.current  {
    color: #FFF;
    background-color: #3D547B99;
}

/* Align previous and next month buttons underneath calendar on mobile */
.tribe-common ul.tribe-events-c-nav__list {
    margin-left: 0 !important;
}

/* Hide Sat/Sun in month view */
.tribe-events-view--month .tribe-events-calendar-month__header-column:nth-child(6),
.tribe-events-view--month .tribe-events-calendar-month__header-column:nth-child(7),
.tribe-events-view--month .tribe-events-calendar-month__day:nth-child(6),
.tribe-events-view--month .tribe-events-calendar-month__day:nth-child(7) {
    display: none !important;
}

/* Reset header and calendar body to a 5 column grid */
.tribe-events-view--month .tribe-events-calendar-month__header,
.tribe-events-view--month .tribe-events-calendar-month__header tr,
.tribe-events-view--month .tribe-events-calendar-month__week {
    grid-template-columns: repeat(5, 1fr) !important;
    padding-left: 0;
    padding-right: 0;
}

/* Set single event block in mobile month view */
.post-type-archive-tribe_events .type-tribe_events {
    padding: 2rem 1rem;
}

/* Make sure header columns match calendar body columns */
.tribe-events-view--month .tribe-events-calendar-month__header-column {
    grid-column: auto / span 1 !important;
}

/* Reset widths so the grid itself controls sizing */
.tribe-events-view--month .tribe-events-calendar-month__header-column,
.tribe-events-view--month .tribe-events-calendar-month__day {
    width: auto !important;
}

/* Position M T W TH F labels */
.tribe-events-calendar-month__header tr {
    justify-items: center !important;
    align-items: center !important;
    padding: 1rem 0.5rem;
}

/* Remove bottom padding from header columns so that day labels sit in the center of the cell */
.tribe-events-calendar-month__header-column {
    padding-bottom: 0 !important;
}

/* Day label font properties */
.tribe-events-calendar-month__header-column-title span {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

/* Add padding above dates on mobile */
.tribe-common .tribe-common-h--alt {
    margin-top: 0.5rem;
}

/* Adjust positioning of footer elements (prev, next, and subscribe button */
.content-area ul.tribe-events-sub-nav {
    margin-left: 0 !important;
}

div.tribe-common-c-btn-border.tribe-events-c-subscribe-dropdown__button {
    border: 1px solid #3D547B;
    color: #3D547B;
}

.tribe-events .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button:hover {
    background-color: #3D547B;
    color: #FFF;
}

/* Adjust subscribe button dropdown positioning */
.tribe-events .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__list {
    padding: 0;
}

/* Hide overflow on list view */
div.tribe-events-calendar-list {
    overflow: hidden;
}

/* SINGLE EVENT */

/* Expand overall template area */
#tribe-events-pg-template {
    max-width: 80rem;
}

/* Hide random border spanning entire screen */
.tribe-events-single-section.tribe-events-event-meta.primary.tribe-clearfix::before {
    display: none;
}

/* Stretch event details out further along the x-axis */
.tribe-events-meta-group.tribe-events-meta-group-details {
    width: 100%;
}

/* Event heading */
.tribe-events-single-event-title {
    color: #000;
    font-weight: 800;
}

/* Event detail text */
.tribe-events-meta-group.tribe-events-meta-group-details dd {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tribe-events-abbr.tribe-events-start-date {
    border: none;
    text-decoration: none;
}

/* Top space above calendar links */
.tribe-events-cal-links {
    margin-top: 2rem;
}

/* Space between calendar buttons */
.tribe-events-cal-links .tribe-events-button:first-child {
    margin-right: 1.25rem;
}

/* Calendar buttons */
.tribe-events-gcal.tribe-events-button,
.tribe-events-ical.tribe-events-button {
    padding: 0 !important;
    border: none;
    background: transparent;
    color: #00467F !important;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    text-transform: none !important;
    letter-spacing: normal;
}

/* Make Presenter and Location live on separate lines */
div.tribe-events-single-event-description.tribe-events-content > div.tribe-events-single-section.tribe-events-event-meta.primary.tribe-clearfix {
    flex-direction: column !important;
    justify-content: space-between;
}

/* Presenter block padding */
.event-detail-block.event-presenter {
    padding-bottom: 0 !important;
}

/* Change color of Presenters heading */
.event-detail-block.event-presenter h4,
.tribe-events-meta-group.tribe-events-meta-group-venue h4 {
    color: #00467E;
}

/* Location block */
.tribe-events-meta-group.tribe-events-meta-group-venue {
    display: block;
}

.tribe-events-meta-group.tribe-events-meta-group-venue dl {
    margin: 0;
}

.tribe-events-meta-group {
    flex: none;
}

/* Add padding around bottom resource rows */
.resource-coverage-type,
.resource-related {
    padding: 0.75rem 0;
}

/* Position previous and next links */
.tribe-events-nav-previous {
    display: flex;
    flex-direction: column;
}

.tribe-events-nav-next {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
}