/* SPC Events Manager - Frontend Styles */

.spc-events-wrap a,
.spc-events-wrap a:link,
.spc-events-wrap a:visited,
.spc-events-wrap a:hover,
.spc-events-wrap a:active {
    text-decoration: none !important;
}

.spc-events-wrap {
    --spc-accent: #00bcd4;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #222;
    box-sizing: border-box;
}

/* Header */
.spc-events-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.spc-events-logo {
    max-height: 70px;
    width: auto;
}

.spc-events-header-text {
    text-align: center;
}

.spc-events-title {
    font-size: 2.4em;
    font-weight: 900;
    margin: 0;
    line-height: 1.1;
    color: #111;
}

.spc-events-subtitle {
    font-size: 1.8em;
    font-weight: 700;
    color: #111;
}

/* Grid Layout - 6 columns per row */
.spc-events-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

/* Month Card */
.spc-month-card {
    border: 2.5px solid var(--spc-accent);
    border-radius: 18px;
    padding: 10px 14px 14px;
    background: #fff;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
    overflow: hidden;
    min-width: 0;
}

.spc-month-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.spc-month-empty {
    opacity: 0.6;
}

/* Month Name */
.spc-month-name {
    font-weight: 900;
    text-align: center;
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--spc-accent);
    text-transform: uppercase;
    color: #111;
    font-size: 0.85em;
    letter-spacing: 0;
    white-space: nowrap;
}

.spc-no-events {
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 0.85em;
    margin: auto 0;
}

/* Clickable Month Card */
.spc-month-card.spc-month-clickable {
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.spc-month-card.spc-month-clickable:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Event Link */
a.spc-event-item-link,
a.spc-event-item-link:link,
a.spc-event-item-link:hover,
a.spc-event-item-link:visited,
a.spc-event-item-link:active {
    text-decoration: none !important;
    color: inherit;
    display: block;
    cursor: pointer;
}

a.spc-event-item-link .spc-event-title,
a.spc-event-item-link .spc-event-desc,
a.spc-event-item-link .spc-event-highlight,
a.spc-event-item-link .spc-event-venue,
a.spc-event-item-link .spc-event-date-line,
a.spc-event-item-link .spc-event-day,
a.spc-event-item-link .spc-event-time {
    text-decoration: none !important;
}

a.spc-event-item-link:hover .spc-event-item {
    background: #f9f9f9;
    border-radius: 8px;
    margin-left: -6px;
    margin-right: -6px;
    padding-left: 6px;
    padding-right: 6px;
}

/* Event Item */
.spc-event-item {
    padding-top: 14px;
    padding-bottom: 14px;
    border-bottom: 2px dashed var(--spc-accent);
    min-width: 0;
}

/* When inside a link wrapper */
a.spc-event-item-link {
    border-bottom: 2px dashed var(--spc-accent);
    margin-bottom: 0;
}

a.spc-event-item-link .spc-event-item {
    border-bottom: none;
    padding-bottom: 0;
}

/* Remove border from last event */
.spc-event-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

a.spc-event-item-link:last-child {
    border-bottom: none;
}

a.spc-event-item-link:last-child .spc-event-item {
    padding-bottom: 0;
}

/* First event needs no top padding */
.spc-event-item:first-child,
a.spc-event-item-link:first-of-type .spc-event-item {
    padding-top: 0;
}

.spc-event-date-line {
    font-size: 0.82em;
    color: #333;
    margin-bottom: 3px;
    font-weight: 600;
}

.spc-event-day sup {
    font-size: 0.7em;
}

.spc-event-time {
    font-weight: 400;
    color: #555;
}

.spc-event-title {
    font-size: 0.92em;
    font-weight: 700;
    color: var(--spc-accent);
    margin-bottom: 3px;
    line-height: 1.3;
}

.spc-event-desc {
    font-size: 0.8em;
    color: #444;
    line-height: 1.4;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.spc-event-highlight {
    font-size: 0.8em;
    font-style: italic;
    color: var(--spc-accent);
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spc-event-venue {
    font-size: 0.78em;
    color: var(--spc-accent);
    font-weight: 600;
    margin-top: 3px;
}

/* Footer */
.spc-events-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

.spc-events-footer p {
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .spc-events-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .spc-events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .spc-events-title {
        font-size: 1.8em;
    }
    .spc-events-subtitle {
        font-size: 1.3em;
    }
}

@media (max-width: 600px) {
    .spc-events-wrap {
        padding: 15px;
    }
    .spc-events-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .spc-month-card {
        padding: 12px 10px;
    }
    .spc-events-title {
        font-size: 1.4em;
    }
    .spc-events-subtitle {
        font-size: 1em;
    }
}

@media (max-width: 400px) {
    .spc-events-grid {
        grid-template-columns: 1fr;
    }
}

/* Print styles */
@media print {
    .spc-events-wrap {
        max-width: 100%;
    }
    .spc-events-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
    }
    .spc-month-card {
        border-width: 1.5px;
        page-break-inside: avoid;
    }
}
