/* Phase 2 (Typography) */

* {
    font-family: 'IBM Plex Sans', sans-serif;
    line-height: 1.25;
}

.source-code {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

table {
    line-height: 1.5;
}

header {
    font-size: 125%;
}

header a {
    color: #444;
}

header strong {
    font-weight: bold;
}

h1 {
    font-size: 150%;
}

h2.assignment-description {
    font-size: 100%;
}

body.login-page {
    font-size: 125%;
}

body.login-page input,
body.login-page button,
body.login-page label {
    font-size: inherit;
}

/* Phase 3 (Styling Links, Forms, and Tables) */

nav a {
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

table {
    width: 100%;
}

th {
    text-align: left;
}

th.column-with-number {
    text-align: right;
}

.column-with-number {
    text-align: right;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.input-wrapper {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.login-form input {
    width: 50%;
}

.button-wrapper {
    display: flex;
    justify-content: center;
}

.login-form button {
    width: 50%;
}

.submission-button-wrapper {
    display: flex;
    gap: 1rem;
}

/* Phase 4 Borders, Backgrounds, and Whitespace */

html, body {
    margin: 0;
    padding: 0;
}

header {
    background-color: #ddd;
    box-shadow: 0 0 5px gray;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
}

header strong {
    color: black;
    font-weight: bold;
    margin-right: 1rem;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

nav a {
    text-decoration: none;
    color: #444;
    font-weight: normal;
}

nav {
    flex-grow: 1;
}

main {
    padding: 0 1rem;
}

h1 {
    margin-top: 3rem;
    margin-bottom: 0;
}

h1 + p {
    margin-bottom: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

main > * {
    margin-bottom: 1rem;
}

.action-card {
    background-color: #b1c3de;
    padding: 1rem;
    border: 1px solid #204a87;
    border-radius: 5px;
}

table {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.assignment-description {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Phase 5 Flexible Box Layout */

header {
    width: 100%;
    background-color: #ddd;
    box-shadow: 0 0 5px gray;
    display: flex;
    justify-content: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 50rem;
    padding: 0.5rem 1rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 1rem;
}

nav {
    flex-grow: 0;
}

.action-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #b1c3de;
    padding: 1rem;
    border: 1px solid #204a87;
    border-radius: 5px;
}

.main {
    width: 100%;
    max-width: 50rem;
    margin: 0 auto;
    padding: 0 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
}

@media (max-width: 50rem) {
    .main {
        margin: 0 1rem;
        width: auto; /* Override width to allow full flexibility */
    }
}

body {
    overflow-x: hidden;
}

.login-form input,
.login-form button {
    width: 50%;
    max-width: 25rem;
}

@media (max-width: 50rem) {
    .login-form input,
    .login-form button {
        width: 100%; /* Makes them full width within their container */
        max-width: 100%;
    }
    table {
        max-width: 100%;
    }
}

/* Assignment 4 Changes Here */

.error-section {
    color: red;
    font-weight: bold;
    display: block;
}

output.error-message {
    color: red !important;
    font-weight: bold !important;
    display: block !important;
}

/*
.invalid-input {
    border: 2px solid red;
}
*/


input:invalid {
    border: 2px solid red !important;
}



/* Assignment 6 */
th.sort-column { cursor: pointer; }
th.sort-asc::after { content: " \25b2"; }
th.sort-desc::after { content: " \25bc"; }

output.upload-feedback {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}
.success-message {
    color: green;
}
.error-message {
    color: red;
}