/* ==========================================================================
   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; }

.mcs-ev-morelink {
    background: none;
    border: 0;
    padding: 0 6px;
    font-size: 14px;
    color: var(--ev-muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.mcs-ev-morelink:hover { color: var(--ev-accent); }

.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 ------------------------------------------------------- */

.mcs-ev-scope .mcs-ev-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--ev-sans);
    cursor: pointer;
    text-decoration: none;
    transition: transform .12s ease, background-color .15s ease, opacity .15s ease;
    white-space: nowrap;
}
.mcs-ev-scope .mcs-ev-btn:hover { transform: translateY(-1px); text-decoration: none; }
.mcs-ev-scope .mcs-ev-btn:active { transform: translateY(0); }

.mcs-ev-scope .mcs-ev-btn-accent { background: var(--ev-accent); color: #fff; }
.mcs-ev-scope .mcs-ev-btn-accent:hover { background: #A94A20; color: #fff; }

.mcs-ev-scope .mcs-ev-btn-dark { background: var(--ev-dark); color: #fff; }
.mcs-ev-scope .mcs-ev-btn-dark:hover { background: #3A1E19; color: #fff; }

.mcs-ev-scope .mcs-ev-btn[disabled],
.mcs-ev-scope .mcs-ev-btn.is-disabled {
    background: var(--ev-chip);
    color: var(--ev-muted);
    cursor: default;
    transform: none;
}

/* ---------- date chip ----------------------------------------------------- */

.mcs-ev-chip {
    flex: 0 0 auto;
    width: 66px;
    padding: 10px 0 9px;
    border-radius: var(--ev-r-md);
    background: var(--ev-chip);
    text-align: center;
    line-height: 1;
}

.mcs-ev-chip-m {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ev-muted);
    margin-bottom: 5px;
}

.mcs-ev-chip-d {
    display: block;
    font-family: var(--ev-display);
    font-size: 26px;
    font-weight: normal;
    color: var(--ev-ink);
    margin-bottom: 5px;
}

.mcs-ev-chip-w {
    display: block;
    font-size: 10px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--ev-muted);
}

/* ---------- 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; }

/* ---------- featured card ------------------------------------------------- */

.mcs-ev-featured {
    display: flex;
    align-items: center;
    gap: 26px;
    background: var(--ev-dark);
    border-radius: var(--ev-r-lg);
    padding: 30px 34px;
    margin-bottom: 52px;
    box-shadow: 0 18px 40px -24px rgba(46, 27, 20, .55);
}

.mcs-ev-featured .mcs-ev-chip {
    background: rgba(255, 255, 255, .1);
    width: 74px;
    padding: 13px 0 12px;
}
.mcs-ev-featured .mcs-ev-chip-m,
.mcs-ev-featured .mcs-ev-chip-w { color: rgba(255, 253, 250, .62); }
.mcs-ev-featured .mcs-ev-chip-d { color: #FFFDFA; font-size: 29px; }

.mcs-ev-feat-body { flex: 1 1 auto; min-width: 0; }

.mcs-ev-feat-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #D9BFA6;
    margin: 0 0 10px;
}

.mcs-ev-feat-title {
    font-family: var(--ev-display);
    font-size: 30px;
    line-height: 1.2;
    font-weight: normal;
    color: #FFFDFA;
    margin: 0 0 10px;
    cursor: pointer;
}
.mcs-ev-feat-title:hover { color: #F2D9C2; }

.mcs-ev-feat-desc {
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 253, 250, .75);
    margin: 0 0 16px;
    max-width: 62ch;
}

.mcs-ev-featured .mcs-ev-meta { color: rgba(255, 253, 250, .66); }

.mcs-ev-feat-cta { flex: 0 0 auto; }

/* ---------- 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-type {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ev-accent);
    margin: 0 0 8px;
}

.mcs-ev-title {
    font-family: var(--ev-display);
    font-size: 20px;
    line-height: 1.25;
    font-weight: normal;
    color: var(--ev-ink);
    margin: 0 0 4px;
    cursor: pointer;
}
.mcs-ev-title:hover { color: var(--ev-accent); }

.mcs-ev-host {
    font-size: 14px;
    color: var(--ev-muted);
    margin: 0 0 14px;
}

.mcs-ev-desc {
    font-size: 14px;
    line-height: 1.55;
    color: #5C4638;
    margin: 0 0 16px;
}

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

.mcs-ev-cardfoot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--ev-line);
}

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

.mcs-ev-waitlink {
    font-size: 14px;
    font-weight: 600;
    color: var(--ev-accent);
    cursor: pointer;
}
.mcs-ev-waitlink:hover { text-decoration: underline; }

.mcs-ev-cardfoot .mcs-ev-btn { height: 38px; padding: 0 22px; font-size: 13px; }

/* ---------- 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;
}

/* ---------- admin / user view switch (administrators only) ---------------- */

.mcs-ev-viewtoggle {
    display: inline-flex;
    background: var(--ev-chip);
    border: 1px solid var(--ev-line);
    border-radius: 999px;
    padding: 3px;
    margin-bottom: 14px;
}

.mcs-ev-scope .mcs-ev-viewbtn {
    appearance: none;
    border: 0;
    background: transparent;
    border-radius: 999px;
    padding: 6px 15px;
    font-family: var(--ev-sans);
    font-size: 12.5px;
    line-height: 1;
    color: var(--ev-muted);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.mcs-ev-scope .mcs-ev-viewbtn:hover { color: var(--ev-ink); }
.mcs-ev-scope .mcs-ev-viewbtn.is-active {
    background: var(--ev-dark);
    color: #FFFDFA;
}

.mcs-ev-adminbanner {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 18px;
    padding: 10px 16px;
    border-radius: var(--ev-r-sm);
    background: rgba(192, 90, 42, .09);
    border: 1px solid rgba(192, 90, 42, .28);
    font-size: 13px;
    color: #8A3F1D;
}

.mcs-ev-draft {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--ev-accent);
    color: #FFFDFA;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    vertical-align: middle;
}

.mcs-ev-cardacts { display: inline-flex; align-items: center; gap: 10px; }

.mcs-ev-scope .mcs-ev-editbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-r-sm);
    background: var(--ev-card);
    font-size: 13px;
    color: var(--ev-ink);
    text-decoration: none;
    white-space: nowrap;
}
.mcs-ev-scope .mcs-ev-editbtn:hover {
    background: var(--ev-chip);
    border-color: var(--ev-muted);
    text-decoration: none;
}

.mcs-ev-feat-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mcs-ev-featured .mcs-ev-editbtn {
    justify-content: center;
    background: transparent;
    border-color: rgba(255, 253, 250, .32);
    color: #F2D9C2;
}
.mcs-ev-featured .mcs-ev-editbtn:hover {
    background: rgba(255, 253, 250, .1);
    border-color: rgba(255, 253, 250, .6);
}

/* ---------- detail view (inside the jQuery UI dialog) --------------------- */

.mcs-ev-detail {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    font-family: var(--ev-sans);
    color: var(--ev-ink);
    padding: 2px 0 4px;
}

/* 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. */
.mcs-ev-detail-left {
    flex: 0 0 244px;
    position: sticky;
    top: 0;
    background: var(--ev-chip);
    border-radius: var(--ev-r-md);
    padding: 14px;
}

.mcs-ev-detail-img {
    width: 100%;
    height: 216px;
    object-fit: cover;
    border-radius: var(--ev-r-sm);
    border: 1px solid var(--ev-line);
    display: block;
}

.mcs-ev-spots {
    display: block;
    margin-top: 16px;
    text-align: center;
}

.mcs-ev-spots-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ev-muted);
    margin: 0 0 4px;
}

.mcs-ev-spots-num {
    font-family: var(--ev-display);
    font-size: 34px;
    font-weight: normal;
    line-height: 1;
    color: var(--ev-ink);
    margin-bottom: 14px;
}

.mcs-ev-spots .mcs-ev-btn { width: 100%; }

.mcs-ev-detail-right { flex: 1 1 auto; min-width: 0; }

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

.mcs-ev-detail-title {
    font-family: var(--ev-display);
    font-size: 28px;
    line-height: 1.2;
    font-weight: normal;
    margin: 0 0 14px;
}

.mcs-ev-detail-desc {
    font-size: 15px;
    line-height: 1.62;
    color: #5C4638;
    margin: 0 0 20px;
}
.mcs-ev-detail-desc p { margin: 0 0 10px; }
.mcs-ev-detail-desc p:last-child { margin-bottom: 0; }

.mcs-ev-scope hr.mcs-ev-detail-rule {
    width: 100%;
    left: 0;
    position: static;
    height: 1px;
    background: var(--ev-line);
    background-image: none;
    border: 0;
    margin: 0 0 18px;
}

.mcs-ev-metagrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 28px;
    margin-bottom: 20px;
}

.mcs-ev-metalabel {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ev-muted);
    margin: 0 0 4px;
}
.mcs-ev-metalabel .fa { font-size: 12px; }

.mcs-ev-metaval {
    font-size: 14.5px;
    line-height: 1.4;
    color: var(--ev-ink);
    margin: 0;
}

.mcs-ev-download {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ev-accent);
    cursor: pointer;
}
.mcs-ev-download:hover { text-decoration: underline; }

/* 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. */
.mcs-ev-program {
    font-size: 13.5px;
    line-height: 1.75;
    color: #5C4638;
    background: rgba(239, 230, 216, .5);
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-r-md);
    padding: 16px 18px;
    margin-bottom: 18px;
}

.mcs-ev-program h4 {
    font-family: var(--ev-display);
    font-size: 15px;
    font-weight: normal;
    letter-spacing: .3px;
    margin: 0 0 8px;
    color: var(--ev-ink);
}

.mcs-ev-program p { margin: 0 0 8px; }
.mcs-ev-program p:last-child { margin-bottom: 0; }

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

@media (max-width: 991px) {
    .mcs-ev-h1 { font-size: 36px; }
    .mcs-ev-grid { grid-template-columns: minmax(0, 1fr); }
    .mcs-ev-featured { flex-wrap: wrap; }
    .mcs-ev-feat-cta { width: 100%; }
    .mcs-ev-feat-cta .mcs-ev-btn { width: 100%; }
    .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-featured { padding: 22px; gap: 18px; margin-bottom: 36px; }
    .mcs-ev-feat-title { font-size: 23px; }
    .mcs-ev-card { padding: 18px; gap: 14px; }
    .mcs-ev-chip { width: 56px; }
    .mcs-ev-chip-d { font-size: 22px; }
    .mcs-ev-detail { flex-direction: column; gap: 22px; }
    .mcs-ev-detail-left { flex: 1 1 auto; }
    .mcs-ev-detail-img { width: 100%; height: 220px; }
    .mcs-ev-detail-title { font-size: 25px; }
    .mcs-ev-metagrid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* ---------- dialog chrome ------------------------------------------------- */
/* Scoped via dialogClass so the site's other jQuery UI dialogs are untouched. */

.mcs-ev-dialog.ui-dialog {
    padding: 0;
    border: none;
    border-radius: var(--ev-r-lg);
    background: var(--ev-card);
    box-shadow: 0 24px 70px rgba(46, 27, 20, .28);
    overflow: hidden;
}

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

.mcs-ev-dialog .ui-dialog-titlebar {
    background: var(--ev-chip);
    border: none;
    border-bottom: 1px solid var(--ev-line);
    border-radius: 0;
    padding: 16px 22px;
}

/* #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. */
.mcs-ev-dialog .ui-dialog-titlebar:has(.ui-dialog-title:empty) {
    padding: 10px 22px;
    background: transparent;
    border-bottom: none;
}

.mcs-ev-dialog .ui-dialog-title {
    font-family: var(--ev-display);
    font-size: 19px;
    font-weight: normal;
    color: var(--ev-ink);
    margin: 0;
}

/* 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. */
.mcs-ev-dialog .ui-dialog-titlebar-close {
    right: 14px;
    top: 50%;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
    transition: background .15s ease;
}
.mcs-ev-dialog .ui-dialog-titlebar-close:hover { background: rgba(46, 27, 20, .09); }
.mcs-ev-dialog .ui-dialog-titlebar-close .ui-icon { display: none; }
.mcs-ev-dialog .ui-dialog-titlebar-close:after {
    content: "\00d7";
    display: block;
    font-family: var(--ev-sans);
    font-size: 23px;
    line-height: 30px;
    text-align: center;
    color: var(--ev-ink);
}

.mcs-ev-dialog .ui-dialog-content {
    background: var(--ev-card);
    padding: 22px 26px;
    font-family: var(--ev-sans);
    font-size: 14.5px;
    color: var(--ev-ink);
    /* jQuery UI writes an inline height when it autosizes, so the cap has to
       win outright or a long program pushes the button pane off-screen. */
    max-height: calc(100vh - 200px) !important;
    overflow-y: auto;
}

.mcs-ev-dialog .ui-dialog-buttonpane {
    background: var(--ev-card);
    border: none;
    border-top: 1px solid var(--ev-line);
    margin: 0;
    padding: 14px 22px;
}
.mcs-ev-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }

.mcs-ev-dialog .ui-dialog-buttonpane button {
    font-family: var(--ev-sans);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--ev-line);
    border-radius: 999px;
    padding: 9px 22px;
    margin-left: 8px;
    background: transparent;
    color: var(--ev-ink);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.mcs-ev-dialog .ui-dialog-buttonpane button:hover {
    background: rgba(46, 27, 20, .06);
}
/* The primary action is the first button jQuery UI renders. */
.mcs-ev-dialog .ui-dialog-buttonpane button:first-child {
    background: var(--ev-dark);
    border-color: var(--ev-dark);
    color: #fff;
}
.mcs-ev-dialog .ui-dialog-buttonpane button:first-child:hover {
    background: var(--ev-accent);
    border-color: var(--ev-accent);
}

/* ---------- register form inside the dialog ------------------------------- */

#dialog-register-ev .form-edition { margin-bottom: 14px; }

#dialog-register-ev label,
#dialog-register-ev .pull-right-lg span,
#dialog-register-ev .pull-right-lg {
    font-size: 13px;
    font-weight: 600;
    color: var(--ev-muted);
}

#dialog-register-ev .form-control-1 {
    width: 100%;
    max-width: 320px;
    font-family: var(--ev-sans);
    font-size: 14.5px;
    color: var(--ev-ink);
    background: #fff;
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-r-sm);
    padding: 9px 12px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
#dialog-register-ev .form-control-1:focus {
    border-color: var(--ev-accent);
    box-shadow: 0 0 0 3px rgba(192, 90, 42, .15);
}

#dialog-register-ev select.form-control-1 { max-width: 320px; }
