/* =============================================================================
   Rotary WP Connect — Front-end Styles
   ============================================================================= */

/* --- Club List (DataTables) --- */
.rwc-club-list-wrap {
    margin: 1em 0;
}

table.rwc-club-list tbody tr {
    cursor: pointer;
}

table.rwc-club-list tbody tr:hover {
    background-color: #f3f6fb;
}

/* Expander control cell */
table.rwc-club-list td.rwc-cl-control,
table.rwc-club-list th.rwc-cl-control {
    text-align: center;
    vertical-align: middle;
}

table.rwc-club-list td.rwc-cl-control::before {
    content: "\002B"; /* plus sign */
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 3px;
    background: #2271b1;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}

table.rwc-club-list tr.rwc-cl-open td.rwc-cl-control::before {
    content: "\2212"; /* minus sign */
    background: #135e96;
}

/* Child detail row */
.rwc-cl-detail {
    padding: 10px 14px;
    background: #f6f7f7;
    border-left: 3px solid #2271b1;
    font-size: 0.95em;
    line-height: 1.6;
}

.rwc-cl-detail strong {
    color: #1d2327;
}

.rwc-cl-detail-empty {
    color: #646970;
    font-style: italic;
}

/* No-results message */
.rwc-no-results {
    padding: 12px 16px;
    background: #f6f7f7;
    border-left: 3px solid #c3c4c7;
    color: #50575e;
}

/* =============================================================================
   Calendar — List View
   ============================================================================= */
.rwc-cal-list .rwc-cal-events {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rwc-cal-event {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 14px 0;
}

.rwc-cal-event + .rwc-cal-event {
    border-top: 1px solid #ededed;
}

/* Boxed date "card" */
.rwc-cal-date {
    flex: 0 0 auto;
    width: 84px;
    text-align: center;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #f7f7f7;
    padding: 8px 4px 10px;
    line-height: 1.15;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.rwc-cal-date .rwc-cal-dow,
.rwc-cal-date .rwc-cal-month {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a4a4a;
}

.rwc-cal-date .rwc-cal-day {
    display: block;
    font-size: 2.1rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-top: 2px;
    letter-spacing: -0.5px;
}

/* Right-hand info column */
.rwc-cal-event-info {
    flex: 1 1 auto;
    min-width: 0;
}

.rwc-cal-time {
    font-size: 0.92rem;
    color: #555;
    margin-bottom: 3px;
    text-align: center;
}

.rwc-cal-title {
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.25;
    color: #1a1a1a;
}

.rwc-cal-title.rwc-has-desc {
    cursor: pointer;
}

.rwc-cal-title.rwc-has-desc:hover {
    color: #2271b1;
}

.rwc-cal-location {
    font-size: 0.92rem;
    color: #555;
    margin-top: 3px;
}

/* Club name badge under event title */
.rwc-cal-club {
    font-size: 0.78rem;
    color: #777;
    margin-top: 1px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

/* Description preview: plain text, muted, sits below location */
.rwc-cal-desc-preview {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.45;
    margin-top: 5px;
}

/* "...more" inline button — looks like a plain link, no button chrome */
.rwc-cal-more {
    display: inline;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    color: #2271b1;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    vertical-align: baseline;
}

.rwc-cal-more:hover {
    color: #135e96;
}

/* On narrow screens, keep the date card left and let text wrap */
@media (max-width: 480px) {
    .rwc-cal-event { gap: 14px; }
    .rwc-cal-date { width: 70px; }
    .rwc-cal-date .rwc-cal-day { font-size: 1.8rem; }
    .rwc-cal-title { font-size: 1.1rem; }
    .rwc-cal-time { text-align: left; }
}

/* =============================================================================
   Calendar — Modal Popup
   ============================================================================= */
.rwc-cal-modal {
    display: none !important;       /* hidden by default; theme resets cannot unhide */
    position: fixed !important;
    inset: 0 !important;
    /* Maximum possible z-index — beats Bootstrap navbars, sticky headers,
       page-builder mega-menus, and the WordPress admin bar (z-index:99999) */
    z-index: 2147483647 !important;
    align-items: center;
    justify-content: center;
}
/* Class added by JS openModal() — display:flex with !important beats any theme rule */
.rwc-cal-modal.rwc-cal-modal--open {
    display: flex !important;
}
/* Prevent body scroll-bleed when calendar modal is open */
body.rwc-modal-open {
    overflow: hidden !important;
}

.rwc-cal-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.rwc-cal-modal-box {
    position: relative;
    background: #fff;
    border-radius: 6px;
    max-width: 560px;
    width: calc(100% - 32px);   /* 16px margin each side on mobile */
    max-height: 88vh;
    overflow-y: auto;
    padding: 20px 22px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1;
    /* Prevent body scroll bleed-through on iOS */
    -webkit-overflow-scrolling: touch;
}

.rwc-cal-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    background: none;
    font-size: 28px;
    line-height: 1;
    color: #646970;
    cursor: pointer;
}

.rwc-cal-modal-close:hover {
    color: #1d2327;
}

.rwc-cal-modal-club {
    font-size: 0.78em;
    font-weight: 700;
    color: #17458F;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: -4px 0 10px;
}

.rwc-cal-modal-title {
    margin: 0 0 10px;
    padding-right: 30px;
}

.rwc-cal-modal-when {
    color: #50575e;
    font-size: 0.95em;
    margin-bottom: 12px;
}

.rwc-cal-modal-loc,
.rwc-cal-modal-speaker,
.rwc-cal-modal-topic {
    margin-bottom: 6px;
}

.rwc-cal-modal-desc {
    margin-top: 12px;
    line-height: 1.6;
}

.rwc-cal-modal-loading,
.rwc-cal-modal-error {
    text-align: center;
    color: #646970;
    padding: 20px;
}

/* =============================================================================
   Calendar — Page View (subscribe bar + color key)
   ============================================================================= */
.rwc-cal-subscribe {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 2px;
    margin-top: 10px;
    font-size: 0.85em;
}
.rwc-cal-subscribe-label {
    font-weight: 600;
    color: #444;
    margin-right: 2px;
    white-space: nowrap;
}
.rwc-cal-sub-btn {
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none !important;
    color: #333 !important;
    font-size: 0.8em;
    font-weight: 500;
    line-height: 1.2;
    transition: opacity 0.15s, transform 0.15s;
    background: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
.rwc-cal-sub-btn:hover {
    opacity: 0.8;
    transform: translateY(-1px);
    background: none !important;
    color: #17458F !important;
    text-decoration: none !important;
}
.rwc-cal-sub-icon {
    width: 36px;
    height: 36px;
    display: block;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.rwc-cal-sub-btn span {
    display: block;
    text-align: center;
}

.rwc-cal-colorkey {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rwc-cal-key-item {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.85em;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* =============================================================================
   Calendar — Color key: collapsed by default (details/summary)
   ============================================================================= */
.rwc-cal-colorkey-wrap {
    margin-top: 16px;
}
.rwc-cal-colorkey-wrap summary {
    cursor: pointer;
    font-size: 0.85em;
    color: #646970;
    user-select: none;
    margin-bottom: 8px;
}
.rwc-cal-colorkey-wrap summary:hover { color: #17458F; }

/* =============================================================================
   Calendar — FullCalendar Rotary Theme Overrides
   ============================================================================= */

/* ── Toolbar / navigation ─────────────────────────────────────────────────── */
.rwc-calendar-page .fc-toolbar {
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px !important;
}

.rwc-calendar-page .fc-toolbar h2 {
    font-size: 1.25rem !important;
    font-weight: 700;
    color: #17458F;
    line-height: 1.2;
}

.rwc-calendar-page .fc-button,
.rwc-calendar-page .fc-button-group .fc-button {
    background-color: #17458F !important;
    background-image: none !important;
    border-color: #17458F !important;
    border-radius: 4px !important;
    color: #fff !important;
    font-size: 0.875rem !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 5px 14px !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.rwc-calendar-page .fc-button:hover,
.rwc-calendar-page .fc-button:focus {
    background-color: #0f2d63 !important;
    border-color: #0f2d63 !important;
    outline: none !important;
}
.rwc-calendar-page .fc-button.fc-state-active,
.rwc-calendar-page .fc-button:active,
.rwc-calendar-page .fc-button.fc-state-down {
    background-color: #EAAA00 !important;
    border-color: #c89200 !important;
    color: #fff !important;
    box-shadow: none !important;
}
/* Prev/next arrows */
.rwc-calendar-page .fc-prev-button,
.rwc-calendar-page .fc-next-button {
    padding: 5px 10px !important;
}

/* ── Day headers (Mon, Tue …) ─────────────────────────────────────────────── */
.rwc-calendar-page .fc-day-header {
    background-color: #17458F !important;
    color: #fff !important;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 0 !important;
    border-color: #17458F !important;
}

/* ── Calendar grid ─────────────────────────────────────────────────────────── */
.rwc-calendar-page .fc-bg td,
.rwc-calendar-page .fc-row td {
    border-color: #e0e0e0 !important;
}
.rwc-calendar-page .fc-head-container.fc-widget-header {
    border-color: #17458F !important;
}

/* Today highlight */
.rwc-calendar-page .fc-today {
    background: #fef7e0 !important;  /* soft Rotary gold tint */
}
.rwc-calendar-page .fc-today .fc-day-number {
    background: #EAAA00;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Day numbers */
.rwc-calendar-page .fc-day-number {
    font-size: 0.85rem;
    color: #3c3c3c;
    padding: 4px 6px !important;
    float: right;
}
.rwc-calendar-page .fc-other-month .fc-day-number {
    color: #bbb;
}

/* ── Events ──────────────────────────────────────────────────────────────────*/
.rwc-calendar-page .fc-event {
    border: none !important;
    border-radius: 3px !important;
    padding: 1px 5px !important;
    font-size: 0.78rem !important;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.rwc-calendar-page .fc-event:hover { opacity: 0.85; }
.rwc-calendar-page .fc-event-title { font-weight: 600; }
.rwc-calendar-page .fc-event-time  { font-weight: 400; opacity: 0.85; }

/* More events "+N more" */
.rwc-calendar-page .fc-more {
    font-size: 0.78rem;
    color: #17458F;
    font-weight: 600;
}

/* ── Popover ("+N more" expansion) ──────────────────────────────────────────*/
.rwc-calendar-page .fc-popover {
    border-radius: 6px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18) !important;
    border: none !important;
}
.rwc-calendar-page .fc-popover .fc-header {
    background: #17458F !important;
    color: #fff !important;
    border-radius: 6px 6px 0 0 !important;
    padding: 6px 10px !important;
}
.rwc-calendar-page .fc-popover .fc-header .fc-close {
    color: #fff !important;
    opacity: 0.8;
}
.rwc-calendar-page .fc-popover .fc-body { padding: 6px !important; }

/* ── Subscribe bar ───────────────────────────────────────────────────────────*/


/* ── Responsive ──────────────────────────────────────────────────────────────*/
@media (max-width: 480px) {
    .rwc-cal-sub-icon { width: 42px; height: 42px; }
    .rwc-cal-subscribe { gap: 14px; }
}

@media (max-width: 640px) {
    .rwc-calendar-page .fc-toolbar {
        justify-content: center !important;
    }
    .rwc-calendar-page .fc-toolbar h2 {
        font-size: 1rem !important;
        text-align: center;
        width: 100%;
    }
    .rwc-calendar-page .fc-event-time { display: none; }
}

/* ── Modal: compact mobile sizing ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .rwc-cal-modal-box {
        width: calc(100% - 20px);  /* only 10px margin each side */
        max-width: 100%;
        padding: 14px 14px 18px;
        max-height: 92vh;
        border-radius: 8px;
    }
    .rwc-cal-modal-title {
        font-size: 1em !important;
        margin-bottom: 8px !important;
    }
    .rwc-cal-modal-when {
        font-size: 0.82em !important;
    }
    .rwc-cal-modal-loc,
    .rwc-cal-modal-speaker,
    .rwc-cal-modal-topic {
        font-size: 0.82em !important;
    }
    .rwc-cal-modal-desc {
        font-size: 0.82em !important;
        line-height: 1.5 !important;
    }
    .rwc-cal-modal-more {
        margin-top: 10px !important;
        padding-top: 8px !important;
    }
    .rwc-cal-more-info-link {
        font-size: 0.8em !important;
        padding: 4px 12px !important;
    }
    .rwc-cal-modal-close {
        font-size: 22px !important;
        top: 6px !important;
        right: 8px !important;
    }
}

/* ============================================================================
   NEWSLETTERS & DOCUMENTS  (v1.9.0)
   ============================================================================ */

.rwc-newsletters-grouped {}

.rwc-newsletter-folder {
    margin-bottom: 1.5em;
}
.rwc-newsletter-folder-name {
    font-size: 1em;
    font-weight: 700;
    color: #17458F;
    border-bottom: 2px solid #17458F;
    padding-bottom: 4px;
    margin: 0 0 0.5em;
}

.rwc-newsletter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.rwc-newsletter-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    line-height: 1.4;
}
.rwc-newsletter-item:last-child { border-bottom: none; }

.rwc-newsletter-icon {
    flex-shrink: 0;
    display: inline-block;
    width: 14px;
    height: 14px;
    background: #17458F;
    border-radius: 2px;
    opacity: 0.7;
    position: relative;
    top: 2px;
}
.rwc-icon-pdf    { background: #c0392b; }
.rwc-icon-word   { background: #2a5abf; }
.rwc-icon-excel  { background: #1e7e45; }
.rwc-icon-ppt    { background: #c75c22; }
.rwc-icon-image  { background: #8e44ad; }
.rwc-icon-file   { background: #555; }

.rwc-newsletter-link {
    color: #17458F;
    text-decoration: none;
    font-weight: 500;
}
.rwc-newsletter-link:hover { text-decoration: underline; }

.rwc-newsletter-meta {
    color: #666;
    font-size: 0.85em;
    white-space: nowrap;
}

/* ============================================================================
   SPEAKERS  (v1.9.0)
   ============================================================================ */

/* Table view */
.rwc-speakers-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1em;
}
.rwc-speakers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}
.rwc-speakers-table th {
    background: #17458F;
    color: #fff;
    text-align: left;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.9em;
    letter-spacing: 0.03em;
}
.rwc-speakers-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.rwc-speakers-table tbody tr:last-child td { border-bottom: none; }
.rwc-speakers-table tbody tr:nth-child(even) { background: #f7f8fc; }
.rwc-col-date    { white-space: nowrap; width: 110px; color: #17458F; font-weight: 600; }
.rwc-col-topic   { color: #333; }
.rwc-speaker-name  { display: block; }
.rwc-speaker-org   { color: #555; font-size: 0.88em; }

/* Card view */
.rwc-speakers-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}
.rwc-speaker-card {
    display: flex;
    gap: 1em;
    align-items: flex-start;
    padding: 1em;
    border: 1px solid #dde3f0;
    border-radius: 6px;
    background: #fafbff;
}
.rwc-speaker-photo img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #17458F;
    flex-shrink: 0;
}
.rwc-speaker-info { flex: 1; }
.rwc-speaker-info .rwc-speaker-name  { font-size: 1.05em; display: block; }
.rwc-speaker-info .rwc-speaker-org   { color: #555; font-size: 0.9em; margin-bottom: 4px; }
.rwc-speaker-date   { color: #17458F; font-size: 0.88em; margin-bottom: 4px; font-weight: 600; }
.rwc-speaker-topic  { margin-bottom: 6px; font-size: 0.93em; }
.rwc-speaker-bio    { font-size: 0.9em; color: #333; line-height: 1.6; }

@media (max-width: 560px) {
    .rwc-speaker-card { flex-direction: column; }
    .rwc-speaker-photo img { width: 72px; height: 72px; }
}

/* ============================================================================
   COMMITTEES  (v1.9.0)
   ============================================================================ */

.rwc-committees-list {
    margin: 0;
    padding: 0;
}

.rwc-committee-item {
    border: 1px solid #dde3f0;
    border-radius: 5px;
    margin-bottom: 6px;
    overflow: hidden;
}

.rwc-committee-summary {
    cursor: pointer;
    padding: 10px 14px;
    background: #f0f4fb;
    font-weight: 600;
    color: #17458F;
    user-select: none;
    list-style: none; /* hide default arrow on some browsers */
}
.rwc-committee-summary::-webkit-details-marker { display: none; }
.rwc-committee-summary::before {
    content: '▶ ';
    font-size: 0.75em;
    color: #EAAA00;
}
.rwc-committee-item[open] .rwc-committee-summary::before {
    content: '▼ ';
}
.rwc-committee-summary:hover { background: #dde3f0; }

.rwc-committee-chair-summary {
    font-weight: 400;
    color: #555;
    font-size: 0.88em;
    margin-left: 6px;
}

.rwc-committee-detail {
    padding: 10px 16px 14px;
}

.rwc-committee-detail-inner {}

.rwc-committee-chair {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.rwc-committee-chair-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #17458F;
    flex-shrink: 0;
}
.rwc-committee-chair-info { font-size: 0.95em; }
.rwc-committee-chair-name { font-weight: 600; }

.rwc-committee-members {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 1.5em;
}
.rwc-committee-member {
    padding: 3px 0;
    font-size: 0.93em;
    break-inside: avoid;
}
.rwc-committee-member-role {
    color: #666;
    font-size: 0.88em;
}

@media (max-width: 480px) {
    .rwc-committee-members { columns: 1; }
}


/* ============================================================================
   DISTRICT LEADERSHIP PAGE  (v2.1.0)
   Photo size and shape are driven by CSS custom properties set inline on the
   .rwc-leadership-page wrapper element from PHP:
     --rwc-photo-size      : width/height in px  (default 100px)
     --rwc-photo-radius    : border-radius value  (circle = size/2; square = 6px)
     --rwc-hero-name-color : color for hero name text (default #ffffff)
   ============================================================================ */

/* ── Page defaults ─────────────────────────────────────────────────────────── */
.rwc-leadership-page {
    --rwc-photo-size: 100px;
    --rwc-photo-radius: 100px;   /* overridden per-instance by PHP */
    --rwc-hero-name-color: #ffffff;
    max-width: 1100px;
}

/* ── Section headings ──────────────────────────────────────────────────────── */
.rwc-leadership-section-heading {
    font-size: 1.4em;
    font-weight: 700;
    color: #17458F;
    border-bottom: 3px solid #EAAA00;
    padding-bottom: 8px;
    margin: 2em 0 1em;
}

/* ── Governor Hero Card ─────────────────────────────────────────────────────── */
.rwc-leadership-hero {
    display: flex;
    align-items: center;
    gap: 2em;
    background: linear-gradient(135deg, #17458F 0%, #0f2d63 100%);
    color: #fff;
    border-radius: 10px;
    padding: 2em 2.5em;
    margin-bottom: 0.5em;
    box-shadow: 0 4px 18px rgba(23,69,143,.18);
}

/* Hero photo — uses custom property for size; radius doubles for circle */
.rwc-leadership-hero-photo img {
    width: calc(var(--rwc-photo-size) * 1.6);
    height: calc(var(--rwc-photo-size) * 1.6);
    object-fit: cover;
    /* For circle: radius = 50%; for square: use --rwc-photo-radius value.
       We detect circle by comparing --rwc-photo-radius to the size value.
       Simplest cross-browser: always use 50% for the hero and let card use --rwc-photo-radius. */
    border-radius: var(--rwc-photo-radius);
    border: 4px solid #EAAA00;
    flex-shrink: 0;
    display: block;
}

.rwc-leadership-hero-info { flex: 1; }

/* Name color driven entirely by the custom property */
.rwc-leadership-hero-name {
    font-size: 2em;
    font-weight: 800;
    margin: 0 0 0.15em;
    color: var(--rwc-hero-name-color);
    line-height: 1.2;
}

.rwc-leadership-hero-club {
    font-size: 1em;
    color: #EAAA00;
    font-weight: 600;
    margin-bottom: 4px;
}
.rwc-leadership-hero-club a { color: #EAAA00; text-decoration: none; }
.rwc-leadership-hero-club a:hover { text-decoration: underline; }

.rwc-leadership-hero-position {
    font-size: 1.1em;
    color: rgba(255,255,255,.85);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}

.rwc-leadership-hero-phone {
    font-size: .9em;
    color: rgba(255,255,255,.75);
    margin-bottom: 8px;
}

/* Contact button — shared base for both link and popup-button variants */
.rwc-leadership-contact-btn,
button.rwc-leadership-contact-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 22px;
    background: #EAAA00;
    color: #fff;
    font-weight: 700;
    font-size: .9em;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s;
    letter-spacing: .03em;
    font-family: inherit;
    line-height: 1.4;
}
.rwc-leadership-contact-btn:hover,
button.rwc-leadership-contact-btn:hover { background: #c8920a; color: #fff; text-decoration: none; }

/* ── Person Card Grid ───────────────────────────────────────────────────────── */
.rwc-leadership-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25em;
    margin-bottom: .5em;
    justify-content: center;  /* centers all rows including partial last row */
}

/* Card widths by column count — calc subtracts gap to keep total width exact */
.rwc-leadership-cols-1 .rwc-leadership-card { width: 100%; }
.rwc-leadership-cols-2 .rwc-leadership-card { width: calc(50% - 0.625em); }
.rwc-leadership-cols-3 .rwc-leadership-card { width: calc(33.333% - 0.84em); }
.rwc-leadership-cols-4 .rwc-leadership-card { width: calc(25% - 0.94em); }

.rwc-leadership-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid #dde3f0;
    border-radius: 8px;
    padding: 1.25em 1em 1em;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    transition: box-shadow .18s, transform .18s;
}
.rwc-leadership-card:hover {
    box-shadow: 0 4px 16px rgba(23,69,143,.12);
    transform: translateY(-2px);
}

.rwc-leadership-card-photo { margin-bottom: .75em; }

/* Card photos — size and shape both from custom properties */
.rwc-leadership-card-photo img {
    width: var(--rwc-photo-size);
    height: var(--rwc-photo-size);
    object-fit: cover;
    border-radius: var(--rwc-photo-radius);
    border: 3px solid #17458F;
    display: block;
}

.rwc-leadership-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rwc-leadership-card-name {
    display: block;
    font-size: 1.02em;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 3px;
    line-height: 1.3;
}

.rwc-leadership-card-club {
    font-size: .82em;
    color: #17458F;
    font-weight: 600;
    margin-bottom: 4px;
}
.rwc-leadership-card-club a { color: #17458F; text-decoration: none; }
.rwc-leadership-card-club a:hover { text-decoration: underline; }

.rwc-leadership-card-position {
    font-size: .82em;
    color: #555;
    margin-bottom: 4px;
    line-height: 1.3;
}
.rwc-leadership-card-phone { font-size: .8em; color: #666; margin-bottom: 4px; }

/* Card contact link/button */
.rwc-leadership-contact-link,
button.rwc-leadership-contact-link {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 14px;
    background: #17458F;
    color: #fff;
    font-size: .8em;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    letter-spacing: .03em;
    transition: background .15s;
    font-family: inherit;
    line-height: 1.4;
}
.rwc-leadership-contact-link:hover,
button.rwc-leadership-contact-link:hover { background: #0f2d63; color: #fff; text-decoration: none; }

/* Actions row in each card */
.rwc-leadership-card-actions,
.rwc-leadership-hero-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

/* Card profile-link: same size/style as contact-link, different background color */
.rwc-leadership-profile-link,
a.rwc-leadership-profile-link {
    display: inline-block;
    padding: 4px 14px;
    background: #17458F;
    color: #fff;
    font-size: .8em;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: .03em;
    transition: background .15s;
    font-family: inherit;
    cursor: pointer;
}
.rwc-leadership-profile-link:hover,
a.rwc-leadership-profile-link:hover { background: #0f2d63; color:#fff; text-decoration:none; }

/* Hero profile-btn: same size/style as contact-btn, different background color */
.rwc-leadership-profile-btn,
a.rwc-leadership-profile-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 22px;
    background: #17458F;
    color: #fff;
    font-weight: 700;
    font-size: .9em;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    letter-spacing: .03em;
    transition: background .18s;
    font-family: inherit;
    line-height: 1.4;
}
.rwc-leadership-profile-btn:hover,
a.rwc-leadership-profile-btn:hover { background: #0f2d63; color:#fff; text-decoration:none; }

/* ── Contact Popup Modal ────────────────────────────────────────────────────── */
.rwc-leadership-modal {
    display: none;           /* hidden by default */
    position: fixed;
    inset: 0;                /* shorthand for top/right/bottom/left: 0 */
    z-index: 99990;
    background: rgba(0,0,0,.6);
    align-items: center;
    justify-content: center;
    padding: 1em;
    overflow-y: auto;
}
/* JS adds this class to show the modal */
.rwc-leadership-modal--open {
    display: flex;
}

/* Prevent body scrolling while modal is open (class added by JS) */
body.rwc-modal-open { overflow: hidden; }

.rwc-leadership-modal-inner {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,.35);
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* height grows with iframe content */
}

.rwc-leadership-modal-close-bar {
    /* Thin top bar housing the close button — no large white gap */
    display: flex;
    justify-content: flex-end;
    background: #17458F;
    padding: 4px 6px;
    flex-shrink: 0;
}
.rwc-leadership-modal-close {
    background: transparent;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 1.2em;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s;
    flex-shrink: 0;
}
.rwc-leadership-modal-close:hover { opacity: 0.8; }

.rwc-leadership-modal-frame {
    flex: 1;
    width: 100%;
    min-height: 520px;
    border: none;
    display: block;
    /* No margin — iframe fills from just below close button */
    margin-top: 0;
    height: 100%;
}
/* ismyrotary source needs extra vertical space for their form */
.rwc-leadership-modal--ismyrotary .rwc-leadership-modal-frame {
    min-height: 600px;
}
.rwc-leadership-modal--dacdb .rwc-leadership-modal-frame {
    min-height: 480px;
}

.rwc-cal-modal-more {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e0e4ef;
    text-align: right;
}
.rwc-cal-login-note {
    font-size: 0.72em;
    color: #888;
    font-style: italic;
    text-align: right;
    margin-top: 4px;
}
.rwc-cal-more-info-link {
    display: inline-block;
    padding: 5px 14px;
    background: #17458F;
    color: #fff !important;
    font-size: .85em;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none !important;
    letter-spacing: .03em;
    transition: background .15s;
}
.rwc-cal-more-info-link:hover { background: #0f2d63; }

/* ── Admin — color picker row ──────────────────────────────────────────────── */
.rwc-color-field-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rwc-color-picker {
    width: 40px;
    height: 32px;
    padding: 1px 3px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    cursor: pointer;
    background: none;
}
.rwc-color-hex {
    width: 90px !important;
    font-family: monospace;
    text-transform: uppercase;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .rwc-leadership-cols-4 .rwc-leadership-card { width: calc(33.333% - 0.84em); }
}
@media (max-width: 700px) {
    .rwc-leadership-hero {
        flex-direction: column;
        text-align: center;
        padding: 1.5em 1.25em;
        gap: 1.25em;
    }
    .rwc-leadership-hero-name { font-size: 1.5em; }
    .rwc-leadership-cols-3 .rwc-leadership-card,
    .rwc-leadership-cols-4 .rwc-leadership-card { width: calc(50% - 0.625em); }
}
@media (max-width: 480px) {
    .rwc-leadership-cols-2 .rwc-leadership-card,
    .rwc-leadership-cols-3 .rwc-leadership-card,
    .rwc-leadership-cols-4 .rwc-leadership-card { width: 100%; }
    .rwc-leadership-modal-inner { min-height: 80vh; }
}

/* Popup trigger buttons inherit the same appearance as their context class.
   This selector exists as a hook for JS; visual styling comes from the
   rwc-leadership-contact-btn and rwc-leadership-contact-link classes. */
button.rwc-leadership-contact-trigger {
    /* Appearance inherits from rwc-leadership-contact-btn / -link sibling rules */
    appearance: none;
    -webkit-appearance: none;
}
