/* Event Manager - Frontend Styles */

.em-event-list {
    max-width: 960px;
}

.em-event-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.2em 1.5em;
    margin-bottom: 1em;
    background: #fff;
}

.em-event-card-has-thumb {
    display: flex;
    gap: 1.2em;
    align-items: flex-start;
}

.em-event-card-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}

.em-event-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.em-event-card-content {
    flex: 1;
    min-width: 0;
}

.em-event-card:hover {
    border-color: #0073aa;
}

.em-event-date {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0.3em;
}

.wp-block-post-title {
    text-align: center;
}

.em-event-title {
    margin: 0 0 0.3em 0;
}

.em-event-title a {
    text-decoration: none;
    color: #333;
}

.em-event-title a:hover {
    color: #0073aa;
}

.em-event-location {
    font-size: 0.9em;
    color: #666;
}

.em-badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 0.5em;
}

.em-badge-full {
    background: #ffeaea;
    color: #dc3232;
}

.em-event-series-count {
    font-weight: 600;
    color: #1a56db;
}

.em-event-category {
    display: inline-block;
    background: #e8f0fe;
    color: #1a56db;
    padding: 0.15em 0.6em;
    border-radius: 3px;
    font-size: 0.85em;
    margin-top: 0.5em;
    margin-right: 0.4em;
}

/* Startseiten-Widget: kompakte Karten, passt sich dem Container an */

.em-event-widget .em-event-card {
    padding: 0.9em 1em;
    margin-bottom: 0.8em;
}

.em-event-widget .em-event-card-thumbnail {
    width: 72px;
    height: 72px;
}

.em-event-widget .em-event-title {
    font-size: 1.05em;
}

/* Event Filter */

.em-event-filter {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.2em 1.5em;
    margin-bottom: 1.5em;
    display: flex;
    flex-direction: column;
    gap: 0.8em;
}

.em-filter-search input {
    width: 100%;
    padding: 0.6em 0.8em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

.em-filter-search input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.em-filter-paging {
    display: flex;
    gap: 1.5em;
    flex-wrap: wrap;
}

.em-filter-paging-group {
    display: flex;
    align-items: center;
    gap: 0.4em;
}

.em-paging-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    color: #333;
    padding: 0;
}

.em-paging-btn:hover {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.em-paging-label {
    min-width: 130px;
    text-align: center;
    font-size: 0.9em;
    color: #666;
    user-select: none;
}

.em-paging-label-active {
    font-weight: 600;
    color: #333;
}

.em-filter-row {
    display: flex;
    gap: 1em;
}

.em-filter-field {
    flex: 1;
}

.em-filter-field-time {
    flex: 0 0 auto;
    width: 110px;
}

.em-filter-field label {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.2em;
}

.em-filter-field input,
.em-filter-field select {
    width: 100%;
    padding: 0.4em 0.6em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95em;
    box-sizing: border-box;
    background: #fff;
}

.em-filter-field input:focus,
.em-filter-field select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.em-filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
}

.em-filter-buttons {
    display: flex;
    align-items: center;
    gap: 1.2em;
}

.em-filter-submit-btn {
    padding: 0.5em 1.8em;
    font-size: 0.95em;
}

.em-filter-reset-btn {
    color: #0073aa;
    font-size: 0.9em;
    text-decoration: underline;
}

.em-filter-reset-btn:hover {
    color: #005f8b;
}

.em-event-count {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 0.8em;
}

@media (max-width: 480px) {
    .em-filter-row {
        flex-direction: column;
        gap: 0.6em;
    }

    .em-filter-paging {
        flex-direction: column;
        gap: 0.6em;
    }

    .em-paging-label {
        min-width: 100px;
    }
}

/* Detail */

.em-event-detail {
    max-width: 960px;
}

.em-event-header {
    display: flex;
    gap: 1.5em;
    margin-bottom: 1.5em;
}

.em-event-image {
    flex: 1;
    min-width: 0;
}

.em-event-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.em-event-sidebar {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.em-event-sidebar-block {
    background: #f7f7f7;
    padding: 0.9em 1.2em;
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
}

.em-event-sidebar-block:first-child {
    border-radius: 4px 4px 0 0;
}

.em-event-sidebar-block:last-child {
    border-radius: 0 0 4px 4px;
    border-bottom: none;
}

.em-event-sidebar-label {
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
    margin-bottom: 0.3em;
}

.em-event-sidebar-value {
    font-size: 0.95em;
    color: #333;
}

.em-event-detail .em-event-section-title {
    text-align: center;
    margin-bottom: 0.5em;
}

.em-event-detail .em-event-title {
    margin-bottom: 0.5em;
}

.em-event-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
}

.em-keyword-tag {
    display: inline-block;
    background: #e8f0fe;
    color: #1a56db;
    padding: 0.15em 0.6em;
    border-radius: 3px;
    font-size: 0.85em;
}

.em-event-description {
    margin-bottom: 1.5em;
    line-height: 1.6;
}

/* Terminliste (Serie mit einem Kalendereintrag) */

.em-event-dates {
    margin-bottom: 1.5em;
}

.em-event-dates-title {
    margin-bottom: 0.5em;
}

.em-event-dates-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.em-event-dates-list li {
    display: flex;
    gap: 1.5em;
    padding: 0.5em 0.2em;
    border-bottom: 1px solid #eee;
}

.em-event-dates-list li:last-child {
    border-bottom: none;
}

.em-event-dates-date {
    flex: 0 0 10em;
}

.em-event-date-past {
    color: #999;
}

.em-button-block {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Ohne Bild: Sidebar floatet rechts, Text fließt links daneben */
.em-event-no-image > .em-event-sidebar {
    float: right;
    width: 280px;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

/* Responsive: untereinander auf kleinen Bildschirmen */
@media (max-width: 768px) {
    .em-event-header {
        flex-direction: column;
    }

    .em-event-sidebar {
        flex: auto;
    }

    .em-event-no-image > .em-event-sidebar {
        float: none;
        width: auto;
        margin-left: 0;
    }
}

/* Buttons */

.em-button {
    display: inline-block;
    padding: 0.6em 1.5em;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.em-button-primary {
    background: #0073aa;
    color: #fff;
}

.em-button-primary:hover {
    background: #005f8b;
    color: #fff;
}

/* Honeypot – unsichtbar für Menschen */
.em-hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* Form */

.em-registration-form-wrap {
    max-width: 600px;
}

.em-form-group {
    margin-bottom: 1.2em;
}

.em-form-group label {
    display: block;
    margin-bottom: 0.3em;
    font-weight: 600;
}

.em-form-group input[type="text"],
.em-form-group input[type="email"],
.em-form-group input[type="tel"],
.em-form-group input[type="date"],
.em-form-group select,
.em-form-group textarea {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.em-form-group textarea {
    resize: vertical;
}

.em-form-group-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
    font-weight: normal;
}

.em-form-group-checkbox input[type="checkbox"] {
    margin-top: 0.25em;
    flex-shrink: 0;
}

.em-form-row {
    display: flex;
    gap: 1em;
}

.em-form-group-small {
    flex: 0 0 30%;
}

.em-form-group-large {
    flex: 1;
}

/* Messages */

.em-form-message {
    padding: 0.8em 1em;
    border-radius: 4px;
    margin-top: 1em;
}

.em-form-message-success {
    background: #eafaea;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.em-form-message-error {
    background: #ffeaea;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.em-not-found {
    padding: 2em;
    text-align: center;
    color: #666;
}

/* Registration link */

.em-registration-link {
    display: inline-block;
    padding: 0.4em 1em;
    background: #0073aa;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.em-registration-link:hover {
    background: #005f8b;
    color: #fff;
}
