.mced-directory {
    --mced-gold: #c99a4b;
    --mced-gold-dark: #ae7d31;
    --mced-navy: #0d1b3e;
    --mced-filter-bg: #000000;
    --mced-filter-soft: rgba(255,255,255,.08);
    --mced-filter-border: rgba(255,255,255,.14);
    --mced-border: #e0e3e8;
    --mced-muted: #687083;
    color: #202532;
    width: 100%;
}

.mced-directory * { box-sizing: border-box; }

.mced-directory a:focus-visible,
.mced-directory button:focus-visible,
.mced-directory input:focus-visible,
.mced-directory select:focus-visible,
.mced-directory summary:focus-visible {
    outline: 3px solid rgba(201,154,75,.42);
    outline-offset: 2px;
}

.mced-directory__header {
    margin: 0 0 24px;
    text-align: center;
}

.mced-directory__header h1,
.mced-results-heading h2,
.mced-country-panel h2 {
    color: var(--mced-navy);
    margin-top: 0;
}

.mced-directory__header h1 {
    font-size: clamp(30px, 4vw, 46px);
    margin-bottom: 8px;
}

.mced-directory__header p,
.mced-country-panel__top p {
    color: var(--mced-muted);
    margin: 0;
}

.mced-country-panel {
    background: #fff;
    border: 1px solid var(--mced-border);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(13,27,62,.065);
    margin-bottom: 28px;
    padding: 20px;
}

.mced-country-panel__top {
    align-items: flex-end;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.mced-country-panel h2 {
    font-size: 22px;
    margin-bottom: 3px;
}

.mced-country-search { flex: 0 0 auto; }

.mced-country-search input {
    background: #fff;
    border: 1px solid #cfd4dd;
    border-radius: 8px;
    min-height: 42px;
    min-width: 240px;
    padding: 8px 12px;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.mced-country-search input:focus {
    border-color: var(--mced-gold);
    box-shadow: 0 0 0 3px rgba(201,154,75,.13);
}

.mced-country-grid {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.mced-country-item {
    align-items: center;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--mced-navy);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 84px;
    padding: 10px 8px;
    position: relative;
    text-align: center;
    text-decoration: none !important;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.mced-country-item:hover,
.mced-country-item:focus-visible {
    background: #fbf7ef;
    border-color: #e3c58e;
    box-shadow: 0 5px 14px rgba(13,27,62,.08);
    color: var(--mced-navy);
    transform: translateY(-1px);
}

.mced-country-item.is-selected {
    background: #fff7e5;
    border-color: var(--mced-gold);
    box-shadow: inset 0 0 0 1px var(--mced-gold), 0 4px 12px rgba(201,154,75,.18);
}

.mced-country-item.is-selected::after {
    background: var(--mced-gold);
    border: 2px solid #fff;
    border-radius: 50%;
    content: "";
    height: 9px;
    position: absolute;
    right: 7px;
    top: 7px;
    width: 9px;
}

.mced-country-item__flag {
    font-size: 27px;
    line-height: 1;
    margin-bottom: 6px;
}

.mced-country-item__name {
    font-size: 13.5px;
    font-weight: 750;
    line-height: 1.2;
}

.mced-country-item__count {
    color: var(--mced-muted);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.1;
    margin-top: 4px;
}

.mced-country-item.is-selected .mced-country-item__count { color: #8b6225; }

.mced-country-toggle {
    background: none;
    border: 0;
    color: var(--mced-navy);
    cursor: pointer;
    display: none;
    font-weight: 750;
    margin: 15px auto 0;
    padding: 6px 9px;
}

.mced-results-heading { margin: 0 0 13px; }

.mced-results-heading h2 {
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
    margin-bottom: 0;
}

/* Map-inspired filter toolbar */
.mced-filter-toolbar {
    background: var(--mced-filter-bg);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0,0,0,.14);
    color: #fff;
    margin-bottom: 27px;
    overflow: hidden;
    padding: 15px 18px;
}

.mced-filter-toolbar__main {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.mced-filter-toolbar__left,
.mced-filter-toolbar__right {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mced-filter-toolbar__left { flex: 1 1 auto; }
.mced-filter-toolbar__right { flex: 0 0 auto; justify-content: flex-end; }

.mced-filter-toolbar__label,
.mced-filter-toolbar__count {
    color: #fff;
    font-size: 14px;
    font-weight: 750;
}

.mced-format-pill {
    align-items: center;
    background: var(--mced-filter-soft);
    border: 1px solid var(--mced-filter-border);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 750;
    gap: 8px;
    min-height: 42px;
    padding: 9px 14px;
    position: relative;
    transition: background .18s ease, border-color .18s ease, opacity .18s ease, transform .18s ease;
    user-select: none;
}

.mced-format-pill:hover { background: rgba(255,255,255,.14); }
.mced-format-pill:active { transform: translateY(1px); }
.mced-format-pill:not(.is-active) { opacity: .47; }
.mced-format-pill.is-active { border-color: rgba(255,255,255,.26); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }

.mced-format-pill__input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.mced-format-pill__dot {
    border-radius: 50%;
    display: inline-block;
    height: 10px;
    width: 10px;
}

.mced-format-pill--classical .mced-format-pill__dot { background: #f59e0b; }
.mced-format-pill--rapid .mced-format-pill__dot { background: #4f46e5; }
.mced-format-pill--blitz .mced-format-pill__dot { background: #ef3340; }

.mced-filter-date-group {
    align-items: center;
    display: flex;
    gap: 8px;
    margin-left: 4px;
}

.mced-filter-date-field {
    align-items: center;
    background: var(--mced-filter-soft);
    border: 1px solid var(--mced-filter-border);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 750;
    gap: 6px;
    min-height: 42px;
    padding: 6px 12px;
}

.mced-filter-date-field > span { white-space: nowrap; }

.mced-filter-date-field input {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #fff;
    color-scheme: dark;
    font-size: 12px;
    font-weight: 650;
    min-height: 26px;
    outline: 0;
    padding: 2px 0;
    width: 115px;
}

.mced-filter-date-field input:focus { box-shadow: none; outline: 0; }

.mced-filter-reset,
.mced-filter-apply {
    align-items: center;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 40px;
    padding: 8px 13px;
    text-decoration: none !important;
    transition: background .16s ease, transform .16s ease;
}

.mced-filter-reset {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff !important;
}

.mced-filter-reset:hover { background: rgba(255,255,255,.15); color: #fff !important; }

.mced-filter-apply {
    background: var(--mced-gold);
    border: 0;
    color: #111;
}

.mced-filter-apply:hover { background: #d7aa62; }
.mced-filter-reset:active,
.mced-filter-apply:active { transform: translateY(1px); }

.mced-filter-more {
    border-top: 1px solid rgba(255,255,255,.12);
    margin-top: 12px;
    padding-top: 0;
}

.mced-filter-more summary {
    align-items: center;
    color: rgba(255,255,255,.9);
    cursor: pointer;
    display: flex;
    font-size: 12px;
    font-weight: 750;
    justify-content: space-between;
    list-style: none;
    min-height: 40px;
    padding: 8px 2px 0;
    width: 100%;
}

.mced-filter-more summary::-webkit-details-marker { display: none; }

.mced-filter-more__chevron {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    display: block;
    height: 8px;
    margin-right: 4px;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
    width: 8px;
}

.mced-filter-more[open] .mced-filter-more__chevron { transform: rotate(225deg) translate(-1px, -1px); }

.mced-filter-more__fields {
    display: grid;
    gap: 11px;
    grid-template-columns: 1.15fr 1.15fr .9fr;
    margin-top: 8px;
    padding-bottom: 2px;
}

.mced-filter-secondary-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mced-filter-secondary-field > span {
    color: rgba(255,255,255,.82);
    font-size: 11px;
    font-weight: 750;
}

.mced-filter-secondary-field input,
.mced-filter-secondary-field select {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 9px;
    color: #fff;
    min-height: 41px;
    padding: 7px 10px;
    transition: background .16s ease, border-color .16s ease;
    width: 100%;
}

.mced-filter-secondary-field input:focus,
.mced-filter-secondary-field select:focus {
    background: rgba(255,255,255,.11);
    border-color: rgba(255,255,255,.4);
}

.mced-filter-secondary-field input::placeholder { color: rgba(255,255,255,.68); }
.mced-filter-secondary-field select option { color: #111; }

/* WP Event Manager-compatible cards: the markup intentionally matches the
   existing All Chess Tournaments page. These scoped rules are only fallbacks
   for pages where WP Event Manager does not enqueue its grid stylesheet. */
.mced-wpem-event-listings .wpem-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

.mced-wpem-event-listings .wpem-event-box-col {
    box-sizing: border-box;
    display: flex;
    padding: 0 10px 20px;
    width: 33.333333%;
}

.mced-wpem-event-listings .wpem-event-layout-wrapper,
.mced-wpem-event-listings .event_listing {
    width: 100%;
}

.mced-wpem-event-listings .wpem-event-layout-wrapper {
    background: #fff;
    border: 1px solid #e3e5e8;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    height: 100%;
    overflow: hidden;
    transition: box-shadow .18s ease, transform .18s ease;
}

.mced-wpem-event-listings .wpem-event-layout-wrapper:hover {
    box-shadow: 0 8px 22px rgba(13,27,62,.10);
    transform: translateY(-2px);
}

.mced-wpem-event-listings .wpem-event-action-url {
    color: inherit;
    text-decoration: none !important;
}

.mced-wpem-event-listings .wpem-event-banner-img {
    background-color: #eef1f5;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding-top: 55%;
    position: relative;
}

.mced-wpem-event-listings .wpem-event-date {
    left: 12px;
    position: absolute;
    top: 12px;
}

.mced-wpem-event-listings .wpem-from-date {
    background: rgba(255,255,255,.96);
    border-radius: 3px;
    box-shadow: 0 1px 5px rgba(0,0,0,.16);
    min-width: 43px;
    padding: 5px 7px;
    text-align: center;
}

.mced-wpem-event-listings .wpem-date {
    color: #1a1f2b;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.mced-wpem-event-listings .wpem-month {
    color: #1a1f2b;
    font-size: 10px;
    line-height: 1.15;
    margin-top: 2px;
    text-transform: uppercase;
}

.mced-wpem-event-listings .wpem-event-infomation {
    padding: 14px 15px 15px;
}

.mced-wpem-event-listings .wpem-event-title .wpem-heading-text {
    color: #151a24;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 9px;
}

.mced-wpem-event-listings .wpem-event-date-time,
.mced-wpem-event-listings .wpem-event-location {
    color: #59606c;
    font-size: 12px;
    line-height: 1.45;
    margin-top: 5px;
    padding-left: 18px;
    position: relative;
}

.mced-wpem-event-listings .wpem-event-date-time::before {
    content: "◷";
    left: 0;
    position: absolute;
    top: 0;
}

.mced-wpem-event-listings .wpem-event-location::before {
    content: "⌖";
    left: 0;
    position: absolute;
    top: 0;
}

.mced-wpem-event-listings .wpem-event-location-text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mced-wpem-event-listings .wpem-event-type {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.mced-wpem-event-listings .wpem-event-type a {
    text-decoration: none !important;
}

.mced-wpem-event-listings .wpem-event-type-text {
    background: #f4f5f7;
    border-radius: 2px;
    color: #4f5968;
    display: inline-block;
    font-size: 10px;
    line-height: 1;
    padding: 4px 6px;
}

.mced-wpem-event-listings .wpem-event-type-text.classical { color: #2871b6; }
.mced-wpem-event-listings .wpem-event-type-text.rapid { color: #b17a19; }
.mced-wpem-event-listings .wpem-event-type-text.blitz { color: #c44248; }


.mced-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
    margin: 30px 0 5px;
}

.mced-page-link {
    align-items: center;
    background: #fff;
    border: 1px solid #d9dde4;
    border-radius: 4px;
    color: var(--mced-navy);
    display: inline-flex;
    justify-content: center;
    min-height: 34px;
    min-width: 34px;
    padding: 4px 9px;
    text-decoration: none !important;
    transition: background .16s ease, border-color .16s ease;
}

.mced-page-link:hover { background: #f5f7fa; border-color: #bdc4cf; }

.mced-page-link.current {
    background: var(--mced-navy);
    border-color: var(--mced-navy);
    color: #fff;
}

.mced-empty-state {
    background: #fff;
    border: 1px solid var(--mced-border);
    border-radius: 9px;
    padding: 42px 20px;
    text-align: center;
}

.mced-button {
    align-items: center;
    background: var(--mced-navy);
    border: 1px solid var(--mced-navy);
    border-radius: 5px;
    color: #fff !important;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 40px;
    padding: 8px 18px;
    text-decoration: none !important;
}

@media (max-width: 1180px) {
    .mced-filter-toolbar__main { align-items: stretch; flex-direction: column; }
    .mced-filter-toolbar__right { justify-content: flex-end; }
    .mced-wpem-event-listings .wpem-event-box-col { width: 50%; }
}

@media (max-width: 900px) {
    .mced-country-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .mced-filter-more__fields { grid-template-columns: 1fr 1fr; }
    .mced-filter-more__fields .mced-filter-secondary-field:last-child { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
    .mced-country-panel { padding: 15px; }
    .mced-country-panel__top { align-items: stretch; flex-direction: column; gap: 12px; }
    .mced-country-search input { min-width: 0; width: 100%; }
    .mced-country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mced-country-item { min-height: 78px; }
    .mced-country-item.is-mobile-collapsed:not(.is-selected) { display: none; }
    .mced-country-grid.is-expanded .mced-country-item.is-mobile-collapsed,
    .mced-country-grid.is-searching .mced-country-item.is-mobile-collapsed { display: flex; }
    .mced-country-toggle { display: block; }

    .mced-results-heading h2 { font-size: 25px; }
    .mced-filter-toolbar { border-radius: 14px; padding: 12px; }
    .mced-filter-toolbar__left,
    .mced-filter-toolbar__right { gap: 8px; width: 100%; }
    .mced-filter-toolbar__label { display: none; }
    .mced-format-pill {
        flex: 1 1 0;
        font-size: 12px;
        gap: 6px;
        justify-content: center;
        min-height: 37px;
        padding: 7px 8px;
        white-space: nowrap;
    }
    .mced-format-pill__dot { height: 8px; width: 8px; }
    .mced-filter-date-group { margin-left: 0; width: 100%; }
    .mced-filter-date-field {
        border-radius: 9px;
        flex: 1 1 0;
        min-height: 37px;
        padding: 5px 9px;
    }
    .mced-filter-date-field input { min-width: 0; width: 100%; }
    .mced-filter-toolbar__right { justify-content: space-between; }
    .mced-filter-toolbar__count { font-size: 12px; margin-right: auto; }
    .mced-filter-reset,
    .mced-filter-apply { font-size: 12px; min-height: 35px; padding: 6px 10px; }
    .mced-filter-more__fields { grid-template-columns: 1fr; }
    .mced-filter-more__fields .mced-filter-secondary-field:last-child { grid-column: auto; }
    .mced-wpem-event-listings .wpem-event-box-col { width: 100%; }
    .mced-wpem-event-listings .wpem-event-title .wpem-heading-text { min-height: 0; }
}

@media (max-width: 420px) {
    .mced-filter-toolbar__right { align-items: stretch; }
    .mced-filter-toolbar__count { flex-basis: 100%; }
    .mced-filter-date-group { flex-direction: column; }
    .mced-filter-date-field { width: 100%; }
}

.mced-editor-placeholder,
.mced-error {
    background: #fff8e9;
    border: 1px solid #c99a55;
    border-radius: 6px;
    color: #111827;
    margin: 10px 0;
    padding: 18px;
}

/* Country navigation landing point. Keeps the heading visible below the sticky site menu. */
.mced-results-heading[data-mced-scroll-target] {
    scroll-margin-top: 112px;
}

.mced-results-heading[data-mced-scroll-target]:focus {
    outline: none;
}

@media (max-width: 921px) {
    .mced-results-heading[data-mced-scroll-target] {
        scroll-margin-top: 92px;
    }
}

/* Version 0.5.3 refinements: robust country search, equal-height format/date
   controls, branded event-type colors and a custom responsive calendar. */
.mced-country-item.is-country-filter-hidden {
    display: none !important;
}

.mced-country-no-results {
    color: var(--mced-muted);
    font-size: 14px;
    font-weight: 650;
    margin: 18px 0 4px;
    text-align: center;
}

.mced-country-no-results[hidden],
.mced-calendar[hidden],
.mced-calendar-backdrop[hidden] {
    display: none !important;
}

.mced-filter-toolbar {
    overflow: visible;
    position: relative;
    z-index: 20;
}

.mced-format-pill,
.mced-filter-date-field {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
}

.mced-filter-date-field {
    gap: 7px;
    padding: 0 12px;
    position: relative;
}

.mced-filter-date-label {
    flex: 0 0 auto;
    white-space: nowrap;
}

.mced-date-trigger {
    align-items: center;
    align-self: stretch;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #fff !important;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    gap: 8px;
    height: 100%;
    justify-content: space-between;
    min-height: 0 !important;
    outline: 0;
    padding: 0 !important;
    text-align: left;
    width: 126px;
}

.mced-date-trigger:hover,
.mced-date-trigger:focus {
    background: transparent !important;
    color: #fff !important;
}

.mced-date-trigger__value {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.mced-date-trigger__value.is-placeholder {
    color: rgba(255,255,255,.84);
}

.mced-date-trigger__icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
}

.mced-date-trigger__icon svg {
    fill: none;
    height: 16px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 16px;
}

.mced-date-picker.is-open {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.35);
}

.mced-calendar {
    background: #fff;
    border: 1px solid #e2e4e9;
    border-radius: 16px;
    box-shadow: 0 22px 55px rgba(6,16,37,.28);
    color: #292d36;
    left: 0;
    padding: 16px;
    position: absolute;
    top: calc(100% + 10px);
    width: 348px;
    z-index: 10010;
}

.mced-date-picker[data-mced-range-role="to"] .mced-calendar {
    left: auto;
    right: 0;
}

.mced-calendar__header {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 38px 1fr 38px;
    margin-bottom: 13px;
}

.mced-calendar__nav {
    align-items: center;
    background: transparent !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    color: #222936 !important;
    cursor: pointer;
    display: inline-flex;
    font-size: 31px;
    font-weight: 400;
    height: 38px;
    justify-content: center;
    line-height: 1;
    min-height: 38px !important;
    padding: 0 0 4px !important;
    width: 38px;
}

.mced-calendar__nav:hover,
.mced-calendar__nav:focus {
    background: #f0f2f6 !important;
    color: #111827 !important;
}

.mced-calendar__selectors {
    display: grid;
    gap: 5px;
    grid-template-columns: 1fr 82px;
}

.mced-calendar__month,
.mced-calendar__year {
    appearance: none;
    background-color: #fff;
    background-image: linear-gradient(45deg, transparent 50%, #657080 50%), linear-gradient(135deg, #657080 50%, transparent 50%);
    background-position: calc(100% - 12px) calc(50% - 2px), calc(100% - 8px) calc(50% - 2px);
    background-repeat: no-repeat;
    background-size: 4px 4px, 4px 4px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #222936;
    font-size: 16px;
    font-weight: 650;
    height: 38px;
    min-height: 38px;
    padding: 4px 24px 4px 8px;
}

.mced-calendar__month:hover,
.mced-calendar__year:hover,
.mced-calendar__month:focus,
.mced-calendar__year:focus {
    background-color: #f5f6f8;
    border-color: #dfe3e8;
    outline: 0;
}

.mced-calendar__weekdays,
.mced-calendar__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.mced-calendar__weekdays {
    margin-bottom: 4px;
}

.mced-calendar__weekdays span {
    color: #626b78;
    font-size: 12px;
    font-weight: 750;
    padding: 7px 0;
    text-align: center;
}

.mced-calendar__days {
    gap: 3px 1px;
}

.mced-calendar__day {
    align-items: center;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    color: #242a35 !important;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 550;
    height: 40px;
    justify-content: center;
    line-height: 1;
    min-height: 40px !important;
    padding: 0 !important;
    width: 40px;
}

.mced-calendar__day:hover,
.mced-calendar__day:focus {
    background: #eef1f6 !important;
    color: #111827 !important;
    outline: 0;
}

.mced-calendar__day.is-outside {
    color: #b7bdc7 !important;
}

.mced-calendar__day.is-today {
    border-color: #929ba8 !important;
}

.mced-calendar__day.is-selected,
.mced-calendar__day.is-selected:hover,
.mced-calendar__day.is-selected:focus {
    background: var(--mced-gold) !important;
    border-color: var(--mced-gold) !important;
    color: #111827 !important;
    font-weight: 800;
}

.mced-calendar__day.is-disabled,
.mced-calendar__day:disabled {
    background: transparent !important;
    color: #d0d4db !important;
    cursor: not-allowed;
    opacity: .7;
}

.mced-calendar__footer {
    align-items: center;
    border-top: 1px solid #eceef2;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
}

.mced-calendar__clear,
.mced-calendar__today {
    background: transparent !important;
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    color: #536079 !important;
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    min-height: 34px !important;
    padding: 5px 9px !important;
}

.mced-calendar__clear:hover,
.mced-calendar__today:hover {
    background: #f0f2f6 !important;
    color: #17213a !important;
}

.mced-calendar-backdrop {
    background: rgba(9,17,32,.42);
    inset: 0;
    position: fixed;
    z-index: 100000;
}

/* Event type colors match the filter toolbar. */
.mced-wpem-event-listings .wpem-event-type-text.classical {
    background: #fff3d3;
    border: 1px solid #f1d08a;
    color: #a36a00;
}

.mced-wpem-event-listings .wpem-event-type-text.rapid {
    background: #eef0ff;
    border: 1px solid #c9cdfd;
    color: #4646d8;
}

.mced-wpem-event-listings .wpem-event-type-text.blitz {
    background: #fff0f1;
    border: 1px solid #ffc9cd;
    color: #df2735;
}

@media (max-width: 767px) {
    .mced-format-pill,
    .mced-filter-date-field {
        height: 40px;
        min-height: 40px;
        max-height: 40px;
    }

    .mced-filter-date-field {
        border-radius: 999px;
        padding: 0 11px;
    }

    .mced-date-trigger {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
    }

    .mced-calendar {
        border-radius: 15px;
        bottom: auto;
        left: 14px !important;
        max-height: calc(100vh - 34px);
        overflow-y: auto;
        padding: 15px;
        position: fixed;
        right: 14px !important;
        top: 50%;
        transform: translateY(-50%);
        width: auto;
        z-index: 100001;
    }

    .mced-calendar__day {
        height: 38px;
        min-height: 38px !important;
        width: 38px;
    }
}

@media (max-width: 420px) {
    .mced-filter-date-group {
        flex-direction: column;
    }

    .mced-filter-date-field {
        width: 100%;
    }

    .mced-calendar {
        left: 10px !important;
        right: 10px !important;
    }

    .mced-calendar__selectors {
        grid-template-columns: 1fr 76px;
    }

    .mced-calendar__day {
        height: 36px;
        min-height: 36px !important;
        width: 36px;
    }
}


/* Version 0.5.4: force tournament-format badges to use the same palette as
   the filter controls. WP Event Manager can print its dynamic color CSS after
   plugin styles, so these deliberately scoped declarations use !important. */
.mced-directory .mced-wpem-event-listings .wpem-event-type .wpem-event-type-text.event-type.classical,
.mced-directory .mced-wpem-event-listings .wpem-event-type a .wpem-event-type-text.event-type.classical {
    background-color: rgba(245, 158, 11, .12) !important;
    border: 1px solid #f59e0b !important;
    color: #f59e0b !important;
}

.mced-directory .mced-wpem-event-listings .wpem-event-type .wpem-event-type-text.event-type.rapid,
.mced-directory .mced-wpem-event-listings .wpem-event-type a .wpem-event-type-text.event-type.rapid {
    background-color: rgba(79, 70, 229, .11) !important;
    border: 1px solid #4f46e5 !important;
    color: #4f46e5 !important;
}

.mced-directory .mced-wpem-event-listings .wpem-event-type .wpem-event-type-text.event-type.blitz,
.mced-directory .mced-wpem-event-listings .wpem-event-type a .wpem-event-type-text.event-type.blitz {
    background-color: rgba(239, 51, 64, .10) !important;
    border: 1px solid #ef3340 !important;
    color: #ef3340 !important;
}


/* Version 0.7.2: unified pure-black filter bars and larger tournament-card typography
   on both the By Country and All Chess Tournaments views. */
.mced-directory .mced-filter-toolbar {
    background: #000000 !important;
}

.mced-directory .mced-wpem-event-listings .wpem-event-infomation {
    padding: 18px 18px 20px !important;
}

.mced-directory .mced-wpem-event-listings .wpem-event-title .wpem-heading-text {
    color: #151a24 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.34 !important;
    margin: 0 0 12px !important;
}

.mced-directory .mced-wpem-event-listings .wpem-event-date-time,
.mced-directory .mced-wpem-event-listings .wpem-event-location {
    color: #59606c !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    margin-top: 7px !important;
    padding-left: 24px !important;
}

.mced-directory .mced-wpem-event-listings .wpem-event-date-time::before,
.mced-directory .mced-wpem-event-listings .wpem-event-location::before {
    font-size: 17px !important;
    line-height: 1.35 !important;
}

.mced-directory .mced-wpem-event-listings .wpem-event-type {
    gap: 7px !important;
    margin-top: 14px !important;
}

.mced-directory .mced-wpem-event-listings .wpem-event-type .wpem-event-type-text,
.mced-directory .mced-wpem-event-listings .wpem-event-type a .wpem-event-type-text {
    border-radius: 5px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
    padding: 6px 9px !important;
}

.mced-directory .mced-wpem-event-listings .wpem-from-date {
    border-radius: 6px !important;
    min-width: 54px !important;
    padding: 8px 10px !important;
}

.mced-directory .mced-wpem-event-listings .wpem-date {
    font-size: 20px !important;
    font-weight: 750 !important;
}

.mced-directory .mced-wpem-event-listings .wpem-month {
    font-size: 12px !important;
    font-weight: 650 !important;
    margin-top: 4px !important;
}

@media (max-width: 767px) {
    .mced-directory .mced-wpem-event-listings .wpem-event-infomation {
        padding: 17px 17px 19px !important;
    }

    .mced-directory .mced-wpem-event-listings .wpem-event-title .wpem-heading-text {
        font-size: 20px !important;
    }

    .mced-directory .mced-wpem-event-listings .wpem-event-date-time,
    .mced-directory .mced-wpem-event-listings .wpem-event-location {
        font-size: 15px !important;
    }
}


/* Version 0.7.3: on mobile the modal backdrop must remain below the
   calendar's parent stacking context. Without this elevation the translucent
   backdrop can intercept every tap on a calendar day. */
@media (max-width: 767px) {
    html.mced-calendar-open .mced-directory .mced-filter-toolbar {
        position: relative !important;
        z-index: 100002 !important;
    }

    html.mced-calendar-open .mced-directory .mced-calendar {
        pointer-events: auto !important;
        z-index: 100003 !important;
    }

    html.mced-calendar-open .mced-calendar-backdrop {
        pointer-events: auto !important;
        z-index: 100000 !important;
    }
}
