/* ═══ Messe-Kalender — Calendar v2.3 — ZMC-Style ═══ */

:root {
    --mk-green: #10c956;
    --mk-green-border: #0da345;
    --mk-text: #333;
    --mk-text-light: #888;
    --mk-bg: #fff;
    --mk-radius: 5px;
}

.mk-calendar-wrap {
    max-width: 1100px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--mk-text);
}

/* ─── Filter — eine Zeile, kompakt ─── */
.mk-calendar-wrap .mk-filters { margin-bottom: 10px !important; }

.mk-calendar-wrap .mk-filter-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}

.mk-calendar-wrap .mk-input,
.mk-calendar-wrap .mk-select {
    padding: 6px 8px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    background: #fff !important;
    color: var(--mk-text) !important;
    min-width: 0 !important;
    height: 32px !important;
    box-sizing: border-box !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
}

.mk-calendar-wrap .mk-input { flex: 1 !important; min-width: 100px !important; }
.mk-calendar-wrap .mk-select { flex: 0 1 auto !important; min-width: 90px !important; }
.mk-calendar-wrap .mk-input::placeholder { color: #bbb; }

.mk-calendar-wrap .mk-input:focus,
.mk-calendar-wrap .mk-select:focus {
    outline: none !important;
    border-color: var(--mk-green) !important;
}

.mk-calendar-wrap .mk-select.mk-filter-active,
.mk-calendar-wrap .mk-input.mk-filter-active {
    border-color: var(--mk-green) !important;
    background: #f0fff4 !important;
}

/* ─── Buttons ─── */
.mk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: var(--mk-green);
    color: #fff;
    text-decoration: none;
    transition: opacity .15s;
    line-height: 1.4;
    white-space: nowrap;
}

.mk-btn:hover { opacity: .85; color: #fff; text-decoration: none; }
.mk-btn-outline { background: transparent; color: var(--mk-text); border: 1px solid #ccc; font-weight: 500; font-size: 12px; padding: 6px 10px; }
.mk-btn-outline:hover { background: #f8f8f8; color: var(--mk-text); }

/* ─── Month Nav ─── */
.mk-month-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    justify-content: center;
}

.mk-month-title {
    font-size: 1.5em;
    font-weight: 700;
    flex: 1;
    text-align: center;
    color: var(--mk-text);
}

.mk-nav-prev,
.mk-nav-next {
    width: 38px;
    height: 38px;
    font-size: 20px;
    padding: 0;
    border-radius: 4px;
}

.mk-btn-today { font-size: 11px; padding: 0; width: 38px; height: 38px; border-radius: 4px; }

/* ─── Event Count ─── */
.mk-event-count {
    font-size: 13px;
    color: var(--mk-text-light);
    text-align: center;
    margin-bottom: 14px;
    min-height: 18px;
}

.mk-event-count strong { color: var(--mk-green); }
.mk-event-count a { color: var(--mk-green); text-decoration: underline; }

/* ─── Grid ─── */
.mk-grid-wrap { overflow-x: auto; }

.mk-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 5px;
}

.mk-grid-day-name {
    font-weight: 700;
    text-align: center;
    padding: 10px 0;
    background: #f8f8f8;
    font-size: 14px;
}

.mk-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

/* ─── Zellen — genau wie cannazen.de ─── */
.mk-grid-cell {
    border: 1px solid #eee;
    border-radius: var(--mk-radius);
    min-height: 90px;
    padding: 6px;
    font-size: 0.85em;
    background: #fff;
    position: relative;
    color: var(--mk-text);
    text-decoration: none;
}

/* Leere Zellen = unsichtbar */
.mk-grid-cell.mk-empty {
    border: none;
    background: transparent;
}

/* Vergangene Tage = normal, kein Ausgrauen */
.mk-grid-cell.mk-past { opacity: 1; }

/* Tagnummer rechts oben */
.mk-day-num {
    display: block;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: var(--mk-text);
    margin-bottom: 5px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* ─── HEUTE = grüner Border + Badge ─── */
.mk-today {
    border: 2px solid var(--mk-green) !important;
}

.mk-today::after {
    content: "HEUTE";
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 9px;
    background: var(--mk-green);
    color: #fff;
    padding: 1px 3px;
    border-radius: 2px;
    text-transform: uppercase;
    font-weight: 700;
}

/* ─── EVENT-TAG = grüne Box, alles weiß ─── */
.mk-grid-cell.mk-has-events {
    background: var(--mk-green) !important;
    color: #fff !important;
    border-color: var(--mk-green-border);
}

.mk-grid-cell.mk-has-events .mk-day-num {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.2);
}

.mk-grid-cell.mk-has-events.mk-today {
    border: 2px solid var(--mk-green-border) !important;
}

.mk-grid-cell.mk-has-events.mk-today::after {
    background: #fff;
    color: var(--mk-green);
}

/* ─── Event Dots — weiß auf grün ─── */
.mk-event-dot {
    display: block;
    font-size: 0.85em;
    line-height: 1.35;
    padding: 0;
    margin-bottom: 1px;
    text-decoration: none !important;
    color: #fff !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: none;
    border-radius: 0;
    font-weight: 400;
}

.mk-event-dot:hover {
    color: #fff !important;
    text-decoration: none !important;
    opacity: .85;
}

/* Alle Typen = kein eigenes Styling */
.mk-type-messe,
.mk-type-konferenz,
.mk-type-workshop,
.mk-type-festival {
    background: none;
    color: #fff !important;
}

.mk-type-messe::before,
.mk-type-konferenz::before,
.mk-type-workshop::before,
.mk-type-festival::before { content: none; }

.mk-more {
    font-size: 10px;
    color: rgba(255,255,255,.7);
    display: block;
    text-align: center;
}

/* ─── Tooltip ─── */
.mk-tooltip {
    position: fixed;
    background: #222;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    max-width: 240px;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    opacity: 0;
    transition: opacity .12s;
}

.mk-tooltip.mk-visible { opacity: 1; }
.mk-tooltip-title { font-weight: 600; margin-bottom: 3px; }
.mk-tooltip-meta { font-size: 11px; opacity: .75; }

/* ─── No Events ─── */
.mk-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--mk-text-light);
    font-size: 14px;
}

/* ─── List View (Mobile) ─── */
.mk-list { display: none; }

.mk-list-item {
    background: var(--mk-green);
    margin: 12px 0;
    padding: 15px;
    border-radius: 10px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.mk-list-item:hover {
    opacity: .9;
    color: #fff;
    text-decoration: none;
}

.mk-list-item.mk-past { opacity: 1; }

.mk-list-date {
    text-align: center;
    min-width: 48px;
}

.mk-list-day {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.mk-list-month {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,.85);
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 2px;
}

.mk-list-info { flex: 1; min-width: 0; }

.mk-list-title {
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 3px;
    color: #fff;
}

.mk-list-meta {
    display: flex;
    gap: 10px;
    font-size: 0.9em;
    color: rgba(255,255,255,.85);
    flex-wrap: wrap;
}

.mk-list-meta .mk-type-messe,
.mk-list-meta .mk-type-konferenz,
.mk-list-meta .mk-type-workshop,
.mk-list-meta .mk-type-festival {
    padding: 0;
    border-radius: 0;
    background: none;
    color: rgba(255,255,255,.85) !important;
    font-size: 0.9em;
    font-weight: 400;
}

.mk-list-country {
    font-size: 0.9em;
    color: rgba(255,255,255,.7);
}

.mk-list-arrow {
    font-size: 18px;
    color: rgba(255,255,255,.6);
}

.mk-no-events {
    text-align: center;
    padding: 40px;
    color: var(--mk-text-light);
    font-size: 14px;
}

/* ─── Upcoming ─── */
.mk-upcoming {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    align-items: stretch;
}

.mk-upcoming h3 {
    font-size: 1.1em;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: var(--mk-text);
}

.mk-upcoming-list {
    flex: 1;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
    border-top: 4px solid var(--mk-green);
}

.mk-upcoming-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--mk-text);
    font-size: 0.9em;
    cursor: pointer;
}

.mk-upcoming-item:last-child { border-bottom: none; }

.mk-upcoming-item:hover {
    background: #f0fff4;
    color: var(--mk-green);
    text-decoration: none;
}

.mk-upcoming-date {
    min-width: 80px;
    font-weight: 700;
    font-size: 0.95em;
}

.mk-upcoming-title { flex: 1; font-weight: 600; }

.mk-upcoming-city {
    font-size: 0.9em;
    color: var(--mk-text-light);
}

.mk-upcoming-type {
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--mk-green);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
}

/* ─── Loading ─── */
.mk-loading {
    text-align: center;
    padding: 40px;
}

.mk-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #eee;
    border-top-color: var(--mk-green);
    border-radius: 50%;
    animation: mk-spin .6s linear infinite;
    margin: 0 auto;
}

@keyframes mk-spin {
    to { transform: rotate(360deg); }
}

/* ─── Mobile ─── */
@media (max-width: 768px) {
    .mk-grid-wrap { display: none; }
    .mk-list { display: block; }
    .mk-upcoming { flex-direction: column; }

    .mk-calendar-wrap .mk-filter-row { flex-direction: column !important; flex-wrap: wrap !important; gap: 6px !important; }
    .mk-calendar-wrap .mk-input, .mk-calendar-wrap .mk-select { width: 100% !important; min-width: 0 !important; font-size: 14px !important; padding: 10px 12px !important; height: auto !important; }
    .mk-month-title { font-size: 1.2em; }
    .mk-nav-prev, .mk-nav-next { width: 34px; height: 34px; font-size: 18px; }
}
