/**
 * Planetarium Events - Public Styles
 * Styled to match Planetarium Berlin website
 */

.planetarium-events-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    max-width: 100%;
    margin: 0 auto;
}

/* Section Titles */
.pe-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Events List */
.pe-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Event Item */
.pe-event-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pe-event-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Date Badge - Simple circular style like planetarium.berlin */
.pe-event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    background: #667eea;
    border-radius: 50%;
    color: #fff;
    text-align: center;
    flex-shrink: 0;
}

.pe-event-date-badge .pe-day {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.pe-event-date-badge .pe-month {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 500;
}

/* Event Details */
.pe-event-details {
    flex: 1;
    min-width: 0;
}

.pe-event-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #333;
}

.pe-event-planetarium {
    display: inline-block;
    font-size: 0.85rem;
    color: #666;
    margin-right: 12px;
}

.pe-event-notes {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 0.75rem;
    color: #555;
    margin-left: 8px;
}

/* Event Status Labels */
.pe-event-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.pe-event-status.sold_out {
    background: #ffebee;
    color: #c62828;
}

.pe-event-status.cancelled {
    background: #f5f5f5;
    color: #757575;
}

/* Event Action / Ticket Button */
.pe-event-action {
    flex-shrink: 0;
}

.pe-ticket-button {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 100px;
    border: 2px solid #0023ed;
    background: #0023ed;
    color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.pe-ticket-button:hover {
    background: #fff;
    color: #0023ed;
    text-decoration: none;
}

.pe-sold-out-label {
    display: inline-block;
    padding: 10px 20px;
    background: #f5f5f5;
    color: #999;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 4px;
}

/* Past Events Section */
.pe-past-events {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.pe-past-events .pe-section-title {
    color: #888;
    border-bottom-color: #e0e0e0;
}

.pe-past-item {
    opacity: 0.8;
    background: #f9f9f9;
}

.pe-past-item:hover {
    opacity: 1;
}

.pe-past-date {
    font-size: 0.875rem;
    color: #888;
}

.pe-past-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.pe-past-link:hover {
    text-decoration: underline;
}

.pe-more-past {
    text-align: center;
    margin-top: 15px;
    color: #888;
}

/* No Events Message */
.pe-no-events {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .pe-event-item {
        flex-wrap: wrap;
    }
    
    .pe-event-date-badge {
        min-width: 60px;
        padding: 8px;
    }
    
    .pe-event-date-badge .pe-day {
        font-size: 1.5rem;
    }
    
    .pe-event-details {
        order: 2;
        width: 100%;
        margin-top: 15px;
    }
    
    .pe-event-action {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    .pe-ticket-button,
    .pe-sold-out-label {
        display: block;
        text-align: center;
        width: 100%;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .pe-event-item {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .pe-event-title {
        color: #e0e0e0;
    }
    
    .pe-event-info,
    .pe-event-planetarium {
        color: #aaa;
    }
    
    .pe-past-item {
        background: #252525;
    }
    
    .pe-no-events {
        background: #252525;
        color: #aaa;
    }
}

/* Widget Styles */
.pe-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pe-widget-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.pe-widget-item:last-child {
    border-bottom: none;
}

.pe-widget-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    padding: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    color: #fff;
    text-align: center;
}

.pe-widget-day {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.pe-widget-month {
    font-size: 0.625rem;
    text-transform: uppercase;
    font-weight: 500;
}

.pe-widget-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.pe-widget-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pe-widget-time {
    font-size: 0.75rem;
    color: #666;
}

.pe-widget-link {
    display: inline-block;
    margin-top: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
}

.pe-widget-link:hover {
    text-decoration: underline;
}

.pe-widget-sold-out {
    display: inline-block;
    margin-top: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #dc3545;
}

.pe-widget-no-events {
    color: #666;
    font-style: italic;
}

/* Widget Dark Mode */
@media (prefers-color-scheme: dark) {
    .pe-widget-item {
        border-color: #404040;
    }
    
    .pe-widget-title {
        color: #e0e0e0;
    }
    
    .pe-widget-time {
        color: #aaa;
    }
}

/* ===== Planetarium Events Plugin - Public Styles ===== */

.pe-event-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 100%;
    margin: 0;
    padding: 20px 0;
}

.pe-event-container * {
    box-sizing: border-box;
}

/* Header styling */
.pe-events-header {
    margin-bottom: 20px;
}

.pe-events-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
}

.pe-events-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Section styling */
.pe-section {
    margin-bottom: 30px;
}

.pe-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #0023ed;
    display: inline-block;
}

/* Event card styling - cleaner design */
.pe-events-list {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.pe-event-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.pe-event-item:last-child {
    border-bottom: none;
}

.pe-event-item:hover {
    background: #fafafa;
}

/* Date display - text only, no circle */
.pe-event-date {
    flex: 0 0 auto;
    min-width: 100px;
}

.pe-date-text {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Event details */
.pe-event-details {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pe-event-title {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
}

.pe-event-planetarium {
    font-size: 14px;
    color: #666;
}

/* Buttons */
.pe-event-action {
    flex: 0 0 auto;
}

/* Ticket button styling */
.pe-ticket-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 100px;
    border: 2px solid #0023ed;
    background: #0023ed;
    color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.pe-ticket-button:hover {
    background: #fff;
    color: #0023ed;
    text-decoration: none;
}

.pe-sold-out-label {
    font-size: 14px;
    color: #999;
    font-style: italic;
}

/* Past events - compact single row with date + planetarium */
.pe-past-events {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.pe-past-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pe-past-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
}

.pe-past-date {
    color: #333;
    font-weight: 500;
}

.pe-past-planetarium {
    color: #888;
    font-size: 12px;
}

/* Empty state */
.pe-no-events {
    text-align: center;
    padding: 30px 20px;
    color: #666;
}

.pe-no-events p {
    font-size: 16px;
    margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .pe-event-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 15px 20px;
    }
    
    .pe-event-date {
        width: 100%;
    }
    
    .pe-date-text {
        font-size: 16px;
    }
    
    .pe-event-details {
        width: 100%;
    }
    
    .pe-event-action {
        width: 100%;
    }
    
    .pe-ticket-button {
        width: 100%;
        text-align: center;
    }
}
