/* ==================== SRIS Events Display ==================== */

:root {
    --sris-brand-color: #930B7F;
    --sris-brand-light: #E8D5E3;
    --sris-text-dark: #333;
    --sris-text-light: #666;
    --sris-border-light: #E0E0E0;
    --sris-bg-light: #F9F9F9;
    --sris-success: #52c41a;
    --sris-warning: #faad14;
}

/* Container & Layout */
.sris-events-container {
    width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sris-events-wrapper {
    display: grid;
    gap: 24px;
}

.sris-events-grid .sris-events-wrapper {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.sris-events-list .sris-events-wrapper {
    grid-template-columns: 1fr;
}

/* Event Card */
.sris-event-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--sris-border-light);
    transition: transform 0.3s ease;
}

.sris-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(147, 11, 127, 0.15);
}

/* Image */
.sris-event-image-wrapper {
    position: relative;
    background: var(--sris-bg-light);
    overflow: hidden;
}

.sris-event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Status Badge */
.sris-event-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}
.sris-status-ongoing { background: var(--sris-success); }
.sris-status-upcoming { background: var(--sris-warning); }
.sris-status-ended { background: #D9D9D9; color: #333; }

/* Content */
.sris-event-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sris-event-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}
.sris-event-title a { color: var(--sris-text-dark); text-decoration: none; }
.sris-event-title a:hover { color: var(--sris-brand-color); }

/* Categories */
.sris-event-categories {
    margin-bottom: 12px;
}
.sris-event-category {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 5px;
    background: var(--sris-brand-light);
    color: var(--sris-brand-color);
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
}

/* Times */
.sris-event-times {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--sris-border-light);
    font-size: 13px;
    color: var(--sris-text-light);
}

.sris-event-sessions-summary {
    margin-top: 5px;
}

/* Footer Buttons */
.sris-event-footer {
    margin-top: auto;
}

.sris-event-link-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid var(--sris-text-dark);
    color: var(--sris-text-dark);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

.sris-event-link-btn:hover {
    background: var(--sris-text-dark) !important;
    color: #fff !important;
    border: unset;
}

/* Calendar Group - New Styles */
.sris-event-calendar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sris-event-calendar-btn {
    flex: 1;
    min-width: 45%; /* 讓按鈕在空間不足時換行，每行約兩個 */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 12px;
    background: var(--sris-brand-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.sris-event-calendar-btn:hover {
    background: #7A0860 !important;
    color: #fff !important;
}

.sris-event-calendar-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.sris-event-calendar-btn .dashicons {
    margin-right: 4px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}