/* S5apps Schedule Styles v2.2 - FINAL */
.s5-schedule-wrapper { 
    font-family: 'Inter', sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto; 
    width: 100%; 
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* HEADER */
.s5-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid #f0f0f0; background: #fff; }
.s5-week-title { text-align: center; }
.s5-week-num { font-size: 16px; font-weight: 800; color: #1f2937; }
.s5-week-dates { font-size: 13px; color: #6b7280; }
.s5-nav-btn { background: #f3f4f6; border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-weight: bold; transition: 0.2s; }
.s5-nav-btn:hover { background: #e5e7eb; }

/* CLUB SWITCHER */
.s5-club-switcher { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; color: white; }
.s5-club-name { font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.s5-switch-btn { background: rgba(255,255,255,0.2); border: none; color: white; border-radius: 4px; padding: 4px 10px; cursor: pointer; }

/* --- COMMON ELEMENTS --- */
.s5-time { font-weight: 800; display: block; color: #1e293b; margin-bottom: 2px; font-size: 13px; }
.s5-loc { font-size: 11px; color: #64748b; display: block; margin-bottom: 2px; font-weight: 500;}
.s5-note { 
    font-size: 10px; display: block; width: 100%;
    line-height: 1.3; font-style: italic; color: #475569; 
    padding-top: 2px; border-top: 1px dashed rgba(0,0,0,0.1); margin-top: 2px;
}

/* BUBBLES & COLORS */
.s5-event-bubble { 
    background: #f8fafc; 
    border-radius: 6px; 
    padding: 8px 10px; 
    font-size: 12px; 
    margin-bottom: 6px; /* Standardni razmik */
    border-left: 4px solid #cbd5e1; 
    border: 1px solid #e2e8f0; 
    border-left-width: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    position: relative;
}

/* LOGIKA LEPLJENJA (MERGING) */
.s5-merged-top {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px dashed #e2e8f0;
    margin-bottom: 0;
}
.s5-merged-bottom {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none; 
    margin-top: 0;
}
.s5-merged-mid {
    border-radius: 0;
    border-top: none;
    border-bottom: 1px dashed #e2e8f0;
    margin: 0;
}

/* Special Colors */
.s5-event-yellow { background: #fefce8; border-left-color: #eab308; }
.s5-event-yellow .s5-time { color: #854d0e; }
.s5-event-red { background: #fef2f2; border-left-color: #ef4444; }
.s5-event-red .s5-time { color: #991b1b; }

/* GAP LINE (Črta za premor) */
.s5-time-gap { margin: 12px 0; display: flex; align-items: center; justify-content: center; height: 4px; opacity: 0.6; }
.s5-gap-line { width: 100%; height: 3px; border-radius: 2px; background-color: #ddd; }
.s5-mobile-gap { height: 4px; margin: 4px 0 10px 0; border-radius: 2px; opacity: 0.3; }

/* --- VIEW: MATRIX (TABLE - Desktop) --- */
.s5-table-container { overflow-x: auto; }
.s5-table { width: 100%; border-collapse: collapse; min-width: 900px; table-layout: fixed; }
.s5-table th { background: #f9fafb; padding: 10px 5px; text-align: center; border-bottom: 2px solid #e5e7eb; border-right: 1px solid #f1f5f9; font-size: 11px; text-transform: uppercase; color: #64748b; }
.s5-table td { border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; padding: 8px; vertical-align: top; height: 80px; }
.s5-table th:first-child, .s5-table td:first-child { 
    position: sticky; left: 0; background: #fff; z-index: 10; 
    border-right: 2px solid #e5e7eb; width: 110px; font-weight: 700; font-size: 13px; color: #1e293b;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05); padding-left: 15px; vertical-align: middle;
}
.s5-table th:first-child { background: #f9fafb; }

/* --- VIEW: DAY COLUMNS (Slika 2 - Desktop) --- */
.s5-week-grid { 
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; 
    border-top: 1px solid #e5e7eb; overflow-x: auto; min-width: 1000px;
}
.s5-day-col { border-right: 1px solid #e5e7eb; min-height: 300px; background: #fff; display: flex; flex-direction: column; }
.s5-day-col:last-child { border-right: none; }
.s5-day-header { 
    padding: 12px 5px; text-align: center; 
    border-bottom: 1px solid #e5e7eb; background: #f9fafb;
    font-weight: 700; font-size: 12px; text-transform: uppercase; color: #475569;
}
.s5-day-body { padding: 8px; display: flex; flex-direction: column; gap: 4px; }

/* FILTERS */
.s5-filters { padding: 15px; border-bottom: 1px solid #f0f0f0; display: flex; flex-wrap: wrap; gap: 6px; }
.s5-filter-btn { padding: 4px 10px; border: 1px solid #ddd; border-radius: 15px; font-size: 11px; font-weight: 600; cursor: pointer; background: white; }

/* --- MOBILE VIEW --- */
@media (max-width: 768px) {
    .s5-desktop-only { display: none !important; }
    .s5-mobile-view { display: block; padding: 10px; }

    /* Accordion Item */
    .s5-acc-item { margin-bottom: 12px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; overflow: hidden; }
    .s5-acc-header { padding: 12px 15px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; background: #f9fafb; border-bottom: 1px solid #f1f5f9; }
    .s5-acc-body { padding: 10px; background: #fff; display: none; } /* JS toggles this */
    .s5-acc-header.active { background: #fff; border-bottom: 2px solid #e5e7eb; }
    .s5-acc-header.active + .s5-acc-body { display: block; }

    /* Mobile Row (Za pogled "Po Selekcijah") */
    .s5-m-event { 
        padding: 10px 0; border-bottom: 1px solid #f1f5f9; 
        display: flex; gap: 15px; align-items: center; 
    }
    .s5-m-event:last-child { border-bottom: none; }
    .s5-m-date { font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; width: 60px; text-align: right; line-height: 1.2; }
    .s5-m-content { flex: 1; }
}

@media (min-width: 769px) {
    .s5-mobile-view { display: none !important; }
    .s5-desktop-only { display: block !important; }
}