/* The broadcast schedule (/takvim/, ajax/schedule/day): a card per anime with
   its poster, the time in Turkey, what kind of anime it is and its next episode.
   Colours are the theme's own — the dark panels of comments.css, the site's red —
   with the light theme's counterparts first. */

/* ---- day tabs: how many air that day, and which day is today ---- */

#site .takvim-sekmeler > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#site .takvim-sekme-sayi {
    min-width: 20px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    border-radius: 999px;
    background: rgba(127, 127, 127, .2);
}

#site .takvim-sekmeler > li.active .takvim-sekme-sayi {
    color: #fff;
    background: #d9534f;
}

#site .takvim-sekme--bugun > a {
    box-shadow: inset 0 -2px 0 #d9534f;
}

/* ---- the day ---- */

#site .takvim-ozet {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
    padding: 8px 12px;
    font-size: 12px;
    border: 1px solid rgba(127, 127, 127, .2);
    border-radius: 8px;
    background: rgba(127, 127, 127, .06);
}

#site .takvim-ozet-gun {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

#site .takvim-ozet-not {
    opacity: .75;
}

#site .takvim-rozet {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 800;
    line-height: 14px;
    letter-spacing: .3px;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid rgba(127, 127, 127, .3);
    background: rgba(127, 127, 127, .12);
}

/* "• BUGÜN", "• YENİ SEZON": plain words after a coloured dot, no box */
#site .takvim-rozet--bugun,
#site .takvim-rozet--yeni {
    gap: 6px;
    padding: 0;
    font-size: 11px;
    letter-spacing: .6px;
    border: 0;
    background: none;
}

#site .takvim-rozet--bugun::before,
#site .takvim-rozet--yeni::before {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d9534f;
}

#site .takvim-rozet--yeni::before {
    background: #3c9a5f;
}

/* ---- the cards: two to a row, one on a phone ---- */

#site .takvim-listesi {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#site .takvim-kart {
    display: flex;
    gap: 12px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(127, 127, 127, .2);
    border-radius: 10px;
    background: rgba(127, 127, 127, .05);
    transition: border-color .18s ease, background-color .18s ease, opacity .18s ease;
}

#site .takvim-kart:hover {
    border-color: #d9534f;
}

#site .takvim-kart--yeni {
    border-color: rgba(60, 154, 95, .6);
}

/* already aired today: still there, quieter */
#site .takvim-kart--gecti {
    opacity: .55;
}

#site .takvim-kart--gecti:hover {
    opacity: 1;
}

#site .takvim-afis {
    flex: 0 0 72px;
    align-self: flex-start;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

#site .takvim-afis img {
    display: block;
    width: 72px;
    height: 102px;
    object-fit: cover;
}

#site .takvim-govde {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

#site .takvim-ust {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* the time, as the home page's cards show theirs (an fa-clock and the text,
   no box), a size up: it is what this page is read for */
#site .takvim-saat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    line-height: 16px;
    font-variant-numeric: tabular-nums;
}

#site .takvim-saat .fa {
    font-size: 12px;
    opacity: .8;
}

#site .takvim-ad {
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#site .takvim-meta {
    font-size: 11px;
    opacity: .75;
}

/* this week's episode on the site: "• Yayınlandı" (a link to it), else "• Bekleniyor" */
#site .takvim-durum {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 6px;
    font-weight: 700;
    color: inherit;
}

#site .takvim-durum::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(127, 127, 127, .7);
}

#site .takvim-durum--yayinda {
    color: #3c9a5f;
}

#site .takvim-durum--yayinda::before {
    background: #3c9a5f;
}

/* "5. Bölüm • Yayınlandı": one link, to the episode's page */
#site .takvim-bolum {
    color: inherit;
}

#site .takvim-bolum:hover,
#site .takvim-bolum:focus {
    text-decoration: none;
}

#site .takvim-bolum:hover .takvim-durum--yayinda,
#site .takvim-bolum:focus .takvim-durum--yayinda {
    text-decoration: underline;
}

#site.dark .takvim-durum--yayinda {
    color: #6fcf97;
}

#site.dark .takvim-durum--yayinda::before {
    background: #6fcf97;
}

#site .takvim-turler {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

#site .takvim-turler span {
    padding: 1px 7px;
    font-size: 10px;
    border-radius: 3px;
    background: rgba(127, 127, 127, .14);
}

#site .takvim-sonraki {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
    margin-top: auto;
    padding-top: 4px;
    font-size: 11px;
}

#site .takvim-sonraki .fa {
    color: #d9534f;
}

#site .takvim-kalan {
    opacity: .7;
}

/* ---- dark theme: the comment section's panels ---- */

#site.dark .takvim-ozet {
    border-color: #17191f;
    background: #23252c;
}

#site.dark .takvim-kart {
    border-color: #17191f;
    background: #1e2026;
}

#site.dark .takvim-kart:hover {
    border-color: #36546f;
    background: #22242b;
}

#site.dark .takvim-kart--yeni {
    border-color: #264f3c;
}

#site.dark .takvim-ad {
    color: #eef2f7;
}

#site.dark .takvim-saat {
    color: #c5c8ce;
}

#site.dark .takvim-meta,
#site.dark .takvim-ozet-not {
    color: #9fb0c3;
    opacity: 1;
}

#site.dark .takvim-turler span {
    color: #cfd9e5;
    background: #23252c;
}

#site.dark .takvim-sekme-sayi {
    background: #23252c;
}

@media (max-width: 767px) {
    #site .takvim-listesi {
        grid-template-columns: minmax(0, 1fr);
    }

    /* seven days do not fit a phone's width with their counts */
    #site .takvim-sekme-sayi {
        display: none;
    }
}
