/* =========================================================
   HORIZON BEE AFRICA — DASHBOARD: EVENTS
   Uses the dashboard styles in products.css (header, buttons,
   tabs, fields); this file only adds what the Events page needs.
   ========================================================= */

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}


/* ---------------------------------------------------------
   LIST
   --------------------------------------------------------- */

.event-admin-list {
    display: grid;
    gap: 10px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.event-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;

    padding: 12px;

    background: var(--white);
    border: 1px solid var(--line);
}

.event-thumb {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    height: 80px;

    overflow: hidden;

    background: #f4f1ea;
}

.event-thumb img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

.event-thumb.is-date {
    flex-direction: column;
    gap: 2px;

    background: var(--brown);

    color: #ffffff;
}

.event-thumb.is-date strong {
    font-size: 22px;
    line-height: 1;
}

.event-thumb.is-date span {
    color: var(--gold);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.event-info {
    display: grid;
    gap: 3px;

    min-width: 0;
}

.event-info strong {
    overflow: hidden;

    font-size: 15px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.event-info span {
    color: var(--text-soft);

    font-size: 13px;
}

.event-info .event-info-more {
    color: var(--muted);

    font-size: 12.5px;
}

.event-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.event-actions a.btn {
    text-decoration: none;
}

.pill-ev-published { background: var(--green-soft); color: var(--green); }
.pill-ev-draft { background: #f1efea; color: #6b655a; }
.pill-ev-ended { background: #eeeeee; color: #6e6e6e; }
.pill-ev-cancelled { background: var(--red-soft); color: var(--red); }


/* ---------------------------------------------------------
   DIALOG
   --------------------------------------------------------- */

.event-dialog {
    width: min(1120px, calc(100% - 24px));
    max-height: calc(100vh - 32px);
    padding: 0;

    background: var(--white);
    border: 0;
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);

    color: var(--text);
}

.event-dialog::backdrop {
    background: rgba(28, 20, 4, 0.55);
}

.event-form {
    display: flex;
    flex-direction: column;

    max-height: calc(100vh - 32px);
}

.event-dialog-head,
.event-dialog-foot {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 14px 20px;
}

.event-dialog-head {
    justify-content: space-between;

    border-bottom: 1px solid var(--line);
}

.event-dialog-head h2 {
    margin: 0;

    font-size: 18px;
}

.event-dialog-status {
    margin: 2px 0 0;

    color: var(--muted);

    font-size: 12.5px;
}

.event-dialog-close {
    width: 36px;
    height: 36px;

    background: transparent;
    border: 0;
    border-radius: 50%;

    color: var(--text-soft);

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

.event-dialog-close:hover {
    background: var(--gold-soft);
    color: var(--brown);
}

.event-dialog-body {
    flex: 1;

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    align-items: start;
    gap: 28px;

    padding: 18px 20px;

    overflow-y: auto;
}

.event-dialog-foot {
    border-top: 1px solid var(--line);
}

.event-dialog-foot .spacer {
    flex: 1;
}

.event-group-title {
    display: flex;
    align-items: baseline;
    gap: 8px;

    margin: 22px 0 12px;
    padding-top: 16px;

    border-top: 1px solid var(--line);

    color: var(--brown);

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event-group-title:first-child {
    margin-top: 0;
    padding-top: 0;

    border-top: 0;
}

.event-group-title .hint {
    color: var(--muted);

    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.event-dialog fieldset {
    margin: 0 0 16px;
    padding: 0;

    border: 0;
}

.event-dialog .field-row {
    margin-bottom: 16px;
}

.event-dialog .field-row .field {
    margin-bottom: 0;
}

.event-dialog .checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin: 18px 0 4px;

    font-weight: 500;
}

.event-dialog .checkbox[hidden] {
    display: none;
}

.event-dialog .choice input,
.event-dialog .checkbox input {
    flex: 0 0 auto;

    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 2px 0 0;
    padding: 0;

    accent-color: var(--brown);
}


/* How it runs */

.event-mode {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 12px;

    border: 1px solid var(--line);
    border-radius: 8px;

    cursor: pointer;
}

.choice:has(input:checked) {
    border-color: var(--brown);
    background: #fdfaf2;
}

.choice span {
    display: grid;
    gap: 2px;

    color: var(--text-soft);

    font-size: 12.5px;
}

.choice strong {
    color: var(--text);

    font-size: 14px;
}

.event-help {
    margin: -4px 0 12px;

    color: var(--muted);

    font-size: 12.5px;
}

.event-help a {
    color: var(--brown);
}

.event-help a:hover {
    color: var(--gold);
}


/* Poster */

.poster-pick {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.poster-pick img {
    flex: 0 0 auto;

    width: 110px;
    height: 138px;

    object-fit: contain;

    background: #f4f1ea;
    border: 1px solid var(--line);
}

.poster-pick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.poster-pick-actions .hint {
    flex-basis: 100%;

    color: var(--muted);

    font-size: 12.5px;
}


/* Preview */

.event-preview {
    position: sticky;
    top: 0;

    padding: 12px;

    background: var(--bg);
    border: 1px solid var(--line);
}

.event-preview-label {
    display: block;

    margin-bottom: 8px;

    color: var(--muted);

    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.event-preview .hint {
    margin: 8px 0 0;

    color: var(--muted);

    font-size: 12px;
}

.event-preview-empty {
    margin: 0;
    padding: 28px 12px;

    background: var(--white);
    border: 1px dashed var(--line);

    color: var(--muted);

    font-size: 13px;
    text-align: center;
}

/* The preview is narrow: stack its poster above the text */
.event-preview .ev-card {
    grid-template-columns: 1fr;
    gap: 14px;

    padding: 14px;
}

.event-preview .ev-card.no-poster {
    grid-template-columns: 64px minmax(0, 1fr);
}

.event-preview .ev-card.no-poster .ev-date {
    width: 64px;
    height: 64px;
}

.event-preview .ev-card.no-poster .ev-body {
    grid-column: 1 / -1;
}

.event-preview .ev-poster {
    aspect-ratio: auto;
    max-height: 360px;
}

.event-preview .ev-poster img {
    height: auto;
    max-height: 360px;
}

.event-preview .ev-title {
    font-size: 18px;
}

.event-preview .ev-actions {
    pointer-events: none;
}

.form-message {
    margin: 12px 0 0;
    padding: 10px 12px;

    background: var(--red-soft);
    border-radius: 8px;

    color: var(--red);

    font-size: 13.5px;
}


/* ---------------------------------------------------------
   TABLETS AND PHONES
   --------------------------------------------------------- */

@media (max-width: 960px) {

    .event-dialog-body {
        grid-template-columns: 1fr;
    }

    .event-preview {
        position: static;
    }
}

@media (max-width: 760px) {

    .event-row {
        grid-template-columns: 56px minmax(0, 1fr) auto;
        gap: 12px;
    }

    .event-thumb {
        width: 56px;
        height: 70px;
    }

    .event-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .event-actions .btn {
        flex: 1;
    }

    .event-mode {
        grid-template-columns: 1fr;
    }

    .event-dialog .field-row {
        grid-template-columns: 1fr;
    }

    .event-dialog-foot {
        flex-wrap: wrap;
    }

    .event-dialog-foot .spacer {
        display: none;
    }

    .event-dialog-foot .btn {
        flex: 1 1 auto;
    }
}
