/**
 * Yuebing Baseball Events Styles
 */

/* Color Palette */
.yb {
    --yb-primary: #214001; /* Medium Green */
    --yb-secondary: #142611; /* Dark Green */
    --yb-dark: #022601; /* Very Dark Green */
    --yb-light: #F2F2F2; /* Off-White */
    --yb-info: #A6A6A6; /* Medium Grey */
    --yb-accent: #FF7F00; /* Vibrant Orange */
}

/* Main Container */
.yb.yb-calendar-container {
    max-width: 1200px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--yb-dark);
}

/* Filters Row */
.yb-calendar-filters {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px 25px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
}

.yb-filter-label {
    font-weight: 700;
    font-size: 14px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yb-filter-options {
    display: flex;
    gap: 15px;
}

.yb-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px; /* Match badge border-radius */
    transition: all 0.2s ease;
}

.yb-filter-checkbox:hover {
    border-color: #7fb069;
    background: #f1f8e9;
}

.yb-filter-checkbox input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.yb-filter-checkbox.is-active.yb-filter-s { background: #e3f2fd; color: #1976d2; border-color: #bbdefb; }
.yb-filter-checkbox.is-active.yb-filter-j { background: #f1f8e9; color: #388e3c; border-color: #dcedc8; }
.yb-filter-checkbox.is-active.yb-filter-u15 { background: #fff3e0; color: #f57c00; border-color: #ffe0b2; }
.yb-filter-checkbox.is-active.yb-filter-u12 { background: #f3e5f5; color: #7b1fa2; border-color: #e1bee7; }

.yb-filter-checkbox.is-active .yb-checkbox-label {
    color: inherit; /* Inherit color from parent */
}

.yb-no-events {
    padding: 40px;
    text-align: center;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    color: #888;
    font-style: italic;
}

.yb-event-list {
    border-top: 1px solid #eee;
}

/* Single Event Item */
.yb-event-item {
    display: flex;
    padding: 40px 0;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
}

/* Left Date Block */
.yb-event-date-block {
    flex: 0 0 120px;
    text-align: center;
    padding-right: 30px;
    border-right: 1px dotted #ccc;
    margin-right: 40px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.yb-event-day {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: #222;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.yb-event-month-year {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--yb-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Thumbnail in List View */
.yb-event-thumbnail {
    flex: 0 0 150px;
    margin-right: 30px;
}

.yb-event-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Right Content Block */
.yb-event-content {
    flex: 1;
}

.yb-event-title {
    margin: 0 0 15px 0;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
}

.yb-event-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.yb-event-title a:hover {
    color: var(--yb-primary);
}

/* Meta Row (Time, Location, Category) */
.yb-event-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    color: #888;
    font-size: 14px;
}

.yb-meta-item {
    display: flex;
    align-items: center;
}

.yb-meta-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    color: var(--yb-primary);
}

/* Age Group Badges */
.yb-event-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.yb-age-badge {
    display: inline-block;
    padding: 2px 10px;
    background: #f0f0f0;
    color: #444;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px; /* Runda hörn som önskat */
    border: 1px solid #ddd;
    line-height: 1.4;
}

/* Optional: Different colors for different age groups */
.yb-age-badge-s { background: #e3f2fd; color: #1976d2; border-color: #bbdefb; }
.yb-age-badge-j { background: #f1f8e9; color: #388e3c; border-color: #dcedc8; }
.yb-age-badge-u15 { background: #fff3e0; color: #f57c00; border-color: #ffe0b2; }
.yb-age-badge-u12 { background: #f3e5f5; color: #7b1fa2; border-color: #e1bee7; }

.yb-event-excerpt {
    color: #666;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 25px;
    max-width: 800px;
}

.yb-event-excerpt p {
    margin: 0;
}

/* Read More Button */
.yb-read-more {
    display: inline-block;
    background: var(--yb-accent);
    color: #fff !important;
    padding: 12px 30px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 0; /* Square edges as per design */
    transition: all 0.3s ease;
    text-transform: none;
}

.yb-read-more:hover {
    background: var(--yb-accent);
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Grid View Styles */
.yb-grid-view .yb-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
    border-top: none; /* Override list border */
}

.yb-event-card {
    background: #fff;
    border: 1px solid #eee;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.yb-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.yb-event-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.yb-event-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.yb-event-card-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.yb-event-card-date {
    flex: 0 0 50px;
    text-align: center;
    padding-right: 15px;
    border-right: 1px dotted #ccc;
    margin-right: 15px;
}

.yb-event-card-day {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #222;
    line-height: 1;
}

.yb-event-card-month {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #7fb069;
    text-transform: uppercase;
}

.yb-event-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.yb-event-card-title a {
    color: #333;
    text-decoration: none;
}

.yb-event-card-meta {
    margin-bottom: 20px;
    flex: 0 0 auto;
}

.yb-event-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    flex: 1;
}

.yb-event-card .yb-read-more {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* Single Event Styles */
.yb.content-area {
    max-width: 1200px; /* Same as calendar container */
    margin: 40px auto;
    padding: 0 20px;
}

.yb-single-event-container {
    width: 100%;
}

.yb-single-event {
    display: flex;
    gap: 30px;
}

.yb-single-event .yb-event-content {
    flex: 1;
}

.yb-single-event .yb-event-title {
    font-size: 32px; /* Slightly smaller for single view */
    margin-top: 0;
}

.yb-single-event .yb-event-content-area {
    margin-top: 20px;
}

/* Responsive Fixes for Grid */
@media (max-width: 768px) {
    .yb-event-item {
        padding: 30px 15px;
    }
    .yb-event-date-block {
        flex: 0 0 90px;
        margin-right: 20px;
        padding-right: 15px;
    }
    .yb-event-day {
        font-size: 36px;
    }
    .yb-event-title {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .yb-grid-view .yb-event-grid {
        grid-template-columns: 1fr;
    }
    .yb-event-item {
        flex-direction: column;
    }
    .yb-event-date-block {
        flex: none;
        border-right: none;
        border-bottom: 1px dotted #ccc;
        margin-right: 0;
        margin-bottom: 25px;
        padding-right: 0;
        padding-bottom: 15px;
        text-align: left;
        align-items: flex-start;
        min-height: auto;
    }
}
