/* ─────────────────────────────────────────────────────────────────────────────
   Event Manager – Single Event CSS
───────────────────────────────────────────────────────────────────────────── */

/* ── Variablen ────────────────────────────────────────────────────────────── */
.em-single {
    --em-radius: 10px;
    --em-shadow: 0 2px 12px rgba(0,0,0,.08);
    --em-border: #e5e5e5;
    --em-bg:     #ffffff;
    --em-bg-2:   #f8f8f8;
    --em-text:   #1a1a1a;
    --em-text-2: #666;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--em-text);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.em-single__hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    border-radius: var(--em-radius);
}

.em-single__hero-image {
    position: relative;
    max-height: 400px;
    overflow: hidden;
}

.em-single__hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.em-single__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.65));
}

.em-single__hero-content {
    padding: 20px 0 8px;
}

.em-single__hero-image ~ .em-single__hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 32px;
}

.em-single__hero-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.em-single__badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.em-single__badge--outline {
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.6);
}

.em-single__title {
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: var(--em-text);
}

.em-single__hero-image ~ .em-single__hero-content .em-single__title {
    color: #fff;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.em-single__layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.em-single__section {
    background: var(--em-bg);
    border-radius: var(--em-radius);
    box-shadow: var(--em-shadow);
    padding: 28px;
    margin-bottom: 24px;
}

.em-single__section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--em-text);
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--em-event-color, #34aee4);
}

.em-single__content { line-height: 1.7; font-size: 15px; }
.em-single__content p { margin-bottom: 1em; }
.em-single__content strong { font-weight: 600; }

/* ── Termin Chips ─────────────────────────────────────────────────────────── */
.em-termin-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.em-termin-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px;
    border-radius: 8px;
    border: 2px solid var(--em-border);
    background: var(--em-bg);
    cursor: pointer;
    transition: all .15s;
    min-width: 130px;
    text-align: left;
}

.em-termin-chip:hover:not(:disabled) {
    border-color: var(--em-event-color, #34aee4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.em-termin-chip--active {
    border-color: var(--em-event-color, #34aee4) !important;
    background: color-mix(in srgb, var(--em-event-color, #34aee4) 10%, white) !important;
}

.em-termin-chip--full {
    opacity: .45;
    cursor: not-allowed;
    background: var(--em-bg-2);
}

.em-termin-chip--hidden { display: none; }

.em-termin-chip__date {
    font-size: 14px;
    font-weight: 600;
    color: var(--em-text);
}

.em-termin-chip__time {
    font-size: 12px;
    color: var(--em-text-2);
    margin-top: 2px;
}

.em-termin-chip__status {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
}

.em-termin-chip__status--full { background: #fee2e2; color: #991b1b; }
.em-termin-chip__status--low  { background: #fef9c3; color: #854d0e; }

.em-termin-chip__notiz {
    font-size: 11px;
    color: var(--em-text-2);
    font-style: italic;
    margin-top: 3px;
}

.em-termin-mehr {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px dashed var(--em-border);
    border-radius: 8px;
    background: none;
    color: var(--em-event-color, #34aee4);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}

.em-termin-mehr:hover { background: var(--em-bg-2); }

/* ── Ticket-Typen ─────────────────────────────────────────────────────────── */
.em-ticket-typen {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.em-ticket-typ-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid var(--em-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
}

.em-ticket-typ-option input[type="radio"] { display: none; }

.em-ticket-typ-option:hover { border-color: var(--em-event-color, #34aee4); }

.em-ticket-typ-option--active {
    border-color: var(--em-event-color, #34aee4);
    background: color-mix(in srgb, var(--em-event-color, #34aee4) 8%, white);
}

.em-ticket-typ-option__name  { font-weight: 600; font-size: 14px; flex: 1; }
.em-ticket-typ-option__preis { font-weight: 700; font-size: 15px; color: var(--em-event-color, #34aee4); }
.em-ticket-typ-option__desc  { font-size: 12px; color: var(--em-text-2); width: 100%; margin-top: 2px; }

/* ── Buchungsformular ─────────────────────────────────────────────────────── */
.em-booking-form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.em-booking-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.em-booking-form__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--em-text);
}

.em-booking-form__label small {
    font-weight: 400;
    color: var(--em-text-2);
    margin-left: 4px;
}

.em-booking-form__group input,
.em-booking-form__group textarea {
    padding: 10px 14px;
    border: 1.5px solid var(--em-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--em-text);
    background: var(--em-bg);
    transition: border-color .15s;
    width: 100%;
    box-sizing: border-box;
}

.em-booking-form__group input:focus,
.em-booking-form__group textarea:focus {
    border-color: var(--em-event-color, #34aee4);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--em-event-color, #34aee4) 15%, transparent);
}

.em-booking-form__divider {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--em-text-2);
    margin: 8px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--em-border);
}

/* ── Qty Control ──────────────────────────────────────────────────────────── */
.em-qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--em-border);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.em-qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--em-bg-2);
    font-size: 18px;
    cursor: pointer;
    color: var(--em-text);
    transition: background .12s;
    line-height: 1;
}

.em-qty-btn:hover { background: var(--em-border); }

.em-qty-control input {
    width: 60px;
    border: none !important;
    border-left: 1.5px solid var(--em-border) !important;
    border-right: 1.5px solid var(--em-border) !important;
    border-radius: 0 !important;
    text-align: center;
    font-weight: 600;
    padding: 0 !important;
    height: 40px;
    box-shadow: none !important;
}

.em-qty-control input::-webkit-inner-spin-button,
.em-qty-control input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Zahlungsoptionen ─────────────────────────────────────────────────────── */
.em-payment-opts {
    display: flex;
    gap: 10px;
}

.em-payment-opt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid var(--em-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all .15s;
    text-align: center;
}

.em-payment-opt input { display: none; }
.em-payment-opt:hover { border-color: var(--em-event-color, #34aee4); }
.em-payment-opt--active { border-color: var(--em-event-color, #34aee4); background: color-mix(in srgb, var(--em-event-color, #34aee4) 8%, white); }

/* ── Preisübersicht ───────────────────────────────────────────────────────── */
.em-booking__preisübersicht {
    background: var(--em-bg-2);
    border-radius: 8px;
    padding: 14px 18px;
    margin: 16px 0;
}

.em-booking__preis-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}

.em-booking__preis-row strong {
    font-size: 22px;
    font-weight: 700;
    color: var(--em-event-color, #34aee4);
}

/* ── Submit ───────────────────────────────────────────────────────────────── */
.em-booking__submit {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.em-booking__submit:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); }
.em-booking__submit:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ── Notices ──────────────────────────────────────────────────────────────── */
.em-booking__notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.em-booking__notice--info { background: #dbeafe; color: #1e40af; }
.em-booking__notice--warn { background: #fef9c3; color: #854d0e; }

.em-booking__message {
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
}

.em-booking__message--success { background: #d1fae5; color: #065f46; }
.em-booking__message--error   { background: #fee2e2; color: #991b1b; }

/* ── Sidebar Cards ────────────────────────────────────────────────────────── */
.em-sidebar-card {
    background: var(--em-bg);
    border-radius: var(--em-radius);
    box-shadow: var(--em-shadow);
    padding: 18px;
    margin-bottom: 16px;
    border-top: 3px solid transparent;
}

.em-sidebar-card--highlight {
    border-top-color: var(--em-event-color, #34aee4);
}

.em-sidebar-card--warn { border-top-color: #fdc716; }

.em-sidebar-card__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--em-text-2);
    margin-bottom: 8px;
}

.em-sidebar-card__value {
    font-size: 18px;
    font-weight: 700;
    color: var(--em-text);
}

.em-sidebar-card__sub {
    font-size: 13px;
    color: var(--em-text-2);
    margin-top: 3px;
}

.em-sidebar-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* ── Plätze-Bar ───────────────────────────────────────────────────────────── */
.em-plaetze-bar {
    height: 8px;
    background: var(--em-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.em-plaetze-bar__fill {
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}

.em-plaetze-text {
    font-size: 13px;
    color: var(--em-text-2);
}

/* ── Sidebar Termine ──────────────────────────────────────────────────────── */
.em-sidebar-termine { display: flex; flex-direction: column; gap: 8px; }

.em-sidebar-termin {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--em-text);
    padding: 6px 0;
    border-bottom: 1px solid var(--em-border);
    cursor: pointer;
    transition: color .12s;
}

.em-sidebar-termin:hover { color: var(--em-event-color, #34aee4); }
.em-sidebar-termin:last-of-type { border-bottom: none; }
.em-sidebar-termin--hidden { display: none; }
.em-sidebar-termin--full { opacity: .5; cursor: default; }

.em-sidebar-termin__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.em-sidebar-termin__date { flex: 1; }

.em-sidebar-termin__status {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
    background: #fee2e2;
    color: #991b1b;
}

.em-sidebar-termin__status--low { background: #fef9c3; color: #854d0e; }

.em-sidebar-mehr {
    font-size: 12px;
    color: var(--em-event-color, #34aee4);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 0;
    font-weight: 500;
}

/* ── Ort ──────────────────────────────────────────────────────────────────── */
.em-sidebar-card__ort {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: var(--em-text);
    line-height: 1.5;
}

.em-sidebar-card__ort svg { flex-shrink: 0; margin-top: 2px; color: var(--em-text-2); }
.em-sidebar-card__ort a { color: var(--em-event-color, #34aee4); text-decoration: none; }
.em-sidebar-card__ort a:hover { text-decoration: underline; }

/* ── Share Buttons ────────────────────────────────────────────────────────── */
.em-share-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.em-share-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: opacity .15s, transform .1s;
}

.em-share-btn:hover { opacity: .85; transform: translateY(-1px); }

.em-share-btn--fb   { background: #1877f2; }
.em-share-btn--tw   { background: #000; }
.em-share-btn--li   { background: #0a66c2; }
.em-share-btn--wa   { background: #25d366; }
.em-share-btn--mail { background: #6b7280; }

/* ── Ähnliche Events ──────────────────────────────────────────────────────── */
.em-similar-events { display: flex; flex-direction: column; gap: 10px; }

.em-similar-event {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--em-text);
    padding: 6px 0;
    border-bottom: 1px solid var(--em-border);
    transition: color .12s;
}

.em-similar-event:last-child { border-bottom: none; }
.em-similar-event:hover { color: var(--em-event-color, #34aee4); }

.em-similar-event__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.em-similar-event__info { display: flex; flex-direction: column; gap: 2px; }
.em-similar-event__title { font-size: 13px; font-weight: 600; }
.em-similar-event__date  { font-size: 12px; color: var(--em-text-2); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media ( max-width: 900px ) {
    .em-single__layout { grid-template-columns: 1fr; }
    .em-single__sidebar { order: -1; }
    .em-booking-form__row { grid-template-columns: 1fr; }
    .em-payment-opts { flex-direction: column; }
}

@media ( max-width: 600px ) {
    .em-single__section { padding: 18px; }
    .em-termin-chip { min-width: 110px; }
}

/* ── Meta-Blöcke ─────────────────────────────────────────────────────────── */
.em-single__meta-blocks {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.em-meta-block {
    flex: 1 1 180px;
    background: var(--bp-surface, #fff);
    border-radius: 0 0 6px 6px;
    padding: .9rem 1.1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.em-meta-block__label {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .55;
}

.em-meta-block__value {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.em-meta-block__value a {
    color: inherit;
    text-decoration: none;
}
.em-meta-block__value a:hover { text-decoration: underline; }

.em-meta-block__sub {
    font-size: .82rem;
    opacity: .65;
}

/* ── Qty readonly (kein Cursor, kein Schieben) ───────────────────────────── */
.em-qty-control input[type="number"] {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
    text-align: center;
    border: none;
    background: transparent;
    width: 2.5rem;
    font-size: 1.05rem;
    font-weight: 600;
}

/* Spinner komplett ausblenden */
.em-qty-control input[type="number"]::-webkit-inner-spin-button,
.em-qty-control input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
.em-qty-control input[type="number"] { -moz-appearance: textfield; }

/* − Button disabled State */
.em-qty-btn:disabled {
    opacity: .3;
    cursor: not-allowed;
}
