/* ============================================================================
   ICOPAD — Events & Activities
   PRD: §5, §10, §14, §19, §20
   ============================================================================ */

/* Reuse .directory-filters, .filter-bar, .active-filters, .directory-empty
   from organisations.css — no duplication needed. */

.events-filters {
    /* Small adjustment to the sticky offset for the slightly taller filter bar */
    padding-block: 1.25rem;
}

/* ── Section shell ─────────────────────────────────────────────────── */

.events-section {
    padding-block: clamp(2rem, 1.5rem + 3vw, 4rem);
}
.events-section + .events-section {
    border-top: 1px solid var(--border-subtle, #eaeaea);
}

.events-section__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.events-section__eyebrow {
    font-size: .6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--brand, #0a4d8c);
    margin: 0 0 6px;
}
.events-section__title {
    font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    margin: 0;
    color: var(--text, #111);
    text-wrap: balance;
}
.events-section__count {
    font-size: .875rem;
    color: var(--text-muted, #666);
    margin: 0;
    font-variant-numeric: tabular-nums;
}

/* ── Event grid ────────────────────────────────────────────────────── */

.event-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px)  { .event-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .event-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }

.event-card {
    position: relative;
}
.event-card__link {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 1.25rem;
    height: 100%;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 20px;
    color: inherit;
    text-decoration: none;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
    position: relative;
}
.event-card__link:hover,
.event-card__link:focus-visible {
    border-color: color-mix(in srgb, var(--brand, #0a4d8c) 40%, var(--border, #e5e5e5));
    transform: translateY(-3px);
    box-shadow:
        0 1px 2px rgb(0 0 0 / .04),
        0 18px 36px -18px color-mix(in srgb, var(--brand, #0a4d8c) 40%, transparent);
    outline: none;
}

/* Date block */
.event-card__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--brand, #0a4d8c) 12%, transparent);
    color: var(--brand, #0a4d8c);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    flex-shrink: 0;
}
.event-card__date-month {
    font-size: .625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .85;
}
.event-card__date-day {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 2px 0;
}
.event-card__date-year {
    font-size: .625rem;
    font-weight: 700;
    opacity: .75;
}

/* Optional cover image — full width above the body if present */
.event-card__media {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-subtle, #f3f3f3);
    margin-top: -4px;
}
.event-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.event-card__link:hover .event-card__media img {
    transform: scale(1.04);
}

/* Body */
.event-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.event-card__type {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    font-size: .625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--bg-muted, #f1f1f1);
    color: var(--text-muted, #555);
}
.event-card__type--icopad-organised { background: #dbeafe; color: #1e40af; }
.event-card__type--icopad-attended  { background: #e0e7ff; color: #3730a3; }
.event-card__type--member-event     { background: #d1fae5; color: #065f46; }
.event-card__type--external-event   { background: #fef3c7; color: #92400e; }

.event-card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: var(--text, #111);
    letter-spacing: -.01em;
    text-wrap: balance;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card__time,
.event-card__location,
.event-card__org {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    font-size: .8125rem;
    line-height: 1.5;
    color: var(--text-muted, #555);
    margin: 0;
}
.event-card__time svg,
.event-card__location svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--brand, #0a4d8c);
}
.event-card__tz {
    color: var(--text-subtle, #888);
    font-size: .75rem;
}
.event-card__org {
    font-style: italic;
    color: var(--text-subtle, #777);
}

.event-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 8px;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--brand, #0a4d8c);
    transition: gap .2s ease;
}
.event-card__link:hover .event-card__cta,
.event-card__link:focus-visible .event-card__cta {
    gap: 8px;
}
.event-card__cta svg {
    transition: transform .2s ease;
}
.event-card__link:hover .event-card__cta svg {
    transform: translateX(2px);
}

/* ── Past events — compact list ────────────────────────────────────── */

.event-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.event-list__item { margin: 0; }

.event-list__link {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface, #fff);
    border: 1px solid var(--border-subtle, #eaeaea);
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}
.event-list__link:hover,
.event-list__link:focus-visible {
    border-color: color-mix(in srgb, var(--brand, #0a4d8c) 30%, var(--border-subtle, #eaeaea));
    background: color-mix(in srgb, var(--brand, #0a4d8c) 3%, transparent);
    outline: none;
}

.event-list__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 48px;
    background: var(--bg-subtle, #fafafa);
    border-radius: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.event-list__date-day {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text, #111);
}
.event-list__date-month {
    font-size: .625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-subtle, #888);
}

.event-list__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.event-list__title {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--text, #111);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.event-list__meta {
    font-size: .75rem;
    color: var(--text-muted, #666);
}

.event-list__arrow {
    color: var(--text-subtle, #aaa);
    transition: transform .15s ease, color .15s ease;
}
.event-list__link:hover .event-list__arrow,
.event-list__link:focus-visible .event-list__arrow {
    color: var(--brand, #0a4d8c);
    transform: translateX(3px);
}

@media (max-width: 480px) {
    .event-list__link {
        grid-template-columns: 52px 1fr auto;
        gap: 12px;
        padding: 10px 12px;
    }
    .event-list__date { width: 52px; height: 44px; }
    .event-list__date-day { font-size: .875rem; }
}

/* ── Reduced motion ────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .event-card__link,
    .event-card__media img,
    .event-card__cta,
    .event-card__cta svg,
    .event-list__link,
    .event-list__arrow {
        transition-duration: .01ms !important;
    }
}


/* ============================================================================
   ICOPAD — Propose an event
   PRD: §10.3, §14, §17, §18, §19
   ============================================================================ */

.propose-section {
    padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

.propose-section__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 1024px) {
    .propose-section__grid {
        grid-template-columns: 320px 1fr;
        gap: clamp(2rem, 4vw, 4rem);
        align-items: start;
    }
}

/* ── Aside ─────────────────────────────────────────────────────────── */

.propose-aside {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
@media (min-width: 1024px) {
    .propose-aside {
        position: sticky;
        top: calc(var(--header-height, 72px) + 100px);
    }
}
.propose-aside__eyebrow {
    font-size: .6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--brand, #0a4d8c);
    margin: 0 0 4px;
}
.propose-aside__title {
    font-size: clamp(1.25rem, 1.1rem + .8vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.2;
    margin: 0;
    color: var(--text, #111);
    text-wrap: balance;
}

.propose-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}
.propose-steps::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--brand, #0a4d8c) 40%, transparent),
        transparent);
}
.propose-step {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    align-items: start;
    position: relative;
}
.propose-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand, #0a4d8c);
    color: #fff;
    font-size: .8125rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    z-index: 1;
}
.propose-step__title {
    font-size: .9375rem;
    font-weight: 700;
    margin: 4px 0 2px;
    color: var(--text, #111);
    letter-spacing: -.005em;
}
.propose-step__text {
    font-size: .8125rem;
    line-height: 1.5;
    color: var(--text-muted, #555);
    margin: 0;
    text-wrap: pretty;
}

.propose-aside__note {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    background: color-mix(in srgb, #f59e0b 8%, var(--surface, #fff));
    border: 1px solid color-mix(in srgb, #f59e0b 30%, var(--border, #e5e5e5));
    border-radius: 12px;
    margin-top: .25rem;
}
.propose-aside__note-icon {
    color: #b45309;
    flex-shrink: 0;
    margin-top: 1px;
}
.propose-aside__note p {
    font-size: .8125rem;
    line-height: 1.55;
    color: #78350f;
    margin: 0;
    text-wrap: pretty;
}

/* ── Form body ─────────────────────────────────────────────────────── */

.propose-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.propose-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .9375rem;
    line-height: 1.5;
}
.propose-alert--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}
.propose-alert--error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.propose-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 20px;
    box-shadow: 0 1px 2px rgb(0 0 0 / .03);
}

/* Grouped fieldsets */
.propose-form__group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    margin: 0;
    border: 0;
    border-top: 1px solid var(--border-subtle, #eaeaea);
    padding-top: 1.5rem;
}
.propose-form__group:first-of-type {
    border-top: 0;
    padding-top: 0;
}
.propose-form__legend {
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--text-subtle, #888);
    margin-bottom: .25rem;
    padding: 0;
}

.propose-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px) {
    .propose-form__grid--two { grid-template-columns: 1fr 1fr; }
}

.propose-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.propose-form__label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--text, #111);
}
.propose-form__label .req {
    color: #dc2626;
    font-weight: 700;
    margin-left: 2px;
}

.propose-form__field input[type="text"],
.propose-form__field input[type="email"],
.propose-form__field input[type="url"],
.propose-form__field input[type="datetime-local"],
.propose-form__field select,
.propose-form__field textarea {
    padding: 12px 14px;
    font: inherit;
    font-size: .9375rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d4d4d4);
    border-radius: 10px;
    color: var(--text, #111);
    transition: border-color .15s ease, box-shadow .15s ease;
    width: 100%;
}
.propose-form__field input:focus,
.propose-form__field select:focus,
.propose-form__field textarea:focus {
    outline: none;
    border-color: var(--brand, #0a4d8c);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #0a4d8c) 20%, transparent);
}
.propose-form__field textarea {
    resize: vertical;
    min-height: 140px;
    font-family: inherit;
}

.propose-form__field-foot {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}
.propose-form__counter {
    font-size: .75rem;
    color: var(--text-subtle, #888);
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}
.propose-form__counter[data-warn="true"] { color: #b45309; }

.propose-form__hint {
    font-size: .75rem;
    color: var(--text-subtle, #888);
    margin: 0;
    line-height: 1.5;
}
.propose-form__error {
    font-size: .8125rem;
    color: #b91c1c;
    margin: 0;
}

/* Radio group */
.propose-form__radio-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
@media (min-width: 640px) {
    .propose-form__radio-group { grid-template-columns: repeat(3, 1fr); }
}
.propose-form__


/* ============================================================================
   ICOPAD — Event detail
   PRD: §10.2, §10.4, §19, §20
   ============================================================================ */

.event-detail {
    padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

.event-detail__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 1024px) {
    .event-detail__grid {
        grid-template-columns: 1fr 340px;
        gap: clamp(2rem, 4vw, 4rem);
        align-items: start;
    }
}

/* ── Main column ───────────────────────────────────────────────────── */

.event-detail__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 760px;
}
.event-detail__head { margin-bottom: .25rem; }

.event-detail__eyebrow {
    font-size: .6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--brand, #0a4d8c);
    margin: 0 0 6px;
}
.event-detail__title {
    font-size: clamp(1.375rem, 1.1rem + 1.4vw, 1.875rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.2;
    margin: 0;
    color: var(--text, #111);
    text-wrap: balance;
}

.event-detail__prose {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text, #111);
    text-wrap: pretty;
}
.event-detail__prose br + br { content: ""; display: block; margin-top: .5em; }

.event-detail__callout {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: color-mix(in srgb, var(--brand, #0a4d8c) 4%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand, #0a4d8c) 15%, var(--border-subtle, #eaeaea));
    border-radius: 12px;
}
.event-detail__callout-icon {
    color: var(--brand, #0a4d8c);
    flex-shrink: 0;
    margin-top: 1px;
}
.event-detail__callout-title {
    font-size: .8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--brand, #0a4d8c);
    margin: 0 0 4px;
}
.event-detail__callout-text {
    font-size: .9375rem;
    line-height: 1.6;
    color: var(--text, #111);
    margin: 0;
    text-wrap: pretty;
}

.event-detail__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: .5rem;
}
.event-detail__cta .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ── Sidebar ───────────────────────────────────────────────────────── */

.event-detail__aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 1024px) {
    .event-detail__aside {
        position: sticky;
        top: calc(var(--header-height, 72px) + 100px);
    }
}

.detail-card {
    padding: 1.25rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.detail-card--soft {
    background: var(--bg-subtle, #fafafa);
    border-style: dashed;
}
.detail-card--share { padding: .875rem 1rem; }

.detail-card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-subtle, #888);
    margin: 0;
}
.detail-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--brand, #0a4d8c) 12%, transparent);
    color: var(--brand, #0a4d8c);
}

/* Definition lists — the primary data display */
.detail-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0;
}
.detail-list dt {
    font-size: .6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-subtle, #888);
    margin: 0;
}
.detail-list dd {
    font-size: .9375rem;
    line-height: 1.5;
    color: var(--text, #111);
    margin: 0 0 .25rem;
    font-weight: 500;
    text-wrap: pretty;
}
.detail-list__tz {
    display: inline-block;
    font-size: .75rem;
    color: var(--text-subtle, #888);
    margin-left: 4px;
}

.detail-card__text {
    font-size: .9375rem;
    line-height: 1.55;
    color: var(--text, #111);
    margin: 0;
    text-wrap: pretty;
}
.detail-card__subtext {
    font-size: .8125rem;
    color: var(--text-muted, #666);
    margin: 0;
}

.detail-card__action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-top: .25rem;
    font-size: .875rem;
    font-weight: 700;
    color: var(--brand, #0a4d8c);
    text-decoration: none;
    background: color-mix(in srgb, var(--brand, #0a4d8c) 8%, transparent);
    border-radius: 10px;
    transition: background-color .15s ease;
}
.detail-card__action:hover,
.detail-card__action:focus-visible {
    background: color-mix(in srgb, var(--brand, #0a4d8c) 15%, transparent);
    outline: none;
}

/* Format pill */
.pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.pill--in_person { background: #dbeafe; color: #1e40af; }
.pill--online    { background: #d1fae5; color: #065f46; }
.pill--hybrid    { background: #fef3c7; color: #92400e; }

/* Share list */
.share-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.share-list__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--text, #111);
    text-decoration: none;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 999px;
    transition: all .15s ease;
    cursor: pointer;
    font-family: inherit;
}
.share-list__link:hover,
.share-list__link:focus-visible {
    background: color-mix(in srgb, var(--brand, #0a4d8c) 8%, transparent);
    border-color: color-mix(in srgb, var(--brand, #0a4d8c) 30%, var(--border, #e5e5e5));
    color: var(--brand, #0a4d8c);
    outline: none;
}
.share-list__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Reduced motion ────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .detail-card__action,
    .share-list__link {
        transition-duration: .01ms !important;
    }
}


/* ============================================================================
   ICOPAD — Submit event form: single-org badge
   ============================================================================ */

.org-picker--single {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.org-picker__badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-size: .9375rem;
    font-weight: 700;
    color: var(--brand, #0a4d8c);
    background: color-mix(in srgb, var(--brand, #0a4d8c) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand, #0a4d8c) 25%, transparent);
    border-radius: 999px;
}

