
button {
    background-color: var(--input-background-color);
    border: 1px solid var(--input-border-color);
    border-radius: 2px;
    color: var(--input-color);
    cursor: pointer;
    font-size: 22px; /* fallback */
    font-size: var(--mobile-font-size);
    font-weight: 500;
    padding: 10px;
    margin-right: 1em;
}

button:disabled {
    background-color: light-dark(rgba(239, 239, 239, 0.3), rgba(19, 1, 1, 0.3));
    color: light-dark(rgba(16, 16, 16, 0.3), rgba(255, 255, 255, 0.3));
    border-color: light-dark(rgba(118, 118, 118, 0.3), rgba(195, 195, 195, 0.3));
}

input {
    border: 1px solid var(--input-border-color);
    font-size: 22px; /* fallback */
    font-size: var(--mobile-font-size);
    padding: 15px;
    width: 90%; /* fallback */
    width: calc(100% - 30px); /* full width minus padding */
    background-color: var(--input-background-color);
    color: var(--input-color);
}

select {
    border: 1px solid var(--input-border-color);
    font-size: 22px; /* fallback */
    font-size: var(--mobile-font-size);
    padding: 15px;
    width: 90%; /* fallback */
    width: calc(100% + 1px);
    background-color: var(--input-background-color);
    color: var(--input-color);
}

textarea {
    border: 1px solid var(--input-border-color);
    background-color: var(--input-background-color);
    color: var(--input-color);
}

input[type=email]:not(:focus):invalid,
input[type=password]:not(:focus):invalid {
    color: red;
    outline-color: red;
}

label {
    color: var(--input-color);
    display: block;
    font-size: 20px;
    font-size: var(--mobile-font-size);
    font-weight: 500;
    margin: 0 0 3px 0;
}

section {
    margin: 0 0 20px 0;
    position: relative;
}

.editorContainer {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.timelineEditorContainer {
    display: flex;
    height: 100%;
    overflow: auto;
    align-items: start;
}

.editor {
    justify-content: start;
    align-content: start;
}

.editing {
    overflow: auto;
    flex-basis: 40%;
}

.relationshipContainer {
    flex-basis: 40%;
    overflow: auto;
}

.editingPortrait {
    min-width: 128px;
    min-height: 512px;
    max-height: 512px;
    overflow: hidden;
    margin: 8px;
    background-repeat: no-repeat;
    background-position: left top;
    border: 4px solid var(--input-border-color);
    background-color: var(--input-background-color);
}

.editorName {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--input-color);
}

.portraitCenter {
    position: relative;
    background-color: rgba(0,0,0,0.1);
    cursor: move;
    z-index: var(--target-layer);
}

.portraitHandles {
    position: relative;
    border: 4px solid rgba(255,0,0,0.5);
    box-sizing: border-box;
    cursor: nesw-resize;
    z-index: var(--handle-layer);
}

.editorHeader {
    display: flex;
    flex-direction: column;
    margin-right: 1em;
    width: 280px;
    overflow-y: auto;
}

div.save {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin: 10px;
}

div.save button {
    margin-top: 10px;
    padding: 4px;
}

.propertySelectContainer {
    margin-top: -20px;
    margin-bottom: 20px;
}

.propertySelectContainer select {
    width: 640px;
}

.propertySelectContainer select option {
    font-size: 1.5em;
    padding: 4px;
}

div#characterEditor {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

table.relationshipTable {
    border-collapse: collapse;
}

table.relationshipTable tbody tr td {
    border-collapse: collapse;
    border-top: 1px solid var(--separator-color);
    border-bottom: 1px solid var(--separator-color);
    padding-left: 1em;
    padding-right: 1em;
}

table.relationshipTable tbody tr td span {
    padding-left: 1em;
    padding-right: 1em;
}

.modified {
    background-color: lightgreen;
}

.toggleButton {
    background-color: #FEE4AF;
}

.timelineEditorTable tbody tr td {
    white-space: nowrap;
    padding: 0em 1em;
}

.yearToggleButton {
    width: 3em;
}

.rowSeparator td {
    border-bottom: 1px solid var(--separator-color);
}

@media (hover: hover) {
    button:hover {
        background-color: var(--input-hover-background-color);
        color: var(--input-hover-color);
    }
}