/* ==========================================================================
   Публичная часть: одиночная страница события
   ========================================================================== */

.em-event-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.em-event-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.em-event-content {
    flex: 1 1 60%;
    min-width: 280px;
}

.em-event-title {
    margin: 0 0 20px;
    font-size: 2em;
    line-height: 1.2;
}

.em-event-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 20px;
}

.em-event-description {
    line-height: 1.7;
}

/* Боковой блок атрибутов -------------------------------------------------- */

.em-event-sidebar {
    flex: 0 1 320px;
    min-width: 260px;
    background: #f7f7f8;
    border: 1px solid #e2e2e4;
    border-radius: 8px;
    padding: 24px;
    position: sticky;
    top: 20px;
}

.em-event-gallery-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: -24px -24px 20px;
}

.em-event-gallery-top-item {
    display: block;
    width: 100%;
    line-height: 0;
}

.em-event-gallery-top-item:first-child {
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.em-event-gallery-top-item img {
    display: block;
    width: 100%;
    height: auto;
}

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

.em-event-attr {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid #e2e2e4;
}

.em-event-attr:last-child {
    border-bottom: none;
}

.em-event-attr-label {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b6b70;
    margin-bottom: 4px;
}

.em-event-attr-value {
    font-size: 1.05em;
    color: #1d1d1f;
    word-break: break-word;
}

.em-event-attr-value a {
    color: #2271b1;
    text-decoration: none;
}

.em-event-attr-value a:hover {
    text-decoration: underline;
}

/* Организатор в сайдбаре ---------------------------------------------- */

.em-event-organizers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.em-event-organizer {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1d1d1f;
    background: #fff;
    border: 1px solid #e2e2e4;
    border-radius: 8px;
    padding: 8px 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.em-event-organizer:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.em-event-organizer-logo {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    background: #f0f0f1;
}

.em-event-organizer-logo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9a9a9e;
}

.em-event-organizer-name {
    font-size: 0.95em;
    font-weight: 500;
}

@media (max-width: 782px) {
    .em-event-layout {
        flex-direction: column;
    }

    .em-event-sidebar {
        position: static;
        width: 100%;
        flex-basis: auto;
    }
}

/* ==========================================================================
   Админка: метабокс галереи изображений
   ========================================================================== */

.em-event-gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.em-event-gallery-item {
    position: relative;
    width: 90px;
    height: 90px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.em-event-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.em-event-gallery-item .em-remove-image {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.em-event-gallery-item .em-remove-image:hover {
    background: rgba(200, 0, 0, 0.8);
}

/* Логотип организатора (экран редактирования таксономии) */

.em-organizer-logo-preview {
    margin-bottom: 8px;
}

.em-organizer-logo-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 6px;
    border: 1px solid #ddd;
    display: block;
    object-fit: cover;
}
