/* ==========================================================================
   KSS Program / Archive / Gallery / Fotoreporty — Frontend styles
   ========================================================================== */

/* ---- Shared program list ---- */
.kss-program,
.kss-archiv,
.kss-galeria,
.kss-fotoreporty {
    margin: 0 0 40px;
}

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

/* ---- Month heading ---- */
.kss-program-month {
    margin-bottom: 40px;
}
.kss-program-month-title {
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid #e05060;
    padding-bottom: 6px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #fff;
}

/* ---- Program list row layout ---- */
.kss-program {
    background: #21242a;
    border-radius: 6px;
    padding: 8px 28px;
    margin: 0 0 40px;
}

.kss-program-list {
    display: flex;
    flex-direction: column;
}

.kss-program-item {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    text-decoration: none !important;
    color: inherit !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    transition: background .15s;
    padding: 8px 0 !important;
    background: transparent !important;
}
.kss-program-item:last-child {
    border-bottom: none !important;
}
.kss-program-item:hover {
    background: rgba(255,255,255,.07) !important;
}

/* Square thumbnail */
.kss-program-item-thumb {
    flex: 0 0 60px !important;
    width: 60px !important;
    height: 60px !important;
    overflow: hidden !important;
    border-radius: 3px;
    margin-right: 16px;
}
.kss-program-item-thumb img {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    object-fit: cover !important;
    display: block !important;
}
.kss-program-item-thumb-empty {
    width: 60px;
    height: 60px;
    background: #3a3a3a;
}

/* Date column */
.kss-program-item-date {
    flex: 0 0 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    margin-right: 20px;
}
.kss-program-item-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e05060;
    line-height: 1;
}
.kss-program-item-month {
    font-size: .78rem;
    color: #e05060;
    text-transform: lowercase;
}

/* Info column */
.kss-program-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.kss-program-item-meta {
    font-size: .8rem;
    color: #aaa;
    line-height: 1.3;
}
.kss-program-item-title {
    font-size: .95rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Action button */
.kss-program-item-action {
    flex: 0 0 auto;
    margin-left: 16px;
}
.kss-pill {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 4px;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: lowercase;
}
.kss-pill-buy,
.kss-pill-pos {
    background: #e05060;
    color: #fff !important;
}
.kss-pill-free {
    background: transparent;
    color: #e05060 !important;
    border: 1px solid #e05060;
}

/* ---- Archive year filter ---- */
.kss-archiv-years {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.kss-archiv-year-btn {
    padding: 5px 14px;
    border: 1px solid #ccc;
    border-radius: 20px;
    text-decoration: none;
    color: #444;
    font-size: .9rem;
    transition: background .15s, color .15s;
}
.kss-archiv-year-btn:hover,
.kss-archiv-year-btn.active {
    background: #d4a017;
    border-color: #d4a017;
    color: #fff;
}

/* ---- Gallery grid ---- */
.kss-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.kss-galeria-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 4/3;
}
.kss-galeria-item a {
    display: block;
    height: 100%;
    text-decoration: none;
}
.kss-galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.kss-galeria-item:hover img {
    transform: scale(1.05);
}
.kss-galeria-item-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    color: #fff;
    padding: 24px 12px 10px;
}
.kss-galeria-item-info h4 {
    margin: 0 0 2px;
    font-size: .9rem;
    font-weight: 700;
}
.kss-galeria-item-info span {
    font-size: .78rem;
    opacity: .85;
}

/* ---- Single event page ---- */
.kss-event-page-cover {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 20px;
}
.kss-event-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    font-size: .9rem;
    color: #666;
}
.kss-event-page-date {
    font-weight: 700;
    color: #333;
}
.kss-event-page-venue::before {
    content: '📍 ';
}

/* ---- Photo gallery on event page ---- */
.kss-photo-gallery {
    margin-top: 40px;
}
.kss-photo-gallery h3 {
    margin-bottom: 16px;
}
.kss-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.kss-gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 4/3;
}
.kss-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s;
}
.kss-gallery-item:hover img {
    transform: scale(1.05);
}

/* ---- POS notice on event page ---- */
.kss-tickets-pos-notice {
    margin-top: 32px;
    padding: 16px 20px;
    background: #f5f5f5;
    border-left: 4px solid #d4a017;
    border-radius: 4px;
    color: #444;
}

/* ========================================================================
   Single event page wrapper (served by plugin template)
   ======================================================================== */

.kss-single-event-wrap {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 24px;
    min-height: calc(100vh - 300px);
}

.kss-single-event-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 32px;
    color: #fff;
    line-height: 1.25;
}

/* ========================================================================
   Single event detail page — two-column layout
   ======================================================================== */

.kss-event-page {
    color: #f0f0f0;
}

/* Two-column flex row */
.kss-event-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Left column: description + gallery */
.kss-event-main {
    flex: 1 1 0;
    min-width: 0;
}

.kss-event-main-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.kss-event-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #ddd;
}

/* Right sidebar */
.kss-event-sidebar {
    flex: 0 0 380px;
    width: 380px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kss-event-sidebar-poster-box {
    background: #2d2f35;
    border-radius: 8px;
    overflow: hidden;
}

.kss-event-sidebar-cover {
    width: 100%;
    height: auto;
    display: block;
}

.kss-event-sidebar-info-box {
    background: #2d2f35;
    border-radius: 8px;
    overflow: hidden;
}

.kss-event-sidebar-meta {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kss-event-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .9rem;
    color: #ddd;
    line-height: 1.4;
}

.kss-meta-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-top: 2px;
    opacity: .75;
}

/* Action buttons inside sidebar */
.kss-btn-buy,
.kss-btn-pos-info,
.kss-btn-free-entry {
    display: block;
    margin: 16px 18px 18px;
    padding: 12px 16px;
    border-radius: 5px;
    text-align: center;
    font-size: .95rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .02em;
    cursor: pointer;
    border: none;
    box-sizing: border-box;
}

.kss-btn-buy {
    background: #e05060;
    color: #fff;
    transition: background .15s;
}
.kss-btn-buy:hover {
    background: #c93d4f;
    color: #fff;
}

.kss-btn-pos-info {
    background: #3a3a3a;
    color: #ddd;
    border: 1px solid #555;
}

.kss-btn-free-entry {
    background: transparent;
    color: #e05060;
    border: 1px solid #e05060;
}

/* Ticketing section below the two-column layout */
.kss-event-ticketing {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #444;
}

/* ---- Responsive ---- */
@media (max-width: 800px) {
    .kss-event-layout {
        flex-direction: column-reverse;
    }
    .kss-event-sidebar {
        flex: none;
        width: 100%;
    }
    .kss-event-sidebar-cover {
        aspect-ratio: 16/7;
    }
}

/* Back link (child → master) */
.kss-back-to-master {
    margin-bottom: 20px;
}
.kss-back-link {
    color: #aaa;
    font-size: .88rem;
    text-decoration: none;
}
.kss-back-link:hover {
    color: #e05060;
}

/* Termíny section (master event) */
.kss-terminy {
    margin-top: 32px;
}
.kss-terminy-title {
    font-size: 1.2rem;
    color: #fff;
    border-bottom: 1px solid #e05060;
    padding-bottom: 6px;
    margin-bottom: 12px;
}
.kss-terminy-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.kss-termin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.kss-termin-row:last-child {
    border-bottom: none;
}
.kss-termin-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.kss-termin-date {
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
}
.kss-termin-location,
.kss-termin-price {
    color: #aaa;
    font-size: .85rem;
}
.kss-termin-action {
    flex-shrink: 0;
}
.kss-btn-sm {
    padding: 7px 16px !important;
    font-size: .82rem !important;
    margin: 0 !important;
    display: inline-block !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

@media (max-width: 600px) {
    .kss-program-item-thumb {
        flex: 0 0 64px;
        width: 64px;
        height: 64px;
        margin-right: 12px;
    }
    .kss-program-item-date {
        flex: 0 0 52px;
        margin-right: 12px;
    }
    .kss-program-item-day { font-size: 1.4rem; }
    .kss-program-item-action { display: none; }
}

/* ---- Grid layout ---- */
.kss-program-grid {
    display: grid !important;
    grid-template-columns: repeat(var(--kss-cols, 4), 1fr);
    gap: 16px;
    padding: 16px !important;
}

.kss-program-card {
    display: flex;
    flex-direction: column;
    background: #2d2f35;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    transition: transform .15s, box-shadow .15s;
}
.kss-program-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.4);
}

.kss-program-card-img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
}
.kss-program-card-img-empty {
    width: 100%;
    aspect-ratio: 3/2;
    background: #3a3a3a;
}

.kss-program-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.kss-program-card-title {
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.kss-program-card-meta {
    font-size: .78rem;
    color: #aaa;
    line-height: 1.3;
}

@media (max-width: 900px) {
    .kss-program-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 500px) {
    .kss-program-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ---- List-noimage layout ---- */
.kss-program--noimage .kss-program-item--noimage {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0 !important;
    text-decoration: none !important;
    color: inherit !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    padding: 10px 0 !important;
    background: transparent !important;
    transition: background .15s;
}
.kss-program--noimage .kss-program-item--noimage:last-child {
    border-bottom: none !important;
}
.kss-program--noimage .kss-program-item--noimage:hover {
    background: rgba(255,255,255,.07) !important;
}

.kss-program-item-desc {
    font-size: .82rem;
    color: #999;
    line-height: 1.4;
    margin-top: 2px;
    white-space: normal;
}
