/* talks/style.css */

html, body {
    height: 100%;
    margin: 0;
    font-family: sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 0 1em;
    height: 100%;
}

h1, h2 {
    flex-shrink: 0;
    margin: 0.5em 0;
}

p {
    flex-shrink: 0;
    margin: 0 0 0.5em;
}

.container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

.speaker-list, .talk-list {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.speaker-list {
    flex-shrink: 0;
}

.talk-list {
    flex-grow: 1;
}

speaker-table, talk-table {
    display: block;
    overflow-y: auto;
    border: 1px solid #ccc;
    flex-grow: 1;
}

/* Date column width */
talk-table th:first-child,
talk-table td:first-child {
    min-width: 90px;
    width: 90px;
    white-space: nowrap;
}

/* Desktop layout adjustments */
@media (min-width: 768px) {
    body.index-page .container {
        display: grid;
        grid-template-columns: max-content 1fr; /* Shrink speaker column to content */
        gap: 1em;
        /* Adjust height calc to account for h1 and p */
        height: calc(100% - 8em); 
    }

    body.speaker-page .container {
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
    }

    .speaker-list, .talk-list {
        height: 100%;
    }
}

/* Mobile layout adjustments */
@media (max-width: 767px) {
    .speaker-list {
        height: 30vh; /* Give speaker list a fixed height on mobile */
        margin-bottom: 1em;
    }
}
