/*!
 * Helderkruin Activity Directory — frontend styles
 *
 * Sections:
 *   1. Wrapper + tokens
 *   2. Toolbar (search, filter, add)
 *   3. Category chips
 *   4. Card grid
 *   5. Modal (add/edit form)
 *   6. Defensive button reset (counters Hello Theme / Elementor button CSS)
 *   7. Mobile
 */

/* =========================================================================
   1. WRAPPER + TOKENS
   ========================================================================= */
.hkav-wrapper {
    --hkav-navy:        #15204D;
    --hkav-red:         #E71615;
    --hkav-blue:        #7096C8;
    --hkav-bg:          #F6F8FC;
    --hkav-border:      #E5EAF3;
    --hkav-text:        #15204D;
    --hkav-muted:       #55627E;
    --hkav-shadow:      0 14px 30px -16px rgba(21, 32, 77, 0.18);
    --hkav-shadow-hov:  0 22px 44px -18px rgba(21, 32, 77, 0.26);

    width: 100%;
    font-family: 'Montserrat', sans-serif;
    color: var(--hkav-text);
    box-sizing: border-box;
}

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

/* =========================================================================
   2. TOOLBAR
   Defensive !important rules on the input + select so theme button/form
   styles can't bleed through. Same approach as the buttons block below.
   ========================================================================= */

/* Manager-mode banner — only rendered for authorised users. Makes it
   immediately obvious they have add/edit/delete powers, and points
   clearly at the primary "Voeg nuwe aktiwiteit by" button. */
.hkav-wrapper .hkav-manage-banner {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding: 14px 20px !important;
    background: linear-gradient(135deg, #15204D 0%, #1f2c5e 100%) !important;
    color: #FFFFFF !important;
    border-radius: 16px !important;
    margin: 0 0 18px 0 !important;
    box-shadow: 0 8px 22px -10px rgba(21, 32, 77, 0.4) !important;
}

.hkav-wrapper .hkav-manage-banner__left {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    min-width: 0 !important;
    flex: 1 1 280px !important;
}

.hkav-wrapper .hkav-manage-banner__pulse {
    width: 10px !important;
    height: 10px !important;
    border-radius: 999px !important;
    background: #E71615 !important;
    box-shadow: 0 0 0 0 rgba(231, 22, 21, 0.7) !important;
    animation: hkav-banner-pulse 2s cubic-bezier(0.66, 0, 0, 1) infinite !important;
    flex-shrink: 0 !important;
}

@keyframes hkav-banner-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(231, 22, 21, 0.6); }
    70%  { box-shadow: 0 0 0 14px rgba(231, 22, 21, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 22, 21, 0); }
}

.hkav-wrapper .hkav-manage-banner__title {
    font-family: 'Bebas Neue', sans-serif !important;
    font-size: 16px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    color: #FFFFFF !important;
    line-height: 1 !important;
}

.hkav-wrapper .hkav-manage-banner__hint {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    line-height: 1.3 !important;
}

@media (prefers-reduced-motion: reduce) {
    .hkav-wrapper .hkav-manage-banner__pulse {
        animation: none !important;
    }
}

.hkav-wrapper .hkav-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: center !important;
    margin: 0 0 18px 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.hkav-wrapper .hkav-toolbar__search {
    position: relative !important;
    flex: 1 1 280px !important;
    min-width: 0 !important;
}

.hkav-wrapper .hkav-toolbar__search > i,
.hkav-wrapper .hkav-toolbar__search > svg,
.hkav-wrapper .hkav-toolbar__search > .hkav-icon {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #55627E !important;
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
    pointer-events: none !important;
    z-index: 2 !important;
    margin: 0 !important;
}

.hkav-wrapper .hkav-search {
    width: 100% !important;
    height: 46px !important;
    padding: 0 16px 0 42px !important;
    border: 1px solid #E5EAF3 !important;
    background: #FFFFFF !important;
    border-radius: 999px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    color: #15204D !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
    line-height: 1.4 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.hkav-wrapper .hkav-search:focus {
    border-color: #7096C8 !important;
    box-shadow: 0 0 0 3px rgba(112, 150, 200, 0.2) !important;
}

.hkav-wrapper .hkav-search::placeholder {
    color: #97a4bf !important;
    opacity: 1 !important;
}

.hkav-wrapper .hkav-toolbar__filters {
    flex: 0 1 auto !important;
}

.hkav-wrapper .hkav-filter-grade {
    height: 46px !important;
    padding: 0 36px 0 16px !important;
    border: 1px solid #E5EAF3 !important;
    background-color: #FFFFFF !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='%2355627E'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 10px 7px !important;
    border-radius: 999px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #15204D !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    line-height: 1.4 !important;
}

.hkav-wrapper .hkav-filter-grade:focus {
    border-color: #7096C8 !important;
    box-shadow: 0 0 0 3px rgba(112, 150, 200, 0.2) !important;
}

/* =========================================================================
   3. CATEGORY CHIPS
   Defensive !important rules everywhere — Hello Theme and Elementor both
   inject aggressive button styles that bleed through (e.g. pink-on-pink
   active state, faded borders). Lock everything down so the chips render
   identically regardless of active theme.
   ========================================================================= */
.hkav-wrapper .hkav-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 0 24px 0 !important;
    padding: 0 0 4px 0 !important;
    list-style: none !important;
    background: transparent !important;
    border: none !important;
}

.hkav-wrapper .hkav-chip {
    --hkav-chip-accent: #15204D;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 9px 16px !important;
    border: 1.5px solid #15204D !important;
    background: #FFFFFF !important;
    border-radius: 999px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #15204D !important;
    cursor: pointer !important;
    transition: background 0.2s ease, color 0.2s ease,
                border-color 0.2s ease, transform 0.2s ease,
                box-shadow 0.25s ease !important;
    line-height: 1 !important;
    letter-spacing: 0.3px !important;
    text-transform: none !important;
    box-shadow: 0 2px 6px -2px rgba(21, 32, 77, 0.12) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    outline: none !important;
    min-height: 0 !important;
    height: auto !important;
}

.hkav-wrapper .hkav-chip:hover:not(.is-active) {
    border-color: var(--hkav-chip-accent) !important;
    color: var(--hkav-chip-accent) !important;
    background: #FFFFFF !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 14px -6px var(--hkav-chip-accent) !important;
}

.hkav-wrapper .hkav-chip:focus-visible {
    outline: 3px solid rgba(112, 150, 200, 0.4) !important;
    outline-offset: 2px !important;
}

.hkav-wrapper .hkav-chip.is-active {
    background: var(--hkav-chip-accent) !important;
    border-color: var(--hkav-chip-accent) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 14px -4px color-mix(in srgb, var(--hkav-chip-accent) 60%, transparent) !important;
    transform: translateY(-1px) !important;
}

.hkav-wrapper .hkav-chip.is-active:hover {
    background: var(--hkav-chip-accent) !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
}

.hkav-wrapper .hkav-chip__emoji {
    font-size: 15px !important;
    line-height: 1 !important;
    display: inline-block !important;
    /* Reset filter so emojis render in their native colour, not tinted
       by the chip's text colour */
    filter: none !important;
}

/* The "Alle" chip uses navy as its accent (it has no per-chip accent set);
   ensure its hover/active shadow look matches the others. */
.hkav-wrapper .hkav-chip[data-hkav-cat=""] {
    --hkav-chip-accent: #15204D;
}

/* =========================================================================
   4. CARD GRID
   ========================================================================= */
.hkav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.hkav-card {
    --hkav-card-accent: var(--hkav-navy);
    position: relative;
    background: #FFFFFF;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--hkav-shadow);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.hkav-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hkav-shadow-hov);
}

/* Logo header — the tinted band at the top of the card */
.hkav-card__logo-wrap {
    position: relative;
    height: 160px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--hkav-card-accent) 12%, white) 0%,
        color-mix(in srgb, var(--hkav-card-accent) 4%, white) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 4px solid var(--hkav-card-accent);
    overflow: hidden;
}

/* Uploaded logo fills the entire tinted area edge-to-edge.
   `object-fit: cover` ensures the logo fills the box without distortion;
   `object-position: center` keeps the most important part of the logo
   in view if any cropping happens at the edges. */
.hkav-card__logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hkav-card__logo-placeholder {
    width: 84px;
    height: 84px;
    border-radius: 999px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    box-shadow: 0 4px 12px -3px rgba(21, 32, 77, 0.15);
}

.hkav-card__cat-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--hkav-card-accent);
    letter-spacing: 0.4px;
    box-shadow: 0 4px 10px -3px rgba(0, 0, 0, 0.15);
}

/* Body */
.hkav-card__body {
    padding: 18px 20px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hkav-card__name {
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 0.8px;
    line-height: 1.1;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--hkav-text);
}

.hkav-card__grades {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.hkav-card__grade {
    padding: 3px 9px;
    background: var(--hkav-bg);
    color: var(--hkav-muted);
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.hkav-card__contact-name {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--hkav-muted);
    font-size: 13px;
    font-weight: 500;
}

.hkav-card__contact-name i {
    color: var(--hkav-card-accent);
    font-size: 11px;
}

.hkav-card__desc {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--hkav-muted);
}

/* Action row */
.hkav-card__actions {
    padding: 12px 20px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Manage controls (admin only) */
.hkav-card__manage {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 3;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.hkav-card:hover .hkav-card__manage,
.hkav-card:focus-within .hkav-card__manage {
    opacity: 1;
    transform: translateY(0);
}

/* On mobile, always show the manage controls (no hover) */
@media (hover: none) {
    .hkav-card__manage {
        opacity: 1;
        transform: none;
    }
}

/* =========================================================================
   5. EMPTY STATE
   ========================================================================= */
.hkav-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 30px;
    color: var(--hkav-muted);
}

.hkav-empty i {
    font-size: 38px;
    color: color-mix(in srgb, var(--hkav-muted) 30%, white);
    margin-bottom: 14px;
}

.hkav-empty p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

/* =========================================================================
   6. MODAL (add/edit form)
   ========================================================================= */
.hkav-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.hkav-modal[hidden] {
    display: none;
}

.hkav-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 30, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hkav-modal__panel {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    background: #FFFFFF;
    border-radius: 22px;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    color: var(--hkav-text, #15204D);
}

.hkav-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #E5EAF3;
    flex-shrink: 0;
}

.hkav-modal__title {
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #15204D;
    font-weight: 400;
}

.hkav-modal__close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #F6F8FC;
    border: none;
    color: #15204D;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.18s ease;
    flex-shrink: 0;
}

.hkav-modal__close:hover {
    background: #E5EAF3;
    transform: rotate(90deg);
}

.hkav-modal__form {
    padding: 22px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.hkav-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.hkav-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.hkav-field__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #55627E;
}

.hkav-field__required {
    color: #E71615;
    margin-left: 2px;
}

.hkav-field__hint {
    font-size: 11.5px;
    color: #55627E;
    margin-top: 2px;
    font-style: italic;
}

.hkav-field__input,
.hkav-field__textarea,
.hkav-field__select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E5EAF3;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    color: #15204D;
    background: #FFFFFF;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.hkav-field__textarea {
    resize: vertical;
    min-height: 70px;
    line-height: 1.5;
}

.hkav-field__select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    background: #FFFFFF
        url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='%2355627E'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E")
        no-repeat right 14px center / 10px 7px;
    cursor: pointer;
}

.hkav-field__input:focus,
.hkav-field__textarea:focus,
.hkav-field__select:focus {
    border-color: #7096C8;
    box-shadow: 0 0 0 3px rgba(112, 150, 200, 0.2);
}

.hkav-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 0;
}

.hkav-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1.5px solid #E5EAF3;
    border-radius: 999px;
    background: #FFFFFF;
    font-size: 12.5px;
    font-weight: 600;
    color: #15204D;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hkav-checkbox:has(input:checked) {
    border-color: #15204D;
    background: #15204D;
    color: #FFFFFF;
}

.hkav-checkbox input[type="checkbox"] {
    /* Hide native checkbox; pill colour change is the indicator */
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Logo uploader */
.hkav-field--logo {
    align-items: stretch;
}

.hkav-logo-uploader {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hkav-logo-uploader__preview {
    width: 100px;
    height: 100px;
    border-radius: 14px;
    background: #F6F8FC;
    border: 2px dashed #E5EAF3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #97a4bf;
    font-size: 26px;
    flex-shrink: 0;
    overflow: hidden;
}

.hkav-logo-uploader__preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #FFFFFF;
}

.hkav-logo-uploader__hint {
    font-size: 10.5px;
    color: #97a4bf;
    margin-top: 4px;
    text-align: center;
    line-height: 1.2;
}

.hkav-logo-uploader__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.hkav-logo-uploader__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.hkav-logo-uploader__spinner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #55627E;
}

.fa-spin {
    animation: hkav-spin 0.9s linear infinite;
}

@keyframes hkav-spin {
    100% { transform: rotate(360deg); }
}

.hkav-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    background: #F6F8FC;
    border-top: 1px solid #E5EAF3;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.hkav-modal__feedback {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
    color: #55627E;
}

.hkav-modal__feedback.is-success { color: #2e7d32; font-weight: 600; }
.hkav-modal__feedback.is-error   { color: #E71615; font-weight: 600; }

/* =========================================================================
   7. DEFENSIVE BUTTON RESET
   These aggressively override Hello Theme / Elementor button CSS so the
   plugin's buttons always render with school CI styling regardless of
   the active theme.
   ========================================================================= */
.hkav-wrapper .hkav-btn,
.hkav-modal  .hkav-btn,
.hkav-card .hkav-card__manage-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 16px !important;
    border: none !important;
    border-radius: 999px !important;
    background: #FFFFFF !important;
    color: #15204D !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px -4px rgba(21, 32, 77, 0.15) !important;
    transition: transform 0.18s ease, box-shadow 0.2s ease,
                background 0.2s ease, color 0.2s ease !important;
    white-space: nowrap !important;
    letter-spacing: 0.3px !important;
}

.hkav-wrapper .hkav-btn:hover,
.hkav-modal  .hkav-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 18px -6px rgba(21, 32, 77, 0.25) !important;
}

.hkav-wrapper .hkav-btn:disabled,
.hkav-modal  .hkav-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Variants */
.hkav-wrapper .hkav-btn--primary,
.hkav-modal  .hkav-btn--primary {
    background: #15204D !important;
    color: #FFFFFF !important;
}

.hkav-wrapper .hkav-btn--primary:hover,
.hkav-modal  .hkav-btn--primary:hover {
    background: #0e1738 !important;
}

.hkav-wrapper .hkav-btn--secondary,
.hkav-modal  .hkav-btn--secondary {
    background: #F0F3F9 !important;
    color: #15204D !important;
}

.hkav-wrapper .hkav-btn--ghost,
.hkav-modal  .hkav-btn--ghost {
    background: transparent !important;
    color: #55627E !important;
    box-shadow: none !important;
}

.hkav-wrapper .hkav-btn--ghost:hover,
.hkav-modal  .hkav-btn--ghost:hover {
    background: #F0F3F9 !important;
    color: #15204D !important;
}

.hkav-wrapper .hkav-btn--whatsapp {
    background: #25D366 !important;
    color: #FFFFFF !important;
    flex: 1 1 auto !important;
}

.hkav-wrapper .hkav-btn--whatsapp:hover {
    background: #1ebe5a !important;
}

.hkav-wrapper .hkav-btn--phone {
    background: #15204D !important;
    color: #FFFFFF !important;
    flex: 1 1 auto !important;
}

.hkav-wrapper .hkav-btn--phone:hover {
    background: #0e1738 !important;
}

.hkav-wrapper .hkav-btn--icon {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    background: #F6F8FC !important;
    color: #15204D !important;
}

.hkav-wrapper .hkav-btn--icon:hover {
    background: #E5EAF3 !important;
}

/* Force inner icon glyphs to render visibly — themes can hide <i> or strip
   SVG fill via `currentColor` not propagating to <path>. */
.hkav-wrapper .hkav-btn--whatsapp i,
/* Inline SVG icon styling — applies to every <svg class="hkav-icon">
   inserted by HKAV_Icons::svg(). The SVG itself is sized via
   width="1em" height="1em" attributes so it scales to the parent
   font-size. These rules just ensure the SVG can't be hidden or
   recoloured by theme CSS. */
.hkav-wrapper .hkav-icon,
.hkav-card    .hkav-icon,
.hkav-modal   .hkav-icon {
    display: inline-block !important;
    width: 1em !important;
    height: 1em !important;
    line-height: 1 !important;
    fill: currentColor !important;
    color: inherit !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    vertical-align: -0.125em;
}

.hkav-wrapper .hkav-icon path,
.hkav-card    .hkav-icon path,
.hkav-modal   .hkav-icon path {
    fill: currentColor !important;
}

/* Icon font-size per button context — these set the visual size of
   the SVG via the parent's font-size (since the SVG is 1em). */
.hkav-wrapper .hkav-btn--whatsapp,
.hkav-wrapper .hkav-btn--phone {
    font-size: 14px !important;
}

.hkav-wrapper .hkav-btn--icon {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    background: #F6F8FC !important;
    color: #15204D !important;
    font-size: 16px !important;
}

.hkav-wrapper .hkav-btn--icon:hover {
    background: #E5EAF3 !important;
}

.hkav-btn__label {
    font-size: 13px;
    line-height: 1.2;
}

/* Card manage buttons (small circular edit/delete) — defensive
   rules force the icon glyph to render visibly against theme CSS
   that may otherwise hide or recolour it. */
.hkav-card .hkav-card__manage-btn {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px -3px rgba(0, 0, 0, 0.2) !important;
    color: #15204D !important;
    flex-shrink: 0 !important;
    font-size: 15px !important;
}

.hkav-card .hkav-card__manage-btn:hover {
    background: #FFFFFF !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.25) !important;
}

.hkav-card .hkav-card__manage-btn--delete:hover {
    background: #E71615 !important;
    color: #FFFFFF !important;
}

.hkav-card .hkav-card__manage-btn--edit {
    color: #15204D !important;
}

.hkav-card .hkav-card__manage-btn--delete {
    color: #E71615 !important;
}

/* Add button — banner version is the primary discoverable CTA: big,
   red, oversized so a first-time manager can't miss it. */
.hkav-wrapper .hkav-btn--add-banner {
    height: 48px !important;
    padding: 0 22px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    background: #E71615 !important;
    color: #FFFFFF !important;
    box-shadow: 0 8px 18px -4px rgba(231, 22, 21, 0.5) !important;
    flex-shrink: 0 !important;
}

.hkav-wrapper .hkav-btn--add-banner:hover {
    background: #c11313 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 24px -6px rgba(231, 22, 21, 0.6) !important;
}

/* Add button — toolbar version is a smaller secondary access point so
   experienced managers can add an activity without scrolling back up. */
.hkav-wrapper .hkav-btn--add-toolbar {
    height: 46px !important;
    padding: 0 18px !important;
    font-size: 13px !important;
    background: #15204D !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 14px -6px rgba(21, 32, 77, 0.4) !important;
}

.hkav-wrapper .hkav-btn--add-toolbar:hover {
    background: #0e1738 !important;
    transform: translateY(-2px) !important;
}

/* =========================================================================
   8. MOBILE
   ========================================================================= */
@media (max-width: 640px) {
    .hkav-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .hkav-toolbar__search,
    .hkav-toolbar__filters,
    .hkav-wrapper .hkav-btn--add-banner,
    .hkav-wrapper .hkav-btn--add-toolbar {
        width: 100% !important;
    }
    .hkav-filter-grade {
        width: 100%;
    }
    .hkav-wrapper .hkav-manage-banner {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
    }
    .hkav-wrapper .hkav-manage-banner__left {
        justify-content: center !important;
        text-align: center !important;
    }
    .hkav-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .hkav-modal {
        padding: 0;
    }
    .hkav-modal__panel {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    .hkav-field-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hkav-card,
    .hkav-card__manage,
    .hkav-chip,
    .hkav-modal__close {
        transition: none;
    }
    .fa-spin { animation: none; }
}
