/* ==========================================================================
   ENKER EVENTKALENDER - MODERN UI V6.0
   ========================================================================== */

#mecp-calendar-wrapper, .mecp-frontend-submit-wrapper { max-width: 1200px; margin: 40px auto; font-family: inherit; position: relative; box-sizing: border-box; color: #333; }
.mecp-frontend-submit-wrapper { max-width: 600px; background: #fff; padding: 30px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid #f0f2f5; }

.mecp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; flex-wrap: wrap; }
.mecp-header-right { display: flex; align-items: center; gap: 15px; }
#mecp-current-month { margin: 0; text-transform: none; letter-spacing: -0.5px; }

.mecp-view-switcher { display: flex; background: #f4f6f8; border-radius: 12px; padding: 4px; }
.mecp-view-btn { background: transparent; border: none; padding: 8px 14px; cursor: pointer; color: #666; border-radius: 8px; transition: all 0.2s ease; }
.mecp-view-btn:hover { color: #111; }
.mecp-view-btn.active { background: #fff; color: #000; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.mecp-view-btn .dashicons { font-size: 18px; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }

.mecp-nav { display: flex; gap: 8px; }
.mecp-arrow-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid #e0e4e8; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px; color: #555; transition: all 0.2s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.mecp-arrow-btn:hover { border-color: #ccc; color: #000; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

.mecp-filters select { padding: 12px 20px; border-radius: 12px; border: 1px solid #e0e4e8; background: #f9fafb; margin-bottom: 30px; font-weight: 500; color: #333; cursor: pointer; outline: none; transition: border 0.2s; }
.mecp-filters select:focus { border-color: #000; }

#mecp-load-more-btn { display: block; margin: 40px auto 20px; background: #111; color: #fff; border: none; padding: 14px 28px; border-radius: 50px; cursor: pointer; font-weight: 600; font-size: 1rem; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
#mecp-load-more-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); background: #333; }

/* --- GRID VIEW --- */
.mecp-view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.mecp-event-card { background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); overflow: hidden; cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; display:flex; flex-direction:column; border: 1px solid #f0f2f5; }
.mecp-event-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }
.mecp-img { height: 180px; background-size: cover; background-position: center; width:100%; transition: transform 0.5s ease; }
.mecp-event-card:hover .mecp-img { transform: scale(1.05); }

.mecp-content { padding: 25px 20px; position: relative; flex:1; background: #fff; z-index: 2; }
.mecp-content h4 { margin: 0 0 10px 0; line-height: 1.3; color: #111; }
.mecp-meta { font-weight: 600; color: #666; margin: 0; display: flex; align-items: center; gap: 5px; }
.mecp-excerpt { color: #555; margin-top: 12px; line-height: 1.5; }

.mecp-cat-label { display: inline-block; margin-top: 15px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: #555; background: #f0f2f5; padding: 6px 12px; border-radius: 50px; font-weight: 700; }
.mecp-date-badge { position: absolute; top: 15px; right: 15px; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 8px 15px; border-radius: 12px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.08); z-index: 3; border: 1px solid rgba(255,255,255,0.5); }
.mecp-date-badge .day { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1; color: #111; }
.mecp-date-badge .weekday { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: #e02f2f; margin-top: 2px; display: block; }

/* --- FARB-KACHELN VIEW --- */
.mecp-view-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.mecp-tile-card { padding: 35px 30px; display: flex; flex-direction: column; justify-content: center; min-height: 220px; transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s; border: none !important; }
.mecp-tile-card:hover { transform: translateY(-8px); opacity: 0.95; }
.mecp-tile-date { font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; opacity: 0.9; }
.mecp-tile-card h4 { margin: 0 0 15px 0 !important; line-height: 1.2 !important; color: inherit !important; }
.mecp-tile-card p { margin: 0 !important; opacity: 0.85 !important; line-height: 1.5 !important; color: inherit !important; }

/* --- BILD-KACHELN VIEW (NEUES DESIGN) --- */
.mecp-view-img_tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 25px; }
.mecp-img-tile-card { 
    min-height: 280px; background-size: cover; background-position: center; 
    display: flex; flex-direction: column; justify-content: space-between; 
    padding: 20px; border: none !important; border-radius: 16px; overflow: hidden; position: relative;
}
.mecp-img-tile-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 100%); z-index: 1;
    transition: background 0.3s ease;
}
.mecp-img-tile-card:hover::before { background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%); }

.mecp-img-top-row { display: flex; align-items: flex-start; gap: 15px; position: relative; z-index: 2; }
.mecp-img-bottom-row { position: relative; z-index: 2; }

.mecp-dark-date-badge {
    background: rgba(20, 20, 20, 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: #fff; border-radius: 12px; padding: 12px; text-align: center;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-width: 55px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.mecp-dark-date-badge .wd { font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; color: #aaa; margin-bottom: 2px;}
.mecp-dark-date-badge .dy { font-size: 1.6rem; font-weight: 800; line-height: 1; margin-bottom: 2px; }
.mecp-dark-date-badge .mo { font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; color: #aaa; }

.mecp-img-title-pill {
    background: rgba(20, 20, 20, 0.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    padding: 12px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.mecp-img-title-pill h4 { margin: 0 !important; color: #fff !important; line-height: 1.3 !important; }

.mecp-img-cat {
    display: inline-block; color: rgba(255,255,255,0.9); font-weight: 600; font-size: 0.95rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* --- LIST VIEW --- */
.mecp-view-list { display: flex; flex-direction: column; gap: 20px; }
.mecp-view-list .mecp-event-card { flex-direction: row; height: auto; min-height: 150px; align-items: stretch; }
.mecp-view-list .mecp-img { width: 220px; height: auto; flex-shrink: 0; }
.mecp-view-list .mecp-date-badge { left: 15px; top: 15px; right: auto; }
.mecp-view-list .mecp-content { padding: 25px; display: flex; flex-direction: column; justify-content: center; } 

/* --- CALENDAR VIEW --- */
.mecp-view-calendar { background: #fff; border: 1px solid #f0f2f5; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.03); }
.mecp-cal-header { display: grid; grid-template-columns: repeat(7, 1fr); background: #f9fafb; border-bottom: 1px solid #f0f2f5; font-weight: 700; text-align: center; padding: 15px 0; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; color: #555;}
.mecp-cal-body { display: grid; grid-template-columns: repeat(7, 1fr); }
.mecp-cal-cell { min-height: 120px; border-right: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5; padding: 8px; position: relative; transition: background 0.2s;}
.mecp-cal-cell:hover { background: #fafbfc; }
.mecp-cal-cell:nth-child(7n) { border-right: none; }
.mecp-cal-num { font-size: 14px; font-weight: 700; color: #999; display: block; margin-bottom: 8px; }
.mecp-cal-event-dot { font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 6px; color: #fff; margin-bottom: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: transform 0.2s;}
.mecp-cal-event-dot:hover { transform: scale(1.02); opacity: 0.9; }

/* --- POPUP / MODAL --- */
#mecp-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.7); z-index: 2147483647 !important; display: none; justify-content: center; align-items: center; padding: 15px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#mecp-modal-content { background: #fff; width: 100%; max-width: 650px; max-height: 90vh; border-radius: 24px; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.2); display: flex; flex-direction: column; animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); overflow: hidden; }
.modal-scroll-container { overflow-y: auto; max-height: 90vh; width: 100%; padding-bottom: 30px; box-sizing: border-box; }
.modal-full-img { width: 100%; height: 300px; object-fit: cover; display: block; border-bottom: 1px solid #f0f2f5;}
.modal-padding { padding: 35px 40px; }
.modal-header-row h2 { margin: 0 0 25px 0; line-height: 1.2; color: #111;}

.modal-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 25px; }
.modal-info-grid p { margin: 0; background: #f4f6f8; padding: 12px 16px; border-radius: 14px; font-weight: 500; display: flex; flex-direction: column; gap: 4px; color: #333; border: 1px solid #eef0f2;}
.modal-info-grid p strong { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: #888; }
.modal-desc { line-height: 1.7; color: #444; margin-bottom: 35px; }

.mecp-video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 16px; margin-bottom: 30px; background: #000; box-shadow: 0 10px 30px rgba(0,0,0,0.1);}
.mecp-video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* --- FORMULARE --- */
.mecp-registration-section { background: #fff; border: 1px solid #e0e4e8; padding: 30px; border-radius: 20px; margin-bottom: 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); }
.mecp-registration-section h3 { margin-top:0; margin-bottom: 20px; font-weight: 700;}
.mecp-form-row { display: flex; gap: 15px; margin-bottom: 15px; }
.mecp-form-row input, .mecp-form-row textarea { width: 100%; padding: 14px 16px; border: 2px solid transparent; border-radius: 12px; background: #f4f6f8; transition: all 0.3s ease; color: #333;}
.mecp-form-row textarea { resize: vertical; min-height: 100px; }
.mecp-form-row input:focus, .mecp-form-row textarea:focus { outline: none; border-color: #111; background: #fff; box-shadow: 0 0 0 4px rgba(0,0,0,0.05); }

.btn-register, .btn-ticket, .btn-secondary, .btn-whatsapp { flex: 1 1 auto; text-align: center; padding: 14px 20px; border-radius: 12px; text-decoration: none; font-weight: 700; transition: all 0.2s ease; display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: none; cursor: pointer;}
.btn-register { width: 100%; background: #111; color: #fff; margin-top: 10px; }
.btn-register:hover { background: #333; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.15);}
.btn-register:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none;}

.modal-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-ticket { background: #e02f2f; color: #fff; box-shadow: 0 4px 15px rgba(224, 47, 47, 0.3); }
.btn-ticket:hover { background: #c92222; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(224, 47, 47, 0.4); }
.btn-secondary { background: #f0f2f5; color: #111; }
.btn-secondary:hover { background: #e4e7eb; transform: translateY(-2px); }
.btn-whatsapp { background: #25D366; color: #fff; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3); }
.btn-whatsapp:hover { background: #20ba59; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4); }

.mecp-success-msg { color: #0f5132; background-color: #d1e7dd; padding: 15px; border-radius: 12px; font-weight: 600; text-align: center; margin-top: 15px; }
.mecp-error-msg { color: #842029; background-color: #f8d7da; padding: 15px; border-radius: 12px; font-weight: 600; text-align: center; margin-top: 15px; }

#mecp-modal-close { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; background: rgba(255,255,255,0.9); backdrop-filter: blur(5px); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 400; font-size: 24px; color: #111; box-shadow: 0 4px 15px rgba(0,0,0,0.1); z-index: 10; transition: all 0.2s;}
#mecp-modal-close:hover { background: #111; color: #fff; transform: rotate(90deg); }

@keyframes modalSlideUp { from { transform: translateY(40px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* --- MOBILE OPTIMIERUNG --- */
@media (max-width: 768px) {
    .mecp-view-list .mecp-event-card { flex-direction: column; }
    .mecp-view-list .mecp-img, .mecp-event-card .mecp-img { width: 100%; height: 200px; }
    .mecp-view-list .mecp-content { padding: 20px; }
    .modal-padding { padding: 25px 20px; }
    .mecp-form-row { flex-direction: column; gap: 10px; }
}

@media (max-width: 600px) {
    .mecp-header { flex-direction: column; align-items: flex-start; }
    .mecp-header-right { width: 100%; justify-content: space-between; margin-top: 15px; }
    .mecp-view-btn[data-view="list"] { display: none; }
    .mecp-view-tiles, .mecp-view-img_tiles { grid-template-columns: 1fr; }
    .mecp-cal-header div { font-size: 11px; }
    .mecp-cal-cell { min-height: 80px; padding: 4px; }
    .mecp-cal-event-dot { font-size: 0; width: 8px; height: 8px; padding: 0; display: inline-block; margin: 2px 2px 0 0; border-radius: 50%; }
    .modal-info-grid { grid-template-columns: 1fr; gap: 8px; }
}