/* WPE BlockMeta Frontend Styles */
.wpe-blockmeta-wrapper {
    margin-bottom: 1em;
}

/* Image styles */
.wpe-blockmeta-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.wpe-blockmeta-image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wpe-blockmeta-image-gallery .wpe-blockmeta-image {
    flex: 0 1 auto;
}

.wpe-blockmeta-image-fallback {
    color: #666;
    font-style: italic;
}

/* Link styles */
.wpe-blockmeta-link {
    display: inline-block;
    word-break: break-word;
}

.wpe-blockmeta-url-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Array formatting styles */
.wpe-blockmeta-list {
    margin: 0;
    padding-left: 20px;
}

.wpe-blockmeta-list li {
    margin-bottom: 5px;
}

.wpe-blockmeta-json,
.wpe-blockmeta-array {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Date formatting styles */
.wpe-blockmeta-date {
    display: inline-block;
}

.wpe-blockmeta-date-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wpe-blockmeta-date-item {
    display: inline-block;
    padding: 2px 0;
}

/* Event Preset Styles */
.event-details {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    padding: 1em;
    background: #f9f9f9;
    border-radius: 4px;
}

.event-details > div {
    padding: 0.5em 0;
    border-bottom: 1px solid #e0e0e0;
}

.event-details > div:last-child {
    border-bottom: none;
}

.event-details strong {
    color: #333;
    margin-right: 0.5em;
}

.event-date,
.event-time,
.event-location,
.event-type,
.event-summary {
    font-size: 1em;
    line-height: 1.6;
}

.event-summary {
    margin-top: 0.5em;
}

/* Summary with image block */
.event-summary-block {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.event-summary-block .event-image {
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
}

.event-summary-block .event-image img {
    width: 100%;
    height: auto;
    display: block;
}

.event-summary-block .event-summary {
    font-size: 1em;
    line-height: 1.6;
    color: #444;
}

/* Compact format styles */
.wpe-blockmeta-wrapper.event-compact {
    font-size: 0.9em;
    color: #666;
}

/* Date and time specific formatting */
.event-datetime-full {
    font-weight: 500;
    color: #222;
}

/* Location + Time format */
.event-location-time {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    flex-wrap: wrap;
}

/* Responsive styles */
@media (max-width: 600px) {
    .wpe-blockmeta-image-gallery {
        flex-direction: column;
    }
    
    .wpe-blockmeta-json,
    .wpe-blockmeta-array {
        font-size: 12px;
        padding: 8px;
    }
    
    .event-details {
        padding: 0.75em;
        font-size: 0.95em;
    }
    
    .event-location-time {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .event-details {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    
    .event-details > div {
        border-bottom-color: #444;
    }
    
    .event-details strong {
        color: #fff;
    }
    
    .wpe-blockmeta-wrapper.event-compact {
        color: #ccc;
    }
}

/* Print styles */
@media print {
    .wpe-blockmeta-json,
    .wpe-blockmeta-array {
        background: white;
        border: 1px solid #000;
    }
}