/* ==========================================================================
   MCS Events page
   Every selector is namespaced .mcs-ev-* so this file cannot affect any
   other page even though cMaster.tpl loads it site-wide.
   ========================================================================== */

/* jQuery UI reparents dialogs to <body>, outside .mcs-ev-scope, so the tokens
   are declared on the dialog root as well. */
.mcs-ev-scope,
.mcs-ev-dialog {
    --ev-bg:      #F5EFE5;
    --ev-card:    #FFFDFA;
    --ev-ink:     #2E1B14;
    --ev-dark:    #4A2822;
    --ev-accent:  #C05A2A;
    --ev-muted:   #8A7059;
    --ev-line:    #E6DCCC;
    --ev-chip:    #EFE6D8;

    --ev-r-lg: 18px;
    --ev-r-md: 14px;
    --ev-r-sm: 10px;

    /* Lato-Bold/Regular are the site's own @font-face families (main.css).
       Each face is declared font-weight:normal, so display text asks for 400
       and lets the bold face do the work — requesting 700 would smear it
       with a synthetic embolden on top of an already-bold outline. */
    --ev-display: "Lato-Bold", "Lato-Regular", Helvetica, Arial, sans-serif;
    --ev-sans:    "Lato-Regular", Helvetica, Arial, sans-serif;

    font-family: var(--ev-sans);
    color: var(--ev-ink);
    -webkit-font-smoothing: antialiased;
}

.mcs-ev-scope {
    background: var(--ev-bg);
    padding-bottom: 80px;
}

.mcs-ev-scope *,
.mcs-ev-scope *:before,
.mcs-ev-scope *:after { box-sizing: border-box; }

.mcs-ev-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- hero ---------------------------------------------------------- */

/* The nav is position:fixed, so the first section has to clear it. The 132px
   here is only a pre-paint fallback: mcsFitHero() in events.page measures the
   real navbar and overwrites it, because the bar grows a second row when a
   user is signed in. */
.mcs-ev-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    padding: 132px 0 0;
}

.mcs-ev-hero-copy { flex: 1 1 auto; min-width: 0; }

.mcs-ev-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--ev-accent);
    margin: 0 0 14px;
}

.mcs-ev-h1 {
    font-family: var(--ev-display);
    font-size: 44px;
    line-height: 1.15;
    font-weight: normal;
    color: var(--ev-ink);
    margin: 0 0 16px;
    letter-spacing: -0.2px;
    max-width: 17em;
}

.mcs-ev-lede {
    font-size: 16px;
    line-height: 1.6;
    color: var(--ev-muted);
    margin: 0;
    max-width: 46em;
}

/* main.css gives every hr width:50%; left:25%; position:relative plus a
   gradient background, which renders this as a short floating dash. */
.mcs-ev-scope hr.mcs-ev-rule {
    width: 100%;
    left: 0;
    position: static;
    height: 1px;
    background: var(--ev-line);
    background-image: none;
    border: 0;
    margin: 32px 0 26px;
}

/* ---------- filter bar ---------------------------------------------------- */

.mcs-ev-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.mcs-ev-searchwrap {
    position: relative;
    flex: 1 1 320px;
    min-width: 240px;
}

.mcs-ev-searchwrap .fa {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ev-muted);
    font-size: 14px;
    pointer-events: none;
}

.mcs-ev-scope input.mcs-ev-search,
.mcs-ev-scope select.mcs-ev-select {
    height: 46px;
    border: 1px solid var(--ev-line);
    background: #fff;
    border-radius: 999px;
    font-size: 15px;
    color: var(--ev-ink);
    font-family: var(--ev-sans);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.mcs-ev-scope input.mcs-ev-search {
    width: 100%;
    padding: 0 20px 0 44px;
}

.mcs-ev-scope select.mcs-ev-select {
    padding: 0 38px 0 18px;
    min-width: 172px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%238A7059' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.mcs-ev-scope input.mcs-ev-search:focus,
.mcs-ev-scope select.mcs-ev-select:focus {
    border-color: var(--ev-accent);
    box-shadow: 0 0 0 3px rgba(192, 90, 42, .12);
}

.mcs-ev-scope input.mcs-ev-search::placeholder { color: #A89684; }

/* Keys (css/keys.css) a size down from the main buttons; next to one (Search) they take the main size with --lg. */
.mcs-ev-morelink {
    --pk-k: .85;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 14px;
    font-family: var(--ev-sans);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
.mcs-ev-morelink--lg {
    --pk-k: 1.1;
    min-height: 44px;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 600;
}

.mcs-ev-advanced {
    display: none;
    margin-top: 16px;
    padding: 20px 22px;
    background: rgba(255, 253, 250, .7);
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-r-md);
}
.mcs-ev-advanced.is-open { display: block; }

.mcs-ev-advgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

.mcs-ev-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--ev-muted);
    margin: 0 0 7px;
}

/* Prado renders its own controls in here; normalise them. */
.mcs-ev-field input[type="text"],
.mcs-ev-field select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-r-sm);
    background: #fff;
    font-size: 14px;
    font-family: var(--ev-sans);
    color: var(--ev-ink);
}

/* ---------- buttons ------------------------------------------------------- */

/* Every button is a key (css/keys.css): shape, colour, bevel and the press come from there. This is size and type. */
.mcs-ev-scope .mcs-ev-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 26px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--ev-sans);
    white-space: nowrap;
}

/* ---------- meta row (pin / clock / ticket / people) ---------------------- */

.mcs-ev-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 13px;
    color: var(--ev-muted);
}

.mcs-ev-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.mcs-ev-meta .fa { font-size: 12px; opacity: .8; }

/* ---------- section heading ----------------------------------------------- */

.mcs-ev-sechead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.mcs-ev-h2 {
    font-family: var(--ev-display);
    font-size: 25px;
    font-weight: normal;
    color: var(--ev-ink);
    margin: 0;
}

.mcs-ev-count { font-size: 13px; color: var(--ev-muted); }

/* ---------- upcoming grid ------------------------------------------------- */

.mcs-ev-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.mcs-ev-card {
    display: flex;
    gap: 20px;
    background: var(--ev-card);
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-r-md);
    padding: 24px;
    transition: box-shadow .18s ease, transform .18s ease;
}

.mcs-ev-card:hover {
    box-shadow: 0 14px 30px -20px rgba(46, 27, 20, .45);
    transform: translateY(-2px);
}

.mcs-ev-card-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mcs-ev-card .mcs-ev-meta { margin-bottom: 18px; }

/* ---------- empty state --------------------------------------------------- */

.mcs-ev-empty {
    grid-column: 1 / -1;
    padding: 56px 24px;
    text-align: center;
    color: var(--ev-muted);
    font-size: 15px;
    background: rgba(255, 253, 250, .6);
    border: 1px dashed var(--ev-line);
    border-radius: var(--ev-r-md);
}

/* ---------- hero CTA (top-right of the header) ---------------------------- */

.mcs-ev-cta {
    flex: 0 0 auto;
    text-align: right;
    padding-bottom: 4px;
}

.mcs-ev-cta p {
    font-size: 13px;
    color: var(--ev-muted);
    margin: 0 0 10px;
}

/* The left rail is a self-contained summary card. Without the panel the column
   ran short and left a large dead area beside the long right-hand copy. */

/* Program copy arrives as one blob of <br>-separated lines, so it needs its own
   panel to stop it reading as a wall of text under the meta grid. */

/* ---------- responsive ---------------------------------------------------- */

@media (max-width: 991px) {
    .mcs-ev-h1 { font-size: 36px; }
    .mcs-ev-grid { grid-template-columns: minmax(0, 1fr); }
    
    
    
    .mcs-ev-hero { flex-direction: column; align-items: flex-start; gap: 22px; }
    .mcs-ev-cta { text-align: left; padding-bottom: 0; }
}

@media (max-width: 767px) {
    .mcs-ev-scope { padding-bottom: 48px; }
    .mcs-ev-container { padding: 0 16px; }
    .mcs-ev-h1 { font-size: 29px; }
    
    
    .mcs-ev-card { padding: 18px; gap: 14px; }
    
    
    
    
    
    
    
}

/* #dialog-show carries no title — the event name is the body heading — so the
   bar collapses to a drag handle instead of reserving a line of empty space. */

/* jQuery UI's close control is a sprite plus the literal text "close". Hide the
   inner span outright and draw the glyph on the button itself. */

