/* Teacher timeline styles. */

#tab-teacher-timeline #teacher-posts-list {
    max-height: min(60rem, calc(100vh - 14rem));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
}

#tab-teacher-timeline #teacher-posts-list::-webkit-scrollbar {
    display: none;
}

#tab-teacher-timeline {
    gap: 1.25rem;
}

#tab-teacher-timeline #teacher-timeline-section {
    width: min(100%, 54rem);
    margin-inline: auto;
}

#tab-teacher-timeline #teacher-posts-list {
    display: grid;
    gap: 1rem;
    max-height: none;
    overflow: visible;
    padding: .15rem;
}

#tab-teacher-timeline #teacher-posts-list > article {
    padding: 1.1rem !important;
    border: 1px solid rgba(71, 85, 105, .68) !important;
    border-radius: 1rem !important;
    background:
        radial-gradient(ellipse at 100% 0, rgba(99, 102, 241, .07), transparent 40%),
        linear-gradient(145deg, rgba(15, 23, 42, .96), rgba(11, 17, 30, .98)) !important;
    box-shadow: 0 12px 30px rgba(2, 6, 23, .19), inset 0 1px rgba(255, 255, 255, .025);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#tab-teacher-timeline #teacher-posts-list > article:hover {
    border-color: rgba(129, 140, 248, .42) !important;
    box-shadow: 0 16px 34px rgba(2, 6, 23, .25), 0 0 0 1px rgba(129, 140, 248, .05);
    transform: translateY(-1px);
}

#tab-teacher-timeline #teacher-posts-list > article:nth-child(3n + 2),
#tab-teacher-timeline #teacher-posts-list > article:nth-child(3n) {
    border-left: 1px solid rgba(71, 85, 105, .68) !important;
    background:
        radial-gradient(ellipse at 100% 0, rgba(99, 102, 241, .07), transparent 40%),
        linear-gradient(145deg, rgba(15, 23, 42, .96), rgba(11, 17, 30, .98)) !important;
}

#tab-teacher-timeline #teacher-posts-list > article header {
    align-items: center;
    gap: .75rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid rgba(71, 85, 105, .42);
}

#tab-teacher-timeline #teacher-posts-list > article header img,
#tab-teacher-timeline #teacher-posts-list > article header > span {
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(165, 180, 252, .32);
    border-radius: 50%;
    background: linear-gradient(145deg, #37306a, #1d2b4a);
    color: #c7d2fe;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .08);
}

#tab-teacher-timeline #teacher-posts-list > article header h4 {
    color: #f1f5f9;
    font-size: .84rem;
    font-weight: 750;
}

#tab-teacher-timeline #teacher-posts-list > article header p {
    margin-top: .15rem;
    color: #8998ad;
    font-size: .7rem;
}

#tab-teacher-timeline #teacher-posts-list > article h3 {
    margin-top: .9rem;
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.45;
}

#tab-teacher-timeline #teacher-posts-list > article .teacher-timeline-post-content > p {
    margin-top: .4rem;
    color: #cbd5e1;
    font-size: .85rem;
    line-height: 1.7;
}

#tab-teacher-timeline #teacher-posts-list .teacher-post-image {
    max-height: 32rem;
    margin-top: .9rem;
    border: 1px solid rgba(71, 85, 105, .55);
    border-radius: .85rem;
    background: #080d18;
    box-shadow: 0 12px 30px rgba(2, 6, 23, .24);
    cursor: zoom-in;
    transition: border-color .18s ease, transform .18s ease;
}

#tab-teacher-timeline #teacher-posts-list .teacher-post-image:hover {
    border-color: rgba(165, 180, 252, .48);
    transform: scale(1.005);
}

#tab-teacher-timeline #teacher-posts-list > article .teacher-timeline-post-content > footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .55rem;
    margin-top: .85rem !important;
    padding-top: .75rem !important;
    border-top: 1px solid rgba(71, 85, 105, .42) !important;
}

#tab-teacher-timeline #teacher-posts-list button[data-post-like],
#tab-teacher-timeline #teacher-posts-list button[data-post-comments] {
    display: inline-flex;
    min-height: 2.25rem !important;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .45rem .7rem !important;
    border: 1px solid #29334a;
    border-radius: .7rem;
    background: rgba(8, 13, 25, .65);
    color: #a8b4c8;
    font-size: .73rem !important;
    font-weight: 650;
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

#tab-teacher-timeline #teacher-posts-list button[data-post-like]:hover {
    border-color: rgba(251, 113, 133, .3);
    background: rgba(159, 18, 57, .15);
    color: #fda4af;
}

#tab-teacher-timeline #teacher-posts-list button[data-post-like][data-liked="true"] {
    border-color: rgba(251, 113, 133, .25);
    background: rgba(159, 18, 57, .12);
    color: #fda4af;
}

#tab-teacher-timeline #teacher-posts-list button[data-post-comments] {
    margin-left: auto;
    border-color: rgba(129, 140, 248, .22);
    background: rgba(79, 70, 229, .1);
    color: #c7d2fe !important;
}

#tab-teacher-timeline #teacher-posts-list button[data-post-comments]:hover,
#tab-teacher-timeline #teacher-posts-list button[data-post-comments][aria-expanded="true"] {
    border-color: rgba(165, 180, 252, .46);
    background: rgba(79, 70, 229, .2);
}

#tab-teacher-timeline #teacher-posts-list [data-post-comments-container] > section {
    margin-top: .85rem;
    padding: .85rem;
    border: 1px solid rgba(71, 85, 105, .42);
    border-radius: .85rem;
    background: rgba(8, 13, 25, .42);
}

#tab-teacher-timeline #teacher-posts-list .teacher-post-comment-list > ul {
    max-height: min(26rem, 55vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: .25rem;
    scrollbar-color: #475569 transparent;
    scrollbar-width: thin;
}

#tab-teacher-timeline #teacher-posts-list [data-post-comments-container] li {
    border: 1px solid rgba(71, 85, 105, .4);
    border-radius: .75rem;
    background: rgba(20, 27, 45, .68);
}

#tab-teacher-timeline #teacher-posts-list [data-post-comments-container] textarea {
    min-height: 2.65rem;
    border-color: #35415a;
    background: #090f1c;
    transition: border-color .16s ease, box-shadow .16s ease;
}

#tab-teacher-timeline #teacher-posts-list [data-post-comments-container] textarea:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

@media (max-width: 540px) {
    #tab-teacher-timeline #teacher-posts-list > article { padding: .85rem !important; }
    #tab-teacher-timeline #teacher-posts-list > article .teacher-timeline-post-content > footer { flex-wrap: wrap; }
    #tab-teacher-timeline #teacher-posts-list button[data-post-comments] { margin-left: 0; }
}

#tab-teacher-timeline .teacher-timeline-header {
    display: flex;
    width: min(100%, 54rem);
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-inline: auto;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(71, 85, 115, .56);
    border-radius: 1rem;
    background:
        radial-gradient(ellipse at 100% 0, rgba(99, 102, 241, .14), transparent 44%),
        linear-gradient(125deg, rgba(18, 27, 46, .96), rgba(13, 19, 33, .95));
    box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

#tab-teacher-timeline .teacher-timeline-kicker {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .28rem;
    color: #a5b4fc;
    font-size: .66rem;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}

#tab-teacher-timeline .teacher-timeline-header h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.25rem !important;
    font-weight: 780;
    letter-spacing: -.025em;
}

#tab-teacher-timeline .teacher-timeline-header p {
    margin: .25rem 0 0;
    color: #9aa8bd;
    font-size: .75rem;
    line-height: 1.5;
}

#tab-teacher-timeline .teacher-timeline-statuses {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: .4rem;
}

#tab-teacher-timeline .teacher-timeline-server-status,
#tab-teacher-timeline .teacher-timeline-live-status {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .55rem;
    border: 1px solid rgba(71, 85, 115, .48);
    border-radius: 999px;
    background: rgba(8, 13, 25, .48);
    color: #aab6c9;
    font-size: .63rem;
    font-weight: 650;
    white-space: nowrap;
}

#tab-teacher-timeline .teacher-timeline-server-status i { color: #60a5fa; font-size: .45rem; }

#tab-teacher-timeline .teacher-timeline-live-status i { color: #fbbf24; font-size: .45rem; }

#tab-teacher-timeline .teacher-timeline-live-status[data-state="live"] i { color: #4ade80; }

#tab-teacher-timeline .teacher-timeline-live-status[data-state="offline"] i { color: #fb7185; }

#tab-teacher-timeline .teacher-timeline-section {
    width: min(100%, 54rem);
    margin-inline: auto;
}

#tab-teacher-timeline .teacher-timeline-feed {
    position: relative;
    display: grid;
    gap: .9rem;
    max-height: none;
    overflow: visible;
    padding: .1rem;
}

#tab-teacher-timeline .teacher-timeline-placeholder {
    display: flex;
    min-height: 7rem;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 1.2rem;
    border: 1px dashed rgba(100, 116, 139, .42);
    border-radius: 1rem;
    background: rgba(15, 23, 42, .55);
    color: #94a3b8;
    font-size: .8rem;
}

#tab-teacher-timeline #teacher-posts-list > article {
    position: relative;
    padding: 1.05rem !important;
    border: 1px solid rgba(71, 85, 115, .56) !important;
    border-left: 1px solid rgba(71, 85, 115, .56) !important;
    border-radius: 1rem !important;
    background:
        radial-gradient(ellipse at 100% 0, rgba(99, 102, 241, .07), transparent 44%),
        rgba(13, 19, 33, .94) !important;
    box-shadow: 0 10px 28px rgba(2, 6, 23, .18), inset 0 1px rgba(255, 255, 255, .02);
}

#tab-teacher-timeline #teacher-posts-list > article:nth-child(3n + 2),
#tab-teacher-timeline #teacher-posts-list > article:nth-child(3n) {
    border-left: 1px solid rgba(71, 85, 115, .56) !important;
    background:
        radial-gradient(ellipse at 100% 0, rgba(99, 102, 241, .07), transparent 44%),
        rgba(13, 19, 33, .94) !important;
}

#tab-teacher-timeline #teacher-posts-list > article header {
    padding-bottom: .75rem;
    border-bottom-color: rgba(71, 85, 115, .35);
}

#tab-teacher-timeline #teacher-posts-list > article header h4 { font-size: .8rem; }

#tab-teacher-timeline #teacher-posts-list > article h3 {
    margin-top: .9rem;
    font-size: 1rem;
    line-height: 1.45;
}

#tab-teacher-timeline #teacher-posts-list > article .teacher-timeline-post-content > p {
    color: #cbd5e1;
    font-size: .83rem;
    line-height: 1.7;
}

#tab-teacher-timeline #teacher-posts-list .teacher-post-image {
    max-height: min(34rem, 72vh);
    border-radius: .85rem;
    cursor: zoom-in;
}

#tab-teacher-timeline .teacher-post-image-dialog {
    position: fixed;
    width: min(92vw, 72rem);
    max-width: none;
    max-height: 92vh;
    overflow: visible;
    padding: 2.8rem .75rem .75rem;
    border: 1px solid rgba(148, 163, 184, .3);
    border-radius: 1rem;
    background: rgba(8, 13, 25, .96);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}

#tab-teacher-timeline .teacher-post-image-dialog[open] {
    display: grid;
    place-items: center;
}

#tab-teacher-timeline .teacher-post-image-dialog::backdrop {
    background: rgba(2, 6, 23, .82);
    backdrop-filter: blur(7px);
}

#tab-teacher-timeline .teacher-post-image-dialog form {
    position: absolute;
    top: .55rem;
    right: .6rem;
}

#tab-teacher-timeline .teacher-post-image-close {
    display: grid;
    width: 2.2rem;
    min-height: 2.2rem !important;
    place-items: center;
    border: 1px solid #3c465d;
    border-radius: .7rem;
    background: #151d2d;
    color: #e2e8f0;
    font-size: .85rem !important;
}

#tab-teacher-timeline .teacher-post-image-dialog img {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 4rem);
    border-radius: .6rem;
    object-fit: contain;
}

@media (max-width: 540px) {
    #tab-teacher-timeline .teacher-timeline-header {
        align-items: flex-start;
        flex-direction: column;
    }
    #tab-teacher-timeline .teacher-timeline-statuses {
        width: 100%;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

#tab-teacher-timeline .teacher-timeline-header {
    border-color: rgba(251, 113, 133, .25);
    background:
        radial-gradient(ellipse at 100% 0, rgba(225, 29, 72, .16), transparent 44%),
        linear-gradient(125deg, #241426, #0d1322 65%, #211429);
}

#tab-teacher-timeline .teacher-timeline-kicker { color: #fda4af; }

#tab-teacher-timeline .teacher-timeline-live-status[data-state="live"] i {
    color: #10b981;
    animation: dashboard-online-pulse 1.8s ease-out infinite;
}

#tab-teacher-timeline .teacher-timeline-live-status[data-state="connecting"] i,
#tab-teacher-timeline .teacher-timeline-live-status[data-state="reconnecting"] i { color: #fbbf24; }

#tab-teacher-timeline .teacher-timeline-live-status[data-state="offline"] i { color: #fb7185; }

#tab-teacher-timeline #teacher-posts-list > article,
#tab-teacher-timeline #teacher-posts-list > article:nth-child(3n + 2),
#tab-teacher-timeline #teacher-posts-list > article:nth-child(3n) {
    border-color: rgba(100, 67, 87, .62) !important;
    background:
        radial-gradient(ellipse at 100% 0, rgba(190, 24, 93, .08), transparent 42%),
        linear-gradient(145deg, rgba(24, 21, 37, .96), rgba(13, 19, 33, .98)) !important;
}

#tab-teacher-timeline #teacher-posts-list > article:hover { border-color: rgba(244, 63, 94, .42) !important; }

#tab-teacher-timeline #teacher-posts-list .teacher-post-image {
    border-color: rgba(244, 63, 94, .26);
    box-shadow: 0 12px 30px rgba(2, 6, 23, .24), 0 0 18px rgba(190, 24, 93, .06);
}

#tab-teacher-timeline #teacher-posts-list .teacher-post-image:hover { border-color: rgba(251, 113, 133, .52); }

#tab-teacher-timeline #teacher-posts-list button[data-post-like][data-liked="true"],
#tab-teacher-timeline #teacher-posts-list button[data-post-like]:hover {
    border-color: rgba(251, 113, 133, .3);
    background: rgba(190, 24, 93, .16);
    color: #fda4af;
}

#tab-teacher-timeline #teacher-posts-list button[data-post-comments] {
    border-color: rgba(167, 139, 250, .24);
    background: rgba(109, 40, 217, .12);
    color: #ddd6fe !important;
}

#tab-teacher-timeline #teacher-posts-list button[data-post-comments]:hover,
#tab-teacher-timeline #teacher-posts-list button[data-post-comments][aria-expanded="true"] {
    border-color: rgba(196, 181, 253, .45);
    background: rgba(109, 40, 217, .22);
}

#tab-teacher-timeline .teacher-post-image-dialog { border-color: rgba(244, 63, 94, .28); }

#tab-teacher-timeline .teacher-timeline-header,
#tab-teacher-timeline #teacher-timeline-section {
    width: min(100%, 78rem);
}

#tab-teacher-timeline .teacher-timeline-post-content {
    min-width: 0;
}

#tab-teacher-timeline #teacher-posts-list [data-post-comments-container]:empty {
    display: none;
}

@media (min-width: 1100px) {
    #tab-teacher-timeline #teacher-posts-list > article.has-open-comments {
        display: grid;
        grid-template-columns: minmax(0, 1.55fr) minmax(20rem, .9fr);
        align-items: start;
        gap: 1.15rem;
    }
    #tab-teacher-timeline #teacher-posts-list > article.has-open-comments [data-post-comments-container] {
        min-width: 0;
    }
    #tab-teacher-timeline #teacher-posts-list > article.has-open-comments [data-post-comments-container] > section {
        margin-top: 0;
        border-top: 0;
        padding: 0 .2rem .2rem 0;
    }
}
