/* ==========================
   Meetings Page
   ========================== */

.meetings-page {
    padding: 3rem 0 4rem;
    background: #f8fafc;
    min-height: 65vh;
}

.meetings-page h1 {
    margin-bottom: 1.5rem;

    color: var(--color-secondary);
    font-size: clamp(2rem, 4vw, 2.5rem);
}

.meetings-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.meeting-subscribe-link {
    text-decoration: none;
}

.meetings-section-title {
    margin: 2.5rem 0 1rem;

    color: var(--color-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.meetings-section-title:first-of-type {
    margin-top: 0;
}

.meetings-empty {
    color: var(--color-secondary);
}

.meeting-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    list-style: none;
}

.meeting-card {
    position: relative;

    display: flex;
    gap: 1.5rem;

    padding: 1.5rem;

    background: #fff;
    border: 1px solid rgb(17 52 86 / 10%);
    border-radius: 12px;

    box-shadow: 0 4px 12px rgb(17 52 86 / 6%);

    transition: box-shadow .2s ease, transform .2s ease;
}

/* The whole card is clickable via .meeting-card-link's stretched
   ::after (see below), not by wrapping the <li> itself in an <a> -
   the card also holds a staff-only form/buttons that can't legally
   nest inside a link. .meeting-actions is lifted above the overlay
   with z-index so those controls stay independently clickable. */
.meeting-card-linked:hover {
    box-shadow: 0 8px 20px rgb(17 52 86 / 12%);
    transform: translateY(-1px);
}

.meeting-card-link {
    color: inherit;
    text-decoration: none;
}

.meeting-card-link:hover {
    text-decoration: underline;
}

.meeting-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.meeting-view-details {
    color: var(--color-secondary);
    font-weight: 600;
}

.meeting-card-linked:hover .meeting-view-details {
    color: var(--color-primary);
}

.meeting-card-linked:hover .meeting-view-details .arrow {
    transform: translateX(4px);
}

.meeting-view-details .arrow {
    display: inline-block;
    transition: transform .2s ease;
}

.meeting-card-past {
    opacity: 0.75;
}

.meeting-card-cancelled {
    border-color: rgb(218 65 68 / 30%);
}

.meeting-actions {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .5rem;

    flex-shrink: 0;
    align-self: center;
    margin-left: auto;
}

.meeting-action-button {
    padding: .5rem 1rem;

    background: none;
    border: 2px solid currentColor;
    border-radius: 6px;

    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;

    transition: background .2s ease, color .2s ease;
}

.meeting-action-cancel {
    color: var(--color-primary);
}

.meeting-action-cancel:hover {
    background: var(--color-primary);
    color: #fff;
}

.meeting-action-uncancel {
    color: var(--color-secondary);
}

.meeting-action-uncancel:hover {
    background: var(--color-secondary);
    color: #fff;
}

.meeting-action-link {
    color: var(--color-secondary);

    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    text-decoration: underline;
    white-space: nowrap;
}

.meeting-action-link:hover {
    color: var(--color-primary);
}

.meeting-files {
    display: flex;
    gap: 1.25rem;
}

.meeting-file-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;

    color: var(--color-secondary);
    font-weight: 600;
    text-decoration: none;
}

.meeting-file-link:hover {
    color: var(--color-primary);
}

.meeting-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 4.5rem;
    height: 4.5rem;

    background: var(--color-secondary);
    border-radius: 10px;

    color: #fff;
}

.meeting-date-month {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.meeting-date-day {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.meeting-details h3 {
    margin: 0 0 0.4rem;

    color: var(--color-secondary);
    font-size: 1.15rem;
}

.meeting-meta {
    margin: 0 0 0.25rem;

    color: #475569;
    font-size: 0.9rem;
}

.meeting-description {
    margin-top: 0.6rem;

    color: #334155;
    line-height: 1.6;
}

.meeting-badge {
    display: inline-block;

    padding: 0.15rem 0.5rem;
    margin-left: 0.4rem;

    background: var(--color-primary);
    border-radius: 4px;

    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.meeting-badge-past {
    background: #64748b;
}

/* Labels an event's type (Fly-Out, Airshow, ...) on the all-events
   calendar, where entries of different types are mixed together -
   meetings.html doesn't need this since every entry there already is
   one. Navy rather than red/gray so it doesn't read as a status like
   the cancelled/past badges above. */
.meeting-badge-type {
    background: var(--color-secondary);
}

.meeting-detail {
    max-width: 45rem;
}

.meeting-detail-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;

    margin-bottom: 1.5rem;

    color: var(--color-secondary);
    font-weight: 600;
    text-decoration: none;
}

.meeting-detail-back:hover {
    color: var(--color-primary);
}

.meeting-detail-card .meeting-details h1 {
    margin: 0 0 .5rem;

    color: var(--color-secondary);
    font-size: clamp(1.4rem, 3vw, 1.85rem);
}

.meeting-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;

    margin-top: 1.5rem;
}

.meeting-detail-actions form {
    margin: 0;
}

/* Officers' list of a meeting's extra attachments, each with Remove. */
.meeting-attachments-manage {
    margin-top: 1.75rem;
}

.meeting-attachments-manage h2 {
    margin: 0 0 .75rem;

    color: var(--color-secondary);
    font-size: 1.1rem;
}

.meeting-attachments-manage ul {
    display: flex;
    flex-direction: column;
    gap: .5rem;

    list-style: none;
}

.meeting-attachments-manage li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    padding: .6rem .9rem;

    background: #fff;
    border: 1px solid rgb(17 52 86 / 10%);
    border-radius: 8px;

    color: var(--color-secondary);
}

.meeting-attachments-manage form {
    margin: 0;
}

@media (max-width: 600px) {
    .meeting-card {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Officer controls: one wrapping row along the bottom of the card,
       instead of a column pinned to the right edge. */
    .meeting-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        align-self: stretch;
        gap: .75rem 1.25rem;

        margin-left: 0;
        padding-top: .9rem;

        border-top: 1px solid rgb(17 52 86 / 10%);
    }

    .meetings-toolbar {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .meeting-files {
        flex-wrap: wrap;
        gap: .6rem 1.25rem;
    }
}
