/* ==========================================================================
   Events Manager - frontend styles
   Designed to inherit from the active theme: uses currentColor where possible,
   minimal hard-coded colors, soft borders/shadows, accessible focus states.
   ========================================================================== */

.evmgr-grid {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}
.evmgr-grid--cols-1 { grid-template-columns: 1fr; }
.evmgr-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.evmgr-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.evmgr-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
    .evmgr-grid--cols-3,
    .evmgr-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .evmgr-grid { grid-template-columns: 1fr !important; }
}

/* ---------- Card ---------- */
.evmgr-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.evmgr-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.evmgr-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
}
.evmgr-card__media img,
.evmgr-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.evmgr-card:hover .evmgr-card__thumb { transform: scale(1.04); }

.evmgr-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 56px;
    opacity: .35;
}

.evmgr-card__badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: .02em;
}

.evmgr-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.evmgr-card__title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.35;
}
.evmgr-card__title a {
    color: inherit;
    text-decoration: none;
}
.evmgr-card__title a:hover { text-decoration: underline; }

.evmgr-card__meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: .92rem;
    opacity: .85;
}
.evmgr-card__meta li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.evmgr-card__icon { font-size: 1em; flex-shrink: 0; }

.evmgr-card__cta {
    margin-top: auto;
    align-self: flex-start;
    padding: 8px 16px;
    border-radius: 8px;
    background: currentColor;
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    transition: opacity .2s ease;
}
.evmgr-card__cta { color: inherit; }
/* invert text via mix-blend so it works in both light/dark themes */
.evmgr-card__cta {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
}
.evmgr-card__cta:hover { opacity: .85; color: #fff; }

.evmgr-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    opacity: .6;
}

/* ==========================================================================
   Single event page
   ========================================================================== */
.evmgr-single {
    max-width: 860px;
    margin: 40px auto;
    padding: 0 20px;
}
.evmgr-single__header {
    margin-bottom: 24px;
}
.evmgr-single__type {
    display: inline-block;
    background: rgba(0, 0, 0, 0.08);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.evmgr-single__title {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.2;
}
.evmgr-single__thumb {
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
}
.evmgr-single__thumb img { width: 100%; height: auto; display: block; }

.evmgr-single__details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
}
.evmgr-detail__label {
    display: block;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: .6;
    margin-bottom: 4px;
}
.evmgr-detail__value {
    font-weight: 600;
    font-size: 1rem;
}

.evmgr-single__content {
    margin: 32px 0;
    line-height: 1.7;
}

.evmgr-single__cta {
    display: inline-block;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 16px;
}
.evmgr-single__cta:hover { opacity: .85; color: #fff; }

/* ==========================================================================
   Registration form
   ========================================================================== */
.evmgr-form-wrapper {
    margin: 40px 0;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
}
.evmgr-form-title {
    margin: 0 0 16px;
    font-size: 1.3rem;
}
.evmgr-form__row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.evmgr-form__row label {
    font-weight: 600;
    font-size: .92rem;
}
.evmgr-form input[type="text"],
.evmgr-form input[type="email"],
.evmgr-form input[type="tel"],
.evmgr-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
    box-sizing: border-box;
}
.evmgr-form textarea { resize: vertical; min-height: 80px; }

.evmgr-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: opacity .2s ease;
}
.evmgr-btn--primary {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
}
.evmgr-btn--primary:hover { opacity: .85; }

.evmgr-notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.evmgr-notice--success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.evmgr-notice--error   { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }

/* ==========================================================================
   Calendar
   ========================================================================== */
.evmgr-calendar {
    margin: 24px 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.evmgr-calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.evmgr-calendar__title {
    margin: 0;
    font-size: 1.15rem;
}
.evmgr-calendar__nav {
    text-decoration: none;
    color: inherit;
    font-size: 1.6rem;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background .15s ease;
}
.evmgr-calendar__nav:hover { background: rgba(0, 0, 0, 0.06); }

.evmgr-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}
.evmgr-calendar__weekday {
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
    font-size: .85rem;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.evmgr-calendar__day {
    min-height: 100px;
    padding: 6px 8px;
    border-inline-start: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    position: relative;
}
.evmgr-calendar__day--empty { background: rgba(0, 0, 0, 0.02); }
.evmgr-calendar__day--today { background: #fff8e1; }
.evmgr-calendar__day--has-events { background: #f3f8ff; }

.evmgr-calendar__daynum {
    font-size: .85rem;
    font-weight: 600;
    opacity: .7;
    margin-bottom: 4px;
}
.evmgr-calendar__events {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.evmgr-calendar__events li a {
    display: block;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: .75rem;
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.evmgr-calendar__events li a:hover { opacity: .85; color: #fff; }
.evmgr-calendar__time {
    font-weight: 700;
    margin-inline-end: 4px;
    opacity: .85;
}

@media (max-width: 700px) {
    .evmgr-calendar__day { min-height: 60px; padding: 4px; }
    .evmgr-calendar__events li a { font-size: .65rem; padding: 2px 4px; }
    .evmgr-calendar__time { display: none; }
}

/* ==========================================================================
   Hero header on single event page
   ========================================================================== */
.evmgr-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    margin-bottom: 32px;
    border-radius: 0;
}
.evmgr-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.75) 100%);
    pointer-events: none;
}
.evmgr-hero__content {
    position: relative;
    z-index: 1;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
}
.evmgr-hero__type {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.evmgr-hero__title {
    margin: 0 0 12px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.evmgr-hero__date {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: .95;
}

.evmgr-single__body {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
}

/* When there is no hero, the inner body still needs its own container. */
.evmgr-single > .evmgr-single__header {
    max-width: 860px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.evmgr-single__actions {
    margin: 24px 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.evmgr-btn--ghost {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.2);
}
.evmgr-btn--ghost:hover {
    background: rgba(0, 0, 0, 0.04);
    color: inherit;
}

/* ==========================================================================
   Archive filter bar
   ========================================================================== */
.evmgr-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px 20px;
    margin: 0 0 24px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
}
.evmgr-filter__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: .92rem;
}
.evmgr-filter__label {
    font-weight: 600;
    font-size: .8rem;
    opacity: .75;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.evmgr-filter select {
    min-width: 160px;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    background: #fff;
    font-size: .95rem;
}
.evmgr-filter__field--toggle {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}
.evmgr-filter__reset {
    margin-top: 18px;
    color: inherit;
    text-decoration: underline;
    font-size: .9rem;
    opacity: .7;
}
.evmgr-filter__reset:hover { opacity: 1; }
