/**
 * Single event page (Figma "hotel-MTK" (typography/colours); layout from the Event Center Nashua single-event design).
 * Markup: tribe-events/single-event.php (override of The Events Calendar's single-event.php).
 *
 * The theme forces the theme's own heading/paragraph fonts; like the events block this page follows
 * the Figma typography (Open Sans / Montserrat), so those properties are re-declared with !important on our own classes.
 * To adopt the site fonts instead, change the --ewf-single-font-* variables below.
 */

/* TEC's skeleton sets this by id (max 1048px); the design runs 23px from the edges of a 1440 frame. 46px = gap under the 118px header. */
.single-tribe_events #tribe-events-pg-template {
    max-width: 1440px;
    margin: 0 auto;
    padding: 46px 23px 51px;
}

.ewf-single {
    --ewf-single-color: #103b5c;
    --ewf-single-accent: #103b5c;
    --ewf-single-accent-text: #fff;
    --ewf-single-link: #007cdb;
    --ewf-single-font-body: 'Open Sans', sans-serif;
    --ewf-single-font-title: 'Montserrat', sans-serif;
    --ewf-single-title-weight: 700;

    padding: 0;
    color: var(--ewf-single-color);
    font-family: var(--ewf-single-font-body);
    font-size: 16px;
    font-weight: 400;
}

.ewf-single *,
.ewf-single *::before,
.ewf-single *::after {
    box-sizing: border-box;
}

/* Everything that is a <p> or heading in this template: undo the theme's forced fonts */
.single-tribe_events .ewf-single .ewf-single__back,
.single-tribe_events .ewf-single .ewf-single__meta {
    max-width: none;
    margin: 0;
    font-family: var(--ewf-single-font-body) !important;
    font-size: 16px;
    font-weight: 400;
    line-height: normal !important;
    letter-spacing: 0 !important;
    color: var(--ewf-single-color);
}

/* ---- Back link ------------------------------------------------------- */

.single-tribe_events .ewf-single .ewf-single__back a {
    font-family: var(--ewf-single-font-body);
    font-size: 16px;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 16.6px;
    color: var(--ewf-single-color);
    letter-spacing: 0.64px;
    text-transform: uppercase;
    text-decoration: none;
}

.single-tribe_events .ewf-single .ewf-single__back a span {
    letter-spacing: 0.64px !important;
}

.single-tribe_events .ewf-single .ewf-single__back a:hover,
.single-tribe_events .ewf-single .ewf-single__back a:focus-visible {
    color: var(--ewf-single-accent);
    text-decoration: none;
}

.ewf-single__arrow {
    display: block;
    width: 30.9px;
    height: 28.5px;
    margin-left: -1px;
}

.ewf-single__arrow--left {
    transform: scaleX(-1);
}

/* ---- Title and meta -------------------------------------------------- */

.single-tribe_events .ewf-single .ewf-single__title {
    margin: 19px 0 0;
    padding: 0;
    color: var(--ewf-single-color);
    font-family: var(--ewf-single-font-title) !important;
    font-size: 40px;
    font-weight: var(--ewf-single-title-weight) !important;
    line-height: normal !important;
    letter-spacing: 0.3px !important;
    word-spacing: normal !important;
    text-transform: uppercase !important;
}

.single-tribe_events .ewf-single .ewf-single__meta {
    margin-top: 28px;
    line-height: 22px !important;
    letter-spacing: 1.12px !important;
    text-transform: uppercase;
}

/* ---- Image ----------------------------------------------------------- */

.tribe-events-single.ewf-single > .tribe_events > .ewf-single__image {
    width: 937px;
    max-width: 100%;
    margin: 28px 0 0;
    aspect-ratio: 937 / 477;
    overflow: hidden;
}

.ewf-single__image .tribe-events-event-image,
.ewf-single__image img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}

.ewf-single__image .tribe-events-event-image {
    float: none;
}

/* ---- Description ----------------------------------------------------- */

.single-tribe_events .ewf-single .ewf-single__content {
    max-width: 1095px;
    margin: 46px 0 0;
    padding: 0;
}

.single-tribe_events .ewf-single .ewf-single__content p {
    max-width: none;
    margin: 0 0 25px;
    font-family: var(--ewf-single-font-body) !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 25px !important;
    letter-spacing: 0 !important;
    color: var(--ewf-single-color);
}

.single-tribe_events .ewf-single .ewf-single__content p:last-child {
    margin-bottom: 0;
}

/* No featured image: the description follows the meta line at the image's own gap */
.single-tribe_events .ewf-single.ewf-single--no-image .ewf-single__content {
    margin-top: 28px;
}

/* ---- Buttons (Add to calendar, RSVP) --------------------------------- */

.ewf-single__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 47px;
    margin-top: 46px;
}

.ewf-single__actions:empty {
    display: none;
}

.ewf-single .tribe-events.tribe-common,
.ewf-single .tribe-events-c-subscribe-dropdown__container {
    position: relative;
    margin: 0;
    padding: 0;
}

.ewf-single .tribe-events-c-subscribe-dropdown {
    position: relative;
    margin: 0;
}

.ewf-single .tribe-events-c-subscribe-dropdown__button {
    display: block;
    width: 201px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 19px;
    background: var(--ewf-single-color);
    transition: background-color 0.2s ease;
}

.ewf-single .tribe-events-c-subscribe-dropdown__button:hover,
.ewf-single .tribe-events-c-subscribe-dropdown__button:focus-within {
    background: #1c5380;
}

.ewf-single .tribe-events-c-subscribe-dropdown svg {
    display: none !important;
}

.single-tribe_events .ewf-single .tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button-text {
    width: 100%;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: var(--ewf-single-font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0.64px;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
}

.ewf-single .tribe-events-c-subscribe-dropdown__button-text:focus-visible,
.ewf-single__rsvp:focus-visible,
.ewf-single__details-list a:focus-visible,
.ewf-single__nav a:focus-visible {
    outline: 2px solid var(--ewf-single-color);
    outline-offset: 3px;
}

/* The calendar choices that open under the button */
.ewf-single .tribe-events-c-subscribe-dropdown__content {
    width: max-content;
    min-width: 201px;
    z-index: 10;
    margin: 4px 0 0;
    padding: 8px 0;
    border: 1px solid var(--ewf-single-color);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.ewf-single .tribe-events-c-subscribe-dropdown__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ewf-single .tribe-events-c-subscribe-dropdown__list-item {
    margin: 0;
    padding: 0;
}

.ewf-single .tribe-events-c-subscribe-dropdown__list-item-link {
    display: block;
    padding: 8px 16px;
    color: var(--ewf-single-color);
    font-family: var(--ewf-single-font-body);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.56px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

.ewf-single .tribe-events-c-subscribe-dropdown__list-item-link:hover,
.ewf-single .tribe-events-c-subscribe-dropdown__list-item-link:focus-visible {
    background: rgba(16, 59, 92, 0.1);
    color: var(--ewf-single-color);
}

.single-tribe_events .ewf-single .ewf-single__rsvp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 136px;
    height: 38px;
    border-radius: 38px;
    background: var(--ewf-single-accent);
    color: var(--ewf-single-accent-text);
    font-family: var(--ewf-single-font-body);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.64px;
    line-height: normal;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.single-tribe_events .ewf-single .ewf-single__rsvp:hover,
.single-tribe_events .ewf-single .ewf-single__rsvp:focus-visible {
    background: #1c5380;
    color: var(--ewf-single-accent-text);
    text-decoration: none;
}

/* ---- Details --------------------------------------------------------- */

.ewf-single__details {
    max-width: 1326px;
    margin: 36px 0 0;
    padding: 35px 0;
    border-top: 1px solid var(--ewf-single-accent);
    border-bottom: 1px solid var(--ewf-single-accent);
}

.single-tribe_events .ewf-single .ewf-single__details-title {
    margin: 0 0 18px;
    color: var(--ewf-single-color);
    font-family: var(--ewf-single-font-body) !important;
    font-size: 16px;
    font-weight: 400 !important;
    line-height: 22px !important;
    letter-spacing: 1.12px !important;
    text-transform: uppercase !important;
}

.ewf-single__details-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.single-tribe_events .ewf-single .ewf-single__details-list li {
    margin: 0 0 10px;
    padding: 0;
    font-size: 16px;
    line-height: 22px;
    letter-spacing: 1.12px;
    text-transform: uppercase;
}

.single-tribe_events .ewf-single .ewf-single__details-list li:last-child {
    margin-bottom: 0;
}

.single-tribe_events .ewf-single .ewf-single__details-list li::before {
    content: none;
}

.single-tribe_events .ewf-single .ewf-single__details-list a {
    color: var(--ewf-single-link);
    font-family: var(--ewf-single-font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    letter-spacing: 1.12px;
    text-transform: none;
    text-decoration: none;
}

.single-tribe_events .ewf-single .ewf-single__details-list a:hover {
    text-decoration: underline;
}

/* ---- Previous / next event ------------------------------------------- */

.single-tribe_events .ewf-single #tribe-events-footer.ewf-single__nav {
    margin-top: 32px;
    padding: 0;
    border: 0;
}

.ewf-single__nav .tribe-events-nav-pagination {
    margin: 0;
    padding: 0;
}

.ewf-single__nav .tribe-events-sub-nav::before,
.ewf-single__nav .tribe-events-sub-nav::after {
    content: none;
    display: none;
}

.single-tribe_events .ewf-single .ewf-single__nav .tribe-events-sub-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    list-style: none;
}

.single-tribe_events .ewf-single .ewf-single__nav .tribe-events-sub-nav li {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    text-align: left;
}

.single-tribe_events .ewf-single .ewf-single__nav .tribe-events-sub-nav li::before {
    content: none;
}

.single-tribe_events .ewf-single .ewf-single__nav .tribe-events-sub-nav a {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--ewf-single-color);
    font-family: var(--ewf-single-font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0.64px;
    text-transform: uppercase;
    text-decoration: none;
}

.single-tribe_events .ewf-single .ewf-single__nav .tribe-events-nav-next a {
    font-size: 15px;
    letter-spacing: 0.6px;
}

.single-tribe_events .ewf-single .ewf-single__nav .tribe-events-sub-nav a::before,
.single-tribe_events .ewf-single .ewf-single__nav .tribe-events-sub-nav a::after {
    content: '';
    flex: none;
    width: 30.9px;
    height: 28.5px;
    background: url('../images/events/single-arrow.svg') center / contain no-repeat;
}

/* previous: arrow before the title, pointing left */
.single-tribe_events .ewf-single .ewf-single__nav .tribe-events-nav-previous a::before {
    transform: scaleX(-1);
}

.single-tribe_events .ewf-single .ewf-single__nav .tribe-events-nav-previous a::after,
.single-tribe_events .ewf-single .ewf-single__nav .tribe-events-nav-next a::before {
    content: none;
}

.single-tribe_events .ewf-single .ewf-single__nav .tribe-events-sub-nav a:hover,
.single-tribe_events .ewf-single .ewf-single__nav .tribe-events-sub-nav a:focus-visible {
    color: var(--ewf-single-accent);
}

/* ---- Small screens (no Figma frames below desktop) ------------------- */

@media (max-width: 767.98px) {
    .single-tribe_events #tribe-events-pg-template {
        padding: 32px 16px 40px;
    }

    .single-tribe_events .ewf-single .ewf-single__title {
        font-size: 28px;
    }

    .ewf-single__actions {
        gap: 24px;
    }

    .ewf-single__details {
        padding: 28px 0;
    }

    .single-tribe_events .ewf-single .ewf-single__nav .tribe-events-sub-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ewf-single * {
        transition: none !important;
    }
}
