/* ==========================================================================
   MeetSimple — Public Styles
   Brand: Connect'd Men
   Fonts: DM Serif Display (display/headings) · Inter (body/UI)
   Colors: see brand tokens below

   JS hook classes are preserved exactly — rsvp.js and countdown.js
   depend on: .rsvp-btn, .rsvp-buttons, [data-instance-id],
   [data-response], [data-current-rsvp], #meeting-countdown,
   .countdown, .time-unit, .number, .label
   ========================================================================== */


/* ── Brand Tokens ──────────────────────────────────────────────────────────── */

:root {
    /* Primary logo colors */
    --cm-navy:      #0D3472;
    --cm-royal:     #1464C8;
    --cm-sky:       #4DC8F0;
    --cm-red:       #E8192C;

    /* Extended palette */
    --cm-action:    #004DAD;
    --cm-link:      #1A7EFB;
    --cm-slate:     #1A202C;
    --cm-gray:      #718096;
    --cm-cloud:     #EDF2F7;
    --cm-white:     #FFFFFF;

    /* Typography */
    --cm-serif: 'DM Serif Display', Georgia, serif;
    --cm-sans:  'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Shape */
    --cm-pill:      8px;
    --cm-radius:    12px;
    --cm-radius-sm: 6px;

    /* Elevation */
    --cm-shadow:    0 2px 12px rgba(13, 52, 114, 0.08);
    --cm-shadow-lg: 0 8px 28px rgba(13, 52, 114, 0.15);
}


/* ── RSVP Buttons (rsvp.js binds to .rsvp-btn / .rsvp-buttons) ────────────── */

.rsvp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 20px;
    border-radius: var(--cm-pill);
    border: 2px solid transparent;
    font-family: var(--cm-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease,
                border-color 0.15s ease, box-shadow 0.15s ease;
    line-height: 1.4;
    white-space: nowrap;
}

/* Default state */
.rsvp-btn[data-response="yes"] {
    background: #F0FFF4;
    color: #276749;
    border-color: #9AE6B4;
}
.rsvp-btn[data-response="no"] {
    background: #FFF5F5;
    color: #C53030;
    border-color: #FEB2B2;
}

/* Active / hover */
.rsvp-btn[data-response="yes"].active,
.rsvp-btn[data-response="yes"]:hover {
    background: #38A169;
    color: var(--cm-white);
    border-color: #38A169;
    box-shadow: 0 0 10px rgba(56, 161, 105, 0.3);
    font-weight: 700;
}
.rsvp-btn[data-response="no"].active,
.rsvp-btn[data-response="no"]:hover {
    background: var(--cm-red);
    color: var(--cm-white);
    border-color: var(--cm-red);
    box-shadow: 0 0 10px rgba(232, 25, 44, 0.3);
    font-weight: 700;
}

@keyframes cm-click-feedback {
    0%   { transform: scale(1);    }
    50%  { transform: scale(0.95); }
    100% { transform: scale(1);    }
}
.rsvp-btn:active { animation: cm-click-feedback 0.15s ease; }

/* Container */
.rsvp-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Upcoming dates — compact variant */
.ms-upcoming-btn {
    padding: 4px 12px;
    font-size: 12px;
}


/* ── MeetSimple Notices ─────────────────────────────────────────────────────── */

#meetsimple-notices .notice,
.ms-rsvp-notices .notice {
    padding: 10px 14px;
    margin-bottom: 8px;
    border-left: 4px solid;
    font-family: var(--cm-sans);
    font-size: 13px;
    border-radius: 0 var(--cm-radius-sm) var(--cm-radius-sm) 0;
}
#meetsimple-notices .notice-success,
.ms-rsvp-notices .notice-success {
    background: #F0FFF4;
    border-color: #38A169;
    color: #276749;
}
#meetsimple-notices .notice-error,
.ms-rsvp-notices .notice-error {
    background: #FFF5F5;
    border-color: var(--cm-red);
    color: #C53030;
}


/* ── Countdown (#meeting-countdown — countdown.js binds here) ──────────────── */

#meeting-countdown {
    display: flex;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

#meeting-countdown .time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

/* The navy tile with sky accent stripe at the bottom */
#meeting-countdown .number {
    display: block;
    font-family: var(--cm-serif);
    font-size: 2.2rem;
    font-weight: 400;
    background: var(--cm-navy);
    color: var(--cm-white);
    padding: 16px 10px 10px;
    border-radius: var(--cm-radius-sm);
    min-width: 58px;
    text-align: center;
    line-height: 1;
    box-shadow: var(--cm-shadow);
    position: relative;
    overflow: hidden;
}
/* Sky accent stripe */
#meeting-countdown .number::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--cm-sky);
}

#meeting-countdown .label {
    display: block;
    font-family: var(--cm-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cm-royal);
    margin-top: 7px;
}


/* ── Legacy shortcode — upcoming dates list (keep for back-compat) ─────────── */
.upcoming-dates-list { list-style: none; padding: 0; }
.upcoming-dates-list li { margin: 10px 0; }


/* ==========================================================================
   SHARED COMPONENTS
   ========================================================================== */

/* Page container — max-width box with breathing room on both sides */
.ms-page-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 860px) {
    .ms-page-container { padding: 0 24px; }
}
@media (max-width: 580px) {
    .ms-page-container { padding: 0 16px; }
}

/* Eyebrow / section label */
.ms-eyebrow {
    font-family: var(--cm-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--cm-royal);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.ms-eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cm-cloud);
    border-top: 1px solid #d8e4f0;
}

/* Secondary pill button (used on cards) */
.ms-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
    border-radius: var(--cm-pill);
    border: 2px solid var(--cm-action);
    background: transparent;
    color: var(--cm-action);
    font-family: var(--cm-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.ms-btn-secondary:hover {
    background: var(--cm-action);
    color: var(--cm-white);
}

/* Sign-in button (dark) */
.ms-btn-sign-in {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--cm-pill);
    background: var(--cm-navy);
    color: var(--cm-white);
    font-family: var(--cm-sans);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.ms-btn-sign-in:hover { background: var(--cm-royal); }


/* ==========================================================================
   ARCHIVE PAGE  (.ms-archive-page)
   ========================================================================== */

.ms-archive-page { padding: 0 0 60px; }

/* ── Archive Header ─── */
.ms-archive-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--cm-navy);
}

.ms-archive-eyebrow {
    font-family: var(--cm-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--cm-royal);
    display: block;
    margin-bottom: 8px;
}

.ms-archive-title {
    font-family: var(--cm-serif);
    font-size: 2.6rem;
    color: var(--cm-navy);
    line-height: 1.1;
    margin: 0 0 6px;
}

.ms-archive-count {
    font-family: var(--cm-sans);
    font-size: 14px;
    color: var(--cm-gray);
    margin: 0;
}

/* View toggle */
.ms-view-toggle { display: flex; gap: 6px; flex-shrink: 0; }
.ms-view-btn {
    background: none;
    border: 2px solid var(--cm-cloud);
    border-radius: var(--cm-pill);
    padding: 8px 18px;
    font-family: var(--cm-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--cm-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}
.ms-view-btn.active {
    background: var(--cm-navy);
    border-color: var(--cm-navy);
    color: var(--cm-white);
}
.ms-view-btn:hover:not(.active) {
    border-color: var(--cm-royal);
    color: var(--cm-royal);
}

/* ── Card Grid ─── */
.ms-gatherings-archive {
    display: grid;
    gap: 24px;
}
.ms-gatherings-archive.card-view.columns-1 { grid-template-columns: repeat(1, 1fr); }
.ms-gatherings-archive.card-view.columns-2 { grid-template-columns: repeat(2, 1fr); }
.ms-gatherings-archive.card-view.columns-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 960px) {
    .ms-gatherings-archive.card-view.columns-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .ms-gatherings-archive.card-view { grid-template-columns: 1fr !important; }
    .ms-archive-header { flex-direction: column; align-items: flex-start; }
    .ms-archive-title { font-size: 2rem; }
}

/* ── List View ─── */
.ms-gatherings-archive.list-view { display: block; }
.ms-gatherings-archive.list-view .ms-gathering-card {
    flex-direction: row;
    margin-bottom: 20px;
}
.ms-gatherings-archive.list-view .ms-card-image {
    flex: 0 0 28%;
    max-width: 28%;
    height: auto;
    border-radius: var(--cm-radius) 0 0 var(--cm-radius);
}
.ms-gatherings-archive.list-view .ms-card-image img { height: 100%; }
@media (max-width: 600px) {
    .ms-gatherings-archive.list-view .ms-gathering-card { flex-direction: column; }
    .ms-gatherings-archive.list-view .ms-card-image {
        flex: none; max-width: 100%;
        border-radius: var(--cm-radius) var(--cm-radius) 0 0;
    }
}

/* ── Gathering Card ─── */
.ms-gathering-card {
    background: var(--cm-white);
    border-radius: var(--cm-radius);
    overflow: hidden;
    box-shadow: var(--cm-shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(13, 52, 114, 0.08);
}
.ms-gathering-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cm-shadow-lg);
}

/* Card image */
.ms-card-image {
    position: relative;
    height: 196px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--cm-navy) 0%, var(--cm-royal) 100%);
}
.ms-card-image img,
.ms-card-thumb {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.ms-gathering-card:hover .ms-card-thumb { transform: scale(1.04); }

/* Next date badge */
.ms-next-date-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(13, 52, 114, 0.88);
    color: var(--cm-white);
    border-radius: var(--cm-radius-sm);
    padding: 6px 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(77, 200, 240, 0.25);
}
.ms-badge-text { line-height: 1.25; }
.ms-badge-label {
    display: block;
    font-family: var(--cm-sans);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cm-sky);
}
.ms-badge-date {
    display: block;
    font-family: var(--cm-sans);
    font-size: 12px;
    font-weight: 700;
}

/* RSVP attending chip */
.ms-rsvp-chip {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--cm-action);
    color: var(--cm-white);
    border-radius: var(--cm-pill);
    padding: 4px 11px;
    font-family: var(--cm-sans);
    font-size: 11px;
    font-weight: 700;
}

/* Card body */
.ms-card-body {
    padding: 20px 22px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ms-card-title {
    font-family: var(--cm-sans);
    font-size: 17px;
    font-weight: 700;
    color: var(--cm-slate);
    margin: 0 0 6px;
    line-height: 1.3;
}
.ms-card-title a { color: inherit; text-decoration: none; }
.ms-card-title a:hover { color: var(--cm-royal); }

.ms-card-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--cm-sans);
    font-size: 12px;
    color: var(--cm-gray);
    margin: 0 0 12px;
}

.ms-card-excerpt {
    font-family: var(--cm-sans);
    font-size: 14px;
    color: #4A5568;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 18px;
}
.ms-card-excerpt p { margin: 0; }

.ms-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--cm-cloud);
    gap: 8px;
}

.ms-card-host {
    font-family: var(--cm-sans);
    font-size: 12px;
    color: var(--cm-gray);
}
.ms-card-host strong { color: #4A5568; font-weight: 600; }

/* "View details" link — use ms-btn-secondary */
.ms-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 16px;
    border-radius: var(--cm-pill);
    border: 2px solid var(--cm-action);
    background: transparent;
    color: var(--cm-action);
    font-family: var(--cm-sans);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.ms-card-link:hover {
    background: var(--cm-action);
    color: var(--cm-white);
}

/* ── Empty state ─── */
.ms-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--cm-gray);
    font-family: var(--cm-sans);
}
.ms-empty-icon { font-size: 3rem; display: block; margin-bottom: 16px; }
.ms-empty-state p { font-size: 15px; }

/* ── Pagination ─── */
.ms-pagination { margin-top: 48px; }
/* WordPress .nav-links pagination inherits theme; override colors here if needed */
.ms-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: var(--cm-pill);
    border: 2px solid var(--cm-cloud);
    background: var(--cm-white);
    font-family: var(--cm-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--cm-gray);
    text-decoration: none;
    transition: all 0.15s;
    margin: 0 3px;
}
.ms-pagination .page-numbers.current {
    background: var(--cm-navy);
    border-color: var(--cm-navy);
    color: var(--cm-white);
}
.ms-pagination .page-numbers:hover:not(.current) {
    border-color: var(--cm-royal);
    color: var(--cm-royal);
}


/* ==========================================================================
   SINGLE GATHERING PAGE  (.ms-single-gathering)
   ========================================================================== */

/* ── Breadcrumb ─── */
.ms-breadcrumb {
    font-family: var(--cm-sans);
    font-size: 12px;
    color: var(--cm-gray);
    padding: 16px 0 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ms-breadcrumb a { color: var(--cm-action); text-decoration: none; }
.ms-breadcrumb a:hover { color: var(--cm-link); text-decoration: underline; }

/* ── Hero ─── */
.ms-gathering-hero {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--cm-navy) 0%, var(--cm-royal) 70%, var(--cm-sky) 100%);
    margin-top: 12px;
}
.ms-hero-image {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.ms-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(13, 52, 114, 0.9) 0%,
        rgba(13, 52, 114, 0.38) 50%,
        rgba(13, 52, 114, 0.05) 100%
    );
    pointer-events: none;
}
.ms-hero-text {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 32px 40px;
    z-index: 2;
}
.ms-hero-chapter-tag {
    display: inline-block;
    background: var(--cm-sky);
    color: var(--cm-navy);
    font-family: var(--cm-sans);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: var(--cm-pill);
    margin-bottom: 12px;
}
.ms-hero-title {
    font-family: var(--cm-serif);
    font-size: 3rem;
    color: var(--cm-white);
    line-height: 1.1;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
    margin: 0 0 14px;
}
.ms-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}
.ms-hero-meta-item {
    font-family: var(--cm-sans);
    color: rgba(255,255,255,0.82);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* No featured image fallback */
.ms-gathering-hero:not(.has-image) {
    height: auto;
}
.ms-gathering-hero:not(.has-image) .ms-hero-overlay { display: none; }
.ms-gathering-hero:not(.has-image) .ms-hero-text {
    position: relative;
    padding: 40px;
}

/* ── Content Layout ─── */
.ms-single-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    padding: 32px 0 60px;
}
.ms-main-column { flex: 2 1 0%; min-width: 0; }

/* ── Section label (reused in main column) ─── */
.ms-section-label {
    font-family: var(--cm-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--cm-royal);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ms-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cm-cloud);
    border-top: 1px solid #d8e4f0;
}

/* ── Countdown Section ─── */
.ms-countdown-section {
    background: var(--cm-white);
    border-radius: var(--cm-radius);
    padding: 24px 26px;
    margin-bottom: 22px;
    box-shadow: var(--cm-shadow);
    border: 1px solid rgba(13, 52, 114, 0.06);
}
.ms-countdown-next-line {
    text-align: center;
    font-family: var(--cm-sans);
    font-size: 13px;
    color: var(--cm-gray);
    margin-top: 16px;
}
.ms-countdown-next-line strong { color: var(--cm-slate); font-weight: 700; }
.ms-no-upcoming {
    color: var(--cm-gray);
    font-family: var(--cm-sans);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* ── Gathering Description ─── */
.ms-gathering-description {
    background: var(--cm-white);
    border-radius: var(--cm-radius);
    padding: 26px;
    box-shadow: var(--cm-shadow);
    border: 1px solid rgba(13, 52, 114, 0.06);
}
.ms-content-body {
    font-family: var(--cm-sans);
    font-size: 16px;
    color: #4A5568;
    line-height: 1.75;
}
.ms-content-body p { margin-bottom: 14px; }
.ms-content-body p:last-child { margin-bottom: 0; }

/* ── Sidebar ─── */
.ms-sidebar {
    flex: 1 1 0%;
    min-width: 270px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 24px;
}

/* ── Sidebar Widget ─── */
.ms-sidebar-widget {
    background: var(--cm-white);
    border-radius: var(--cm-radius);
    padding: 20px;
    box-shadow: var(--cm-shadow);
    border: 1px solid rgba(13, 52, 114, 0.06);
}
.ms-widget-title {
    font-family: var(--cm-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--cm-royal);
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--cm-cloud);
    display: block;
}

/* ── Details Widget ─── */
.ms-detail-list { display: flex; flex-direction: column; gap: 14px; }
.ms-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.ms-detail-icon {
    width: 30px; height: 30px;
    background: var(--cm-cloud);
    border-radius: var(--cm-radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.ms-detail-label {
    display: block;
    font-family: var(--cm-sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cm-gray);
    margin-bottom: 2px;
}
.ms-detail-value {
    display: block;
    font-family: var(--cm-sans);
    font-size: 14px;
    font-weight: 700;
    color: var(--cm-slate);
    line-height: 1.3;
}
.ms-detail-sub {
    display: block;
    font-family: var(--cm-sans);
    font-size: 12px;
    color: var(--cm-gray);
    margin-top: 1px;
}
.ms-map-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: var(--cm-sans);
    font-size: 11px;
    font-weight: 600;
    color: var(--cm-action);
    text-decoration: none;
    margin-top: 3px;
}
.ms-map-link:hover { color: var(--cm-link); text-decoration: underline; }

/* ── RSVP Widget ─── */
.ms-rsvp-count {
    background: var(--cm-cloud);
    border-radius: var(--cm-radius-sm);
    padding: 14px;
    text-align: center;
    margin-bottom: 14px;
}
.ms-rsvp-count-number {
    display: block;
    font-family: var(--cm-serif);
    font-size: 2.2rem;
    color: var(--cm-navy);
    line-height: 1;
}
.ms-rsvp-count-label {
    display: block;
    font-family: var(--cm-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cm-gray);
    margin-top: 4px;
}

.ms-rsvp-status-line {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    font-family: var(--cm-sans);
    font-size: 13px;
    color: var(--cm-gray);
}
.ms-rsvp-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #CBD5E0;
    flex-shrink: 0;
    display: inline-block;
}
.ms-rsvp-dot.attending     { background: #38A169; }
.ms-rsvp-dot.not-attending { background: var(--cm-red); }

/* Full-width RSVP buttons in sidebar — keep on one line */
.ms-rsvp-widget .rsvp-buttons {
    flex-direction: row;
    flex-wrap: nowrap;
}
.ms-rsvp-widget .rsvp-buttons .rsvp-btn {
    flex: 1;
    font-size: 13px;
    padding: 10px 12px;
}

.ms-rsvp-notices { margin-top: 10px; }

/* ── Join Meeting button (virtual gatherings) ──────────────────────────────── */
.ms-join-meeting-wrapper {
    margin-top: 14px;
}
.ms-btn-join,
.join-meeting-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #276749;
    color: #fff;
    font-family: var(--cm-sans);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: var(--cm-pill);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    box-sizing: border-box;
}
.ms-btn-join:hover,
.join-meeting-button:hover  { background: #22543D; color: #fff; text-decoration: none; }
.ms-btn-join:active,
.join-meeting-button:active { transform: scale(0.98); }

.ms-meeting-note {
    margin: 0;
    padding: 10px 14px;
    background: var(--cm-cloud);
    border-radius: var(--cm-radius-sm, 6px);
    font-family: var(--cm-sans);
    font-size: 13px;
    color: var(--cm-gray);
    text-align: center;
}

.ms-rsvp-note {
    margin-top: 8px;
    font-family: var(--cm-sans);
    font-size: 13px;
    color: var(--cm-gray);
    text-align: center;
}

.ms-rsvp-login {
    text-align: center;
    font-family: var(--cm-sans);
    font-size: 14px;
    color: var(--cm-gray);
}
.ms-rsvp-login p { margin-bottom: 12px; }

/* ── Guest RSVP: tabbed login / register form ─────────────────────────────── */

.ms-rsvp-guest {
    font-family: var(--cm-sans);
}

/* Tab row */
.ms-rsvp-tabs {
    display: flex;
    border-bottom: 2px solid var(--cm-cloud);
    margin-bottom: 20px;
    gap: 0;
}
.ms-rsvp-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 8px;
    font-family: var(--cm-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cm-gray);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.ms-rsvp-tab.active,
.ms-rsvp-tab:hover {
    color: var(--cm-royal);
    border-bottom-color: var(--cm-royal);
}

/* Form container */
.ms-rsvp-forms { width: 100%; }

.ms-guest-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Side-by-side row (first + last name) */
.ms-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Label + input pair */
.ms-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ms-form-field label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cm-slate);
}
.ms-form-field input {
    padding: 9px 12px;
    border: 1.5px solid #CBD5E0;
    border-radius: var(--cm-radius-sm);
    font-family: var(--cm-sans);
    font-size: 14px;
    color: var(--cm-slate);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.ms-form-field input:focus {
    outline: none;
    border-color: var(--cm-royal);
    box-shadow: 0 0 0 3px rgba(20, 100, 200, 0.15);
}

/* Primary submit button */
.ms-btn-primary {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: var(--cm-action);
    color: #fff;
    border: none;
    border-radius: var(--cm-pill);
    font-family: var(--cm-sans);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    text-align: center;
    margin-top: 4px;
}
.ms-btn-primary:hover { background: var(--cm-royal); }
.ms-btn-primary:active { transform: scale(0.98); }

/* Forgot password link */
.ms-forgot-link {
    display: block;
    text-align: center;
    font-size: 12px;
    color: var(--cm-gray);
    text-decoration: none;
    margin-top: -6px;
}
.ms-forgot-link:hover { color: var(--cm-royal); text-decoration: underline; }
.ms-no-upcoming-rsvp {
    font-family: var(--cm-sans);
    font-size: 14px;
    color: var(--cm-gray);
    text-align: center;
    padding: 8px 0;
}

/* ── Upcoming Dates Widget ─── */
.ms-upcoming-list { list-style: none; padding: 0; margin: 0; }
.ms-upcoming-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--cm-cloud);
}
.ms-upcoming-item:first-child { padding-top: 0; }
.ms-upcoming-item:last-child  { border-bottom: none; padding-bottom: 0; }

.ms-upcoming-date-block {
    width: 40px;
    text-align: center;
    background: var(--cm-cloud);
    border-radius: var(--cm-radius-sm);
    padding: 5px 4px;
    flex-shrink: 0;
}
.ms-upcoming-month {
    display: block;
    font-family: var(--cm-sans);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cm-royal);
}
.ms-upcoming-day {
    display: block;
    font-family: var(--cm-serif);
    font-size: 1.15rem;
    color: var(--cm-navy);
    line-height: 1.1;
}

.ms-upcoming-right { flex: 1; min-width: 0; }
.ms-upcoming-time {
    display: block;
    font-family: var(--cm-sans);
    font-size: 13px;
    font-weight: 700;
    color: var(--cm-slate);
}
.ms-upcoming-loc {
    display: block;
    font-family: var(--cm-sans);
    font-size: 11px;
    color: var(--cm-gray);
    margin-top: 1px;
    margin-bottom: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ms-upcoming-rsvp { display: flex; gap: 5px; flex-wrap: wrap; }


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 860px) {
    .ms-single-layout {
        flex-direction: column;
        padding-top: 24px;
        gap: 0;
    }
    .ms-sidebar {
        max-width: 100%;
        width: 100%;
        position: static;
        margin-top: 24px;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .ms-sidebar-widget { flex: 1 1 260px; }
    .ms-gathering-hero { height: 300px; }
    .ms-hero-title { font-size: 2.2rem; }
    .ms-hero-text { padding: 24px 28px; }
}

@media (max-width: 580px) {
    .ms-gathering-hero { height: 240px; }
    .ms-hero-text { padding: 16px 20px; }
    .ms-hero-title { font-size: 1.7rem; }
    .ms-hero-meta { gap: 8px; }
    #meeting-countdown { gap: 6px; }
    #meeting-countdown .number { font-size: 1.5rem; min-width: 44px; padding: 10px 6px 8px; }
    .ms-sidebar { flex-direction: column; }
    .ms-sidebar-widget { flex: none; }
}
