.events-business {
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    font-size: .9rem;
}

.events-date-note {
    color: var(--muted);
    font-size: .85rem;
    margin: 0 0 16px;
}

.events-message {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
}

.events-message.is-error {
    color: var(--danger);
    background: var(--danger-bg);
}

.events-list {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr);
}

.event-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.event-image {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: .75rem;
    text-align: center;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-content {
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere;
}

.event-title {
    font-size: 1rem;
    line-height: 1.35;
    margin: 0 0 8px;
}

.event-meta {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.5;
}

.event-meta dt { font-weight: 600; }
.event-meta dd { margin: 0 0 4px; }

.event-status {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: .78rem;
    font-weight: 700;
}

.event-status--ongoing {
    color: var(--success);
    background: var(--success-bg);
}

.event-status--upcoming {
    color: var(--warning);
    background: var(--warning-bg);
}

.event-highlights {
    margin: 10px 0 0;
    font-size: .82rem;
    color: var(--muted);
}

@media (min-width: 640px) {
    .event-image { width: 100px; height: 100px; flex-basis: 100px; }
}

@media (min-width: 1200px) {
    .events-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.event-action {
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.event-action--primary { background: var(--primary, #2f62e9); color: #fff; border-color: transparent; }
.event-action--danger { color: #b42318; border-color: #fda29b; background: #fff1f0; }
.event-action:disabled { opacity: .55; cursor: not-allowed; }
.event-action:focus-visible { outline: 3px solid #84adff; outline-offset: 2px; }
.event-card-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.event-edit-button, .event-delete-button { font-size: .85rem; }
.events-security-note { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; color: var(--warning); background: var(--warning-bg); font-size: .85rem; }

.event-editor-modal[hidden],
.event-editor-modal [hidden] { display: none !important; }

.event-editor-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    align-items: end;
}

.event-editor-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, .55);
    backdrop-filter: blur(3px);
}

.event-editor-panel {
    position: relative;
    width: 100%;
    max-height: calc(100dvh - 20px);
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(16, 24, 40, .22);
}

.event-editor-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 16px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.event-editor-header h2 { margin: 0 0 8px; font-size: 1.3rem; }
.event-editor-header .events-date-note { margin: 0; overflow-wrap: anywhere; }
.event-editor-close { flex: 0 0 44px; font-size: 1.4rem; padding: 4px; }
.event-editor-form { padding: 16px 16px max(20px, env(safe-area-inset-bottom)); }

.event-editor-form,
.event-editor-grid,
.event-editor-highlights { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.event-field { display: grid; min-width: 0; gap: 7px; }
.event-field > span, .event-field > label { font-size: .85rem; font-weight: 700; }
.event-field small { font-size: .8rem; color: var(--muted); }

.event-field input,
.event-field textarea,
.event-field select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.event-field textarea { resize: vertical; }
.event-field [aria-invalid="true"] { border-color: var(--danger); }
.event-field input:focus-visible,
.event-field textarea:focus-visible,
.event-field select:focus-visible { outline: 3px solid #84adff; outline-offset: 1px; }

.event-editor-image-preview {
    width: 120px;
    height: 120px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: .8rem;
    text-align: center;
}

.event-editor-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.event-editor-points h3 { margin: 0 0 10px; font-size: 1rem; }
.event-editor-points > .event-action { margin-top: 14px; }
.event-editor-point { min-width: 0; display: grid; gap: 12px; padding: 14px; margin: 0; border: 1px solid var(--border); border-radius: 12px; }
.event-editor-point legend { padding: 0 6px; font-weight: 700; }
.event-editor-checkbox { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.event-editor-checkbox input { width: 20px; height: 20px; }
.event-editor-point-actions, .event-editor-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.event-editor-actions > .event-action { flex: 1 1 130px; }
.event-editor-actions #eventEditorReload { flex-basis: 100%; }
.event-editor-form .events-message { margin: 0; overflow-wrap: anywhere; }
body.event-editor-open { overflow: hidden; }

@media (min-width: 720px) {
    .event-editor-modal { place-items: center; padding: 24px; }
    .event-editor-panel { width: min(760px, 100%); max-height: calc(100dvh - 48px); border-radius: 20px; }
    .event-editor-form, .event-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-editor-header, .event-editor-form { padding-left: 22px; padding-right: 22px; }
    .event-field--full { grid-column: 1 / -1; }
    .event-editor-actions { justify-content: flex-end; }
    .event-editor-actions > .event-action { flex: 0 1 auto; }
}
