:root {
    --bg-color: #113;
    --main-color: #336;
    
    /* --action-color: #3cb47c; */
    /* --action-color-dark: #2d885f; */
    /* --action-color-highlight: #4adf9b; */
    --action-color-dark: #6aa;
    --action-color: #8cc;
    --action-color-highlight: #bff;
    --action-text-color: var(--bg-color);
    
    --accent-color: #243D3D;
    
    --text-color: #eee;
    --text-color-accent: #ccc;
    
    --link-color: #aac;
    --link-color-hover: #ddf;
}

html {
    font-family: "Geom", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    background-color: var(--bg-color);
    color: var(--text-color);
}

body {
    margin: 0;
}

main {
    margin: 8px;
}

code, pre, input {
    font-family: "Xanh Mono", monospace;
    font-style: normal;
}

input {
    border: 1px solid;
    background-color: var(--main-color);
    color: var(--text-color);
    padding: 5px;
    width: 30ch;
    font-size: 16px;
}
label {
    display: flex;
    padding: 5px 0;
    gap: 5px;
    align-items: baseline;
}

header {
    font-size: 3em;
    text-align: center;
}

footer {
    text-align: center;
    background-color: var(--main-color);
    padding: 8px;
}

a, a:visited {
    color: var(--link-color);
}
a:hover {
    color: var(--link-color-hover);
}

table {
    border-collapse: collapse;
    width: 100%;
}
table td {
    vertical-align: top;
}

table tr {
    --cell-color: var(--bg-color);
    transition: background-color 0.3s;
    background-color: var(--cell-color);
    border-top: 1px solid;
}
.openings > tr, button {
    cursor: pointer;
}
table thead {
    text-align: left;
}
table td:first-child {
    padding-right: 1ch;
}
table thead > tr, tr:nth-child(2n of :not(.hidden)) {
    --cell-color: var(--main-color);
}
table tbody tr.focused {
    --cell-color: var(--accent-color) !important;
    border-top: 3px solid var(--action-color-highlight);
    border-bottom: 3px solid var(--action-color-highlight);
}

.family {
    font-weight: 700;
}
.variation {
    font-weight: 500;
}
.subvariations {
    font-weight: 200;
    color: var(--text-color-accent);
}

.floating-action-button, .floating-action-button.disabled:hover {
    background-color: var(--action-color);
    border: 3px solid var(--action-color-dark);
    color: var(--text-color);
    font-size: 20px;
    
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 100%;
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    transition: opacity 0.3s;
}
.floating-action-button > .icon {
    width: 30px;
    height: 30px;
}

.floating-action-button:hover {
    background-color: var(--action-color-highlight);
    border-color: var(--action-color);
}

.floating-action-button.disabled {
    /* filter: grayscale(1.0); */
    opacity: 0.6;
    cursor: not-allowed;
}

.openings, .floating-action-button {
    touch-action: manipulation;
}

.hidden {
    display: none;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    /*right: 20px;*/
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
}

.toast {
    background-color: var(--action-color);
    color: var(--action-text-color);
    padding: 10px 20px;
    margin: 5px 0;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.5s;
}

.toast.show {
    opacity: 1;
}

/* mobile-only settings */
@media (max-width:768px) {
    main {
        margin: 0px;
    }
}
