/* Visual style copied from website26 (privacy.html / index.html) so the two sites match. */

@font-face {
    font-family: 'CompSoc';
    src: url('/compsoc-font.otf.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

:root {
    --oxford: #002147;
    --text: #ffffff;
    --display: 'CompSoc', sans-serif;
    --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --gradient: linear-gradient(90deg, #00C5Ba 0%, #53D13D 50%, #FA9523 100%);
    --gradient-diag: linear-gradient(135deg, #00C5Ba 0%, #53D13D 50%, #FA9523 100%);
    --muted: rgba(255, 255, 255, 0.6);
    --line: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    background-color: var(--oxford);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Tessellating background */
body::before {
    content: '';
    position: fixed;
    left: -100%;
    right: -100%;
    bottom: 0;
    height: 250%;
    background-image: url("/assets/tessellation.webp");
    background-repeat: repeat;
    background-size: 500px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
    filter: grayscale(100%) invert(100%);
    transform-origin: left bottom;
    transform: perspective(2000px) rotateX(25deg);
}

/* Top gradient border */
.top-border {
    height: 3px;
    background: var(--gradient);
    margin: 0 2.5rem;
    position: relative;
    z-index: 10;
}

/* NAV */
nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 2.5rem;
    height: 70px;
    position: relative;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: auto;
}

.logo img {
    height: 72px;
    width: auto;
}

.nav-link {
    position: relative;
    top: 0.15em; /* the CompSoc glyphs sit high in their line box */
    font-family: var(--display);
    font-size: 1.4rem;
    line-height: 1;
    letter-spacing: 0.12em;
    color: white;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

/* Underline is absolutely positioned so it doesn't push the text off-centre */
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0.12em;
    bottom: -6px;
    height: 2px;
    background: var(--gradient);
}

.nav-link:hover {
    color: #53D13D;
}

/* Secondary nav actions (admin, log out) without the gradient underline */
.nav-link.plain::after {
    content: none;
}

/* MAIN */
main {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2.5rem 5rem;
    font-family: var(--body);
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

main.wide {
    max-width: 1500px;
}

main h1 {
    font-family: var(--display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: normal;
    letter-spacing: 0.08em;
    color: white;
    margin-bottom: 0.5rem;
}

main h2 {
    font-family: var(--body);
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin: 2.5rem 0 0.8rem;
}

main p {
    margin-bottom: 1rem;
}

main a,
footer a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    transition: border-color 0.2s;
}

main a:hover,
footer a:hover {
    border-bottom-color: white;
}

/* FORMS */
form {
    display: grid;
    gap: 1rem;
    max-width: 420px;
}

form.wide {
    max-width: none;
}

label {
    display: grid;
    gap: 0.3rem;
    font-weight: 500;
    color: white;
}

label.inline {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

input,
select,
textarea {
    font: inherit;
    color: white;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    padding: 0.6rem 0.75rem;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #53D13D;
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
}

select option {
    background: var(--oxford);
}

input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #53D13D;
}

textarea {
    width: 100%;
    min-height: 10rem;
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
}

/* Gradient-bordered button, same as the home page's sign-up button */
.btn {
    display: inline-block;
    justify-self: start;
    padding: 0.8rem 1.6rem;
    font-family: var(--display);
    font-size: 1rem;
    letter-spacing: 0.12em;
    color: white;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    background:
        linear-gradient(var(--oxford), var(--oxford)) padding-box,
        var(--gradient-diag) border-box;
    transition: background 0.2s, color 0.2s;
}

.btn:hover {
    background:
        var(--gradient-diag) padding-box,
        var(--gradient-diag) border-box;
    color: var(--oxford);
}

.btn.small {
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
}

.btn-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.row-actions {
    display: grid;
    grid-template-columns: repeat(2, 7.5rem);
    gap: 0.5rem;
}

.row-actions .btn {
    width: 100%;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.text-btn {
    font: inherit;
    color: var(--muted);
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    justify-self: start;
}

.text-btn:hover:not(:disabled) {
    color: white;
}

.text-btn:disabled {
    cursor: default;
    opacity: 0.5;
}

.message {
    min-height: 1.6em;
    margin-top: 1.5rem;
    color: #53D13D;
}

.message.error {
    color: #FA9523;
}

/* DETAILS */
dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1.5rem;
    margin-bottom: 1rem;
}

dt {
    font-weight: 600;
    color: white;
}

/* ADMIN TABLE */
.filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    max-width: none;
    margin-bottom: 1rem;
}

.filters input[type="search"] {
    flex: 1;
    min-width: 200px;
}

.list-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.pager {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

td.email {
    word-break: break-all;
}

.list-bar .count {
    margin-right: auto;
}

.count {
    color: var(--muted);
    font-size: 0.9rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th {
    font-weight: 600;
    color: white;
    text-align: left;
    padding: 0.5rem;
    border-bottom: 2px solid transparent;
    border-image: var(--gradient) 1;
}

td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--line);
}

tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* FOOTER */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    font-family: var(--display);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: white;
    padding: 1.5rem 2.5rem;
}

/* Sponsor logos, in the footer above the code of conduct */
.sponsors {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.25rem;
}

footer .sponsors a {
    display: block;
    border-bottom: none;
    transition: opacity 0.2s;
}

.sponsors a:hover {
    opacity: 0.75;
}

.sponsors img {
    display: block;
    width: auto;
}

.sponsors .hackathons-uk {
    height: 34px;
}

/* taller to offset the clear space built into GitHub's logo file */
.sponsors .github {
    height: 44px;
}

@media (max-width: 700px) {
    nav {
        padding: 0 1.2rem;
        gap: 1.2rem;
    }

    .top-border {
        margin: 0 1.2rem;
    }

    .nav-link {
        font-size: 1rem;
    }

    main {
        padding: 3rem 1.5rem 4rem;
    }

    .sponsors {
        gap: 1.5rem;
    }

    .sponsors .hackathons-uk {
        height: 26px;
    }

    .sponsors .github {
        height: 34px;
    }
}
