/* =============================================================
   Helderkruin Events Calendar — Frontend Styles
   ============================================================= */

:root {
    --hkec-navy:   #15204D;
    --hkec-red:    #E71615;
    --hkec-blue:   #7096C0;
    --hkec-ink:    #1f2733;
    --hkec-muted:  #6b7280;
    --hkec-line:   #e6e8ee;
    --hkec-bg:     #fafbfc;
    --hkec-radius: 14px;
    --hkec-shadow: 0 6px 24px rgba(21,32,77,0.08);
    --hkec-shadow-lg: 0 14px 40px rgba(21,32,77,0.18);
    --hkec-cat: var(--hkec-navy); /* overridden per-card via inline style */
}

/* ============================================================= */
/* Wrapper + toolbar                                             */
/* ============================================================= */
.hkec-wrapper {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--hkec-ink);
    width: 100%;
    box-sizing: border-box;
}

.hkec-wrapper *,
.hkec-wrapper *::before,
.hkec-wrapper *::after { box-sizing: border-box; }

.hkec-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--hkec-navy);
    color: #fff;
    padding: 16px 22px;
    border-radius: var(--hkec-radius);
    margin-bottom: 18px;
    box-shadow: var(--hkec-shadow);
}
.hkec-toolbar__title {
    display: flex; align-items: center; gap: 12px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 1px;
}
.hkec-toolbar__title i { color: var(--hkec-red); }
.hkec-toolbar__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* =============================================================
   Button RESET — neutralises Hello Theme / Elementor defaults
   that try to colour, pad or reshape buttons inside this widget.
   Anything we then re-style below is locked with !important.
   ============================================================= */
.hkec-wrapper button,
.hkec-wrapper a.hkec-btn,
.hkec-modal button,
.hkec-modal a.hkec-btn {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
    box-shadow: none !important;
    line-height: 1 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.hkec-wrapper button:focus,
.hkec-wrapper a.hkec-btn:focus,
.hkec-modal button:focus {
    outline: 2px solid var(--hkec-blue) !important;
    outline-offset: 2px !important;
}

/* ============================================================= */
/* Buttons                                                       */
/* ============================================================= */
.hkec-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: 2px solid transparent !important;
    border-radius: 999px !important;
    padding: 9px 18px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease !important;
    text-decoration: none !important;
    background: #fff !important;
    color: var(--hkec-navy) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
}
.hkec-btn:hover {
    transform: translateY(-1px) !important;
    background: #fff !important;
    color: var(--hkec-navy) !important;
    border-color: var(--hkec-navy) !important;
}
.hkec-btn--primary {
    background: var(--hkec-red) !important;
    color: #fff !important;
    border-color: var(--hkec-red) !important;
}
.hkec-btn--primary:hover {
    background: #c41014 !important;
    border-color: #c41014 !important;
    color: #fff !important;
}
.hkec-btn--ghost {
    background: transparent !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.5) !important;
}
.hkec-toolbar .hkec-btn--ghost:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: #fff !important;
    color: #fff !important;
}
.hkec-btn--small { padding: 6px 12px !important; font-size: 12px !important; }

/* In modals/forms (light bg), ghost buttons use ink color */
.hkec-modal .hkec-btn--ghost,
.hkec-image-picker .hkec-btn--ghost,
.hkec-gallery-picker .hkec-btn--ghost {
    color: var(--hkec-navy) !important;
    border-color: var(--hkec-line) !important;
    background: #fff !important;
}
.hkec-modal .hkec-btn--ghost:hover {
    background: #f3f4f6 !important;
    color: var(--hkec-navy) !important;
    border-color: var(--hkec-navy) !important;
}

/* ============================================================= */
/* Filter pills                                                  */
/* ============================================================= */
.hkec-filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 0 18px;
    margin-bottom: 8px;
}
.hkec-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 14px !important;
    background: #fff !important;
    border: 2px solid var(--hkec-line) !important;
    border-radius: 999px !important;
    cursor: pointer !important;
    font: 600 13px 'Montserrat', sans-serif !important;
    color: var(--hkec-ink) !important;
    transition: all .15s ease !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
}
.hkec-pill:hover {
    border-color: var(--hkec-navy) !important;
    background: #fff !important;
    color: var(--hkec-ink) !important;
}
.hkec-pill.is-active {
    background: var(--hkec-navy) !important;
    color: #fff !important;
    border-color: var(--hkec-navy) !important;
}
.hkec-pill.is-active:hover {
    background: var(--hkec-navy) !important;
    color: #fff !important;
    border-color: var(--hkec-navy) !important;
}
.hkec-pill--all { padding: 8px 16px; }
.hkec-pill__day { font-family: 'Bebas Neue', sans-serif; font-size: 18px; line-height: 1; }
.hkec-pill__month { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.hkec-pill__year { font-size: 11px; opacity: 0.6; }

/* ============================================================= */
/* Empty state                                                   */
/* ============================================================= */
.hkec-empty {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 2px dashed var(--hkec-line);
    border-radius: var(--hkec-radius);
    color: var(--hkec-muted);
}
.hkec-empty i { font-size: 36px; color: var(--hkec-blue); margin-bottom: 12px; display: block; }
.hkec-empty p { margin: 0; font-size: 15px; }

/* ============================================================= */
/* Grid                                                          */
/* ============================================================= */
.hkec-grid {
    display: grid;
    grid-template-columns: repeat(var(--hkec-cols, 3), minmax(0, 1fr));
    gap: 22px;
}
@media (max-width: 980px) { .hkec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .hkec-grid { grid-template-columns: 1fr; } }

/* ============================================================= */
/* Card — flip mechanic                                          */
/* ============================================================= */
.hkec-card {
    position: relative;
    width: 100%;
    height: 460px;
    perspective: 1500px;
    border-radius: var(--hkec-radius);
}
.hkec-card__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: var(--hkec-radius);
}
.hkec-card.is-flipped .hkec-card__inner { transform: rotateY(180deg); }

.hkec-card__face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: #fff;
    border-radius: var(--hkec-radius);
    box-shadow: var(--hkec-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-top: 5px solid var(--hkec-cat);
}
.hkec-card__face--back {
    transform: rotateY(180deg);
    padding: 22px 22px 18px;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}
.hkec-card:hover .hkec-card__face { box-shadow: var(--hkec-shadow-lg); }

/* ============================================================= */
/* Card front                                                    */
/* ============================================================= */
.hkec-card__media {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f3f4f6;
    overflow: hidden;
    flex-shrink: 0;
}
.hkec-card__media img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.hkec-card:hover .hkec-card__media img { transform: scale(1.05); }
.hkec-card__media-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #cbd0d9; font-size: 48px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e6e8ee 100%);
}

.hkec-card__cat-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--hkec-cat);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font: 700 11px/1 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex; align-items: center; gap: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hkec-card__status {
    position: absolute;
    top: 12px; right: 12px;
    color: #fff;
    padding: 5px 11px;
    border-radius: 999px;
    font: 700 11px/1 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hkec-card__date-tile {
    position: absolute;
    bottom: 12px; right: 12px;
    background: #fff;
    color: var(--hkec-navy);
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    text-align: center;
    min-width: 56px;
    line-height: 1;
}
.hkec-card__date-tile-day {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 26px;
    color: var(--hkec-cat);
}
.hkec-card__date-tile-month {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 2px;
}

.hkec-card__front-body {
    padding: 16px 18px 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.hkec-card__icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--hkec-cat) 12%, white);
    color: var(--hkec-cat);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px;
    margin-bottom: 8px;
}
.hkec-card__title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    line-height: 1.15;
    margin: 0 0 10px;
    color: var(--hkec-navy);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.hkec-card__date-line,
.hkec-card__location-line {
    display: flex; align-items: center; gap: 8px;
    color: var(--hkec-muted);
    font-size: 13px;
    margin-bottom: 6px;
}
.hkec-card__date-line i,
.hkec-card__location-line i {
    color: var(--hkec-cat);
    font-size: 12px;
    width: 14px;
    text-align: center;
}

.hkec-card__flip-btn {
    margin-top: auto !important;
    align-self: stretch !important;
    background: var(--hkec-navy) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    font: 600 13px 'Montserrat', sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    transition: background .15s ease !important;
    box-shadow: none !important;
}
.hkec-card__flip-btn:hover {
    background: var(--hkec-cat) !important;
    color: #fff !important;
}

/* ============================================================= */
/* Card back                                                     */
/* ============================================================= */
.hkec-card__back-close {
    position: absolute !important; top: 12px !important; right: 12px !important;
    width: 32px !important; height: 32px !important;
    border-radius: 50% !important;
    background: var(--hkec-navy) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    font-size: 13px !important;
    padding: 0 !important;
    transition: background .15s ease !important;
    z-index: 2 !important;
    box-shadow: none !important;
}
.hkec-card__back-close:hover { background: var(--hkec-red) !important; color: #fff !important; }

.hkec-card__back-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    margin: 0 36px 10px 0;
    color: var(--hkec-navy);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.15;
}
.hkec-card__back-meta {
    display: flex; flex-wrap: wrap; gap: 4px 14px;
    margin-bottom: 12px;
    font-size: 12.5px;
    color: var(--hkec-muted);
}
.hkec-card__back-meta i {
    color: var(--hkec-cat);
    margin-right: 4px;
    font-size: 11px;
}
.hkec-card__back-desc {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--hkec-ink);
    overflow-y: auto;
    max-height: 180px;
    padding-right: 6px;
    flex-grow: 1;
    margin-bottom: 12px;
}
.hkec-card__back-desc p { margin: 0 0 8px; }
.hkec-card__back-desc p:last-child { margin-bottom: 0; }
.hkec-card__back-desc::-webkit-scrollbar { width: 4px; }
.hkec-card__back-desc::-webkit-scrollbar-thumb { background: var(--hkec-line); border-radius: 999px; }

.hkec-card__gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}
.hkec-card__gallery-item {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
}
.hkec-card__gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .25s ease;
}
.hkec-card__gallery-item:hover img { transform: scale(1.08); }

.hkec-card__back-footer { margin-top: auto; }

/* Action row: RSVP + WhatsApp side-by-side. Stacks on narrow cards. */
.hkec-card__actions {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.hkec-card__actions > * { flex: 1 1 0; min-width: 0; }
.hkec-card__actions--solo > * { flex: 1 1 100%; }

.hkec-card__rsvp-btn {
    width: 100% !important;
    background: var(--hkec-cat) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    font: 700 14px 'Montserrat', sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: filter .15s ease, transform .15s ease !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
.hkec-card__rsvp-btn:hover {
    filter: brightness(1.1) !important;
    transform: translateY(-1px) !important;
    color: #fff !important;
}

/* WhatsApp share button — school navy + WhatsApp icon (CI compliant).
   Sits next to the RSVP button when both are present, full-width otherwise. */
.hkec-card__share-btn {
    width: 100% !important;
    background: var(--hkec-navy) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    font: 700 14px 'Montserrat', sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: background .15s ease, transform .15s ease !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
.hkec-card__share-btn:hover {
    background: var(--hkec-red) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
}
.hkec-card__share-btn i { font-size: 16px !important; }

.hkec-card__cancelled-note {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.hkec-card__cancelled-note--past {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}

/* ============================================================= */
/* Card status overlays                                          */
/* ============================================================= */
.hkec-card--cancelled .hkec-card__face--front .hkec-card__media::after {
    content: "GEKANSELLEER";
    position: absolute; inset: 0;
    background: rgba(231,22,21,0.22);
    display: flex; align-items: center; justify-content: center;
    font: 800 22px 'Bebas Neue', sans-serif;
    color: #fff;
    letter-spacing: 4px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transform: rotate(-8deg);
    pointer-events: none;
}
.hkec-card--past .hkec-card__face--front { opacity: 0.78; filter: saturate(0.7); }
.hkec-card--past:hover .hkec-card__face--front { opacity: 1; filter: saturate(1); }

/* ============================================================= */
/* Manage controls (top-right of card when manager logged in)    */
/* ============================================================= */
.hkec-card-controls {
    position: absolute;
    top: -10px;
    right: 8px;
    display: flex;
    gap: 5px;
    z-index: 5;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease;
}
.hkec-card:hover .hkec-card-controls,
.hkec-card-controls:focus-within { opacity: 1; transform: translateY(0); }

.hkec-ctrl {
    width: 30px !important; height: 30px !important;
    border-radius: 50% !important;
    background: var(--hkec-navy) !important;
    color: #fff !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-family: 'Montserrat', sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    transition: background .15s ease, transform .15s ease !important;
}
.hkec-ctrl:hover { transform: scale(1.1) !important; background: var(--hkec-cat) !important; color: #fff !important; }
.hkec-ctrl--delete { background: var(--hkec-red) !important; }
.hkec-ctrl--delete:hover { background: #a30e0d !important; color: #fff !important; }

.hkec-card.hkec-is-draft .hkec-card__face { opacity: 0.55; }
.hkec-card.hkec-is-draft::before {
    content: "VERSTEEK";
    position: absolute;
    top: -8px; left: 12px;
    background: #6b7280;
    color: #fff;
    font: 700 10px 'Montserrat', sans-serif;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 999px;
    z-index: 4;
}

/* ============================================================= */
/* Modal                                                         */
/* ============================================================= */
.hkec-modal {
    position: fixed; inset: 0;
    z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: hkec-fadein .2s ease;
}
@keyframes hkec-fadein { from { opacity: 0; } to { opacity: 1; } }

.hkec-modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(21,32,77,0.55);
    backdrop-filter: blur(3px);
}
.hkec-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: var(--hkec-radius);
    box-shadow: 0 24px 60px rgba(0,0,0,0.3);
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: hkec-slideup .25s ease;
}
.hkec-modal__dialog--wide { max-width: 720px; }
@keyframes hkec-slideup { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.hkec-modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--hkec-line);
    background: var(--hkec-navy);
    color: #fff;
}
.hkec-modal__header h2 {
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 1px;
    display: flex; align-items: center; gap: 10px;
}
.hkec-modal__header h2 i { color: var(--hkec-red); }
.hkec-modal__close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s ease;
}
.hkec-modal__close:hover { background: var(--hkec-red); }

/* ============================================================= */
/* Form                                                          */
/* ============================================================= */
.hkec-form {
    padding: 22px 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.hkec-field { margin-bottom: 18px; }
.hkec-field > label,
.hkec-field > legend {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--hkec-navy);
    margin-bottom: 6px;
}
.hkec-field--row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.hkec-field--group {
    border: 1px solid var(--hkec-line);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
}
.hkec-field--group legend {
    padding: 0 6px;
    color: var(--hkec-cat, var(--hkec-navy));
}

.hkec-form input[type="text"],
.hkec-form input[type="email"],
.hkec-form input[type="tel"],
.hkec-form input[type="number"],
.hkec-form input[type="datetime-local"],
.hkec-form input[type="url"],
.hkec-form textarea,
.hkec-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--hkec-line);
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    color: var(--hkec-ink);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.hkec-form input:focus,
.hkec-form textarea:focus,
.hkec-form select:focus {
    outline: none;
    border-color: var(--hkec-navy);
    box-shadow: 0 0 0 3px rgba(21,32,77,0.1);
}
.hkec-form textarea { resize: vertical; min-height: 80px; }
.hkec-hint { font-size: 12px; color: var(--hkec-muted); margin: 6px 0 0; }

/* Pill group (category selector) */
.hkec-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #f3f4f6;
    padding: 6px;
    border-radius: 999px;
}
.hkec-pill-option {
    flex: 1 1 0;
    min-width: 90px;
    cursor: pointer;
    position: relative;
}
.hkec-pill-option input { position: absolute; opacity: 0; }
.hkec-pill-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 999px;
    font: 600 13px 'Montserrat', sans-serif;
    color: var(--hkec-muted);
    transition: all .15s ease;
}
.hkec-pill-option input:checked + span {
    background: var(--hkec-cat);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Toggle (slide pill switch) */
.hkec-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.hkec-toggle input { position: absolute; opacity: 0; width: 0; }
.hkec-toggle__slider {
    width: 42px;
    height: 24px;
    background: #d1d5db;
    border-radius: 999px;
    position: relative;
    transition: background .2s ease;
}
.hkec-toggle__slider::before {
    content: "";
    position: absolute;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px; left: 3px;
    transition: transform .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.hkec-toggle input:checked + .hkec-toggle__slider { background: var(--hkec-red); }
.hkec-toggle input:checked + .hkec-toggle__slider::before { transform: translateX(18px); }
.hkec-toggle__label { font-size: 13px; font-weight: 600; color: var(--hkec-ink); }

/* Image picker */
.hkec-image-picker__preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 2px dashed var(--hkec-line);
    border-radius: 10px;
    background: #f9fafb center/cover no-repeat;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd0d9;
    font-size: 36px;
}
.hkec-image-picker__preview.has-image {
    border-style: solid;
    border-color: var(--hkec-line);
}
.hkec-image-picker__preview.has-image::before { content: ""; }
.hkec-image-picker__buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* Upload-in-progress overlay (image preview + gallery placeholder) */
.hkec-image-picker__preview.is-loading,
.hkec-gallery-item.is-loading {
    position: relative;
    background-color: #f0f4f8;
}
.hkec-upload-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--hkec-navy, #15204D);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.78);
    z-index: 1;
}
.hkec-upload-spinner i { font-size: 22px; }

/* Gallery picker */
.hkec-gallery-picker__items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
    min-height: 60px;
}
.hkec-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6 center/cover no-repeat;
    border: 1px solid var(--hkec-line);
}
.hkec-gallery-item__remove {
    position: absolute; top: 4px; right: 4px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--hkec-red);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 10px;
    display: inline-flex; align-items: center; justify-content: center;
}

/* Icon picker */
.hkec-iconpicker {
    border: 1.5px solid var(--hkec-line);
    border-radius: 8px;
    background: #fff;
}
.hkec-iconpicker__current {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
}
.hkec-iconpicker__current i {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f3f4f6; border-radius: 6px;
    color: var(--hkec-navy);
    font-size: 14px;
}
.hkec-iconpicker__current span { flex-grow: 1; font-size: 13px; color: var(--hkec-muted); }
.hkec-iconpicker__current::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    color: var(--hkec-muted); font-size: 11px;
}
.hkec-iconpicker__panel {
    border-top: 1px solid var(--hkec-line);
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
}
.hkec-iconpicker__search {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--hkec-line);
    border-radius: 6px;
    margin-bottom: 8px;
    font: inherit; font-size: 13px;
}
.hkec-iconpicker__grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}
.hkec-iconpicker__option {
    aspect-ratio: 1;
    border: 1px solid transparent;
    background: #f9fafb;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
    color: var(--hkec-navy);
    transition: all .12s ease;
}
.hkec-iconpicker__option:hover {
    background: var(--hkec-navy);
    color: #fff;
}
.hkec-iconpicker__option.is-selected {
    background: var(--hkec-red);
    color: #fff;
}

/* Modal footer */
.hkec-modal__footer {
    border-top: 1px solid var(--hkec-line);
    padding: 14px 24px;
    background: #fafbfc;
    margin: 22px -24px -22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.hkec-form-message {
    font-size: 13px;
    font-weight: 600;
    flex-grow: 1;
}
.hkec-form-message.is-error  { color: #b91c1c; }
.hkec-form-message.is-success{ color: #15803d; }
.hkec-form-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* RSVP modal extras */
.hkec-rsvp-event-info {
    background: #f3f4f6;
    border-left: 4px solid var(--hkec-cat, var(--hkec-navy));
    padding: 10px 14px;
    border-radius: 6px;
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--hkec-ink);
}
.hkec-rsvp-event-info strong { color: var(--hkec-navy); display: block; margin-bottom: 2px; }

/* RSVPs viewer */
.hkec-rsvps-content {
    padding: 22px 24px;
    overflow-y: auto;
    max-height: 70vh;
}
.hkec-rsvps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.hkec-rsvps-table th,
.hkec-rsvps-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--hkec-line);
}
.hkec-rsvps-table th {
    background: #f3f4f6;
    font-weight: 700;
    color: var(--hkec-navy);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}
.hkec-rsvps-summary {
    background: var(--hkec-navy);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

/* Responsive */
@media (max-width: 600px) {
    .hkec-field--row { grid-template-columns: 1fr; }
    .hkec-modal { padding: 0; }
    .hkec-modal__dialog { max-height: 100vh; border-radius: 0; }
    .hkec-iconpicker__grid { grid-template-columns: repeat(6, 1fr); }
    .hkec-card { height: 480px; }
    .hkec-toolbar { padding: 14px 16px; }
    .hkec-toolbar__title { font-size: 18px; }
}
