/* Copyright: Ankitects Pty Ltd and contributors
 * License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */

body {
    color: var(--text-fg);
    background-color: var(--bg-color);
}

#fields {
    display: flex;
    flex-direction: column;
    margin: 5px;
}

.field {
    border: 1px solid var(--border);
    background: var(--frame-bg);

    &.dupe {
        background: var(--flag1-bg);
    }
}

.fname {
    vertical-align: middle;
    padding: 0;
}

#topbutsOuter {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    position: sticky;
    top: 0;
    left: 0;
    z-index: 5;
    padding: 2px;

    background: var(--bg-color);
    font-size: 13px;
}

.topbuts {
    margin-bottom: 2px;

    & > * {
        margin: 0 1px;

        &:first-child {
            margin-left: 0;
        }

        &:last-child {
            margin-right: 0;
        }
    }
}

.topbut {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-top: 4px;
    vertical-align: -0.125em;
}

.rainbow {
    background-image: -webkit-gradient(
        linear,
        left top,
        left bottom,
        color-stop(0, #f77),
        color-stop(50%, #7f7),
        color-stop(100%, #77f)
    );
}

button.linkb {
    -webkit-appearance: none;
    margin-bottom: -3px;
    border: 0;
    box-shadow: none;
    padding: 0px 2px;
    background: transparent;

    &:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

    .nightMode & > img {
        filter: invert(180);
    }
}

button:focus {
    outline: none;
}

button.highlighted {
    #topbutsleft & {
        background-color: lightgrey;

        .nightMode & {
            background: linear-gradient(0deg, #333333 0%, #434343 100%);
        }
    }

    #topbutsright & {
        border-bottom: 3px solid black;
        border-radius: 3px;

        .nightMode & {
            border-bottom-color: white;
        }
    }
}

#dupes {
    position: sticky;
    bottom: 0;

    text-align: center;
    background-color: var(--bg-color);

    &.is-inactive {
        display: none;
    }

    a {
        color: var(--link);
    }
}

.icon {
    cursor: pointer;
    color: var(--text-fg);

    &.is-inactive::before {
        opacity: 0.1;
    }

    &.icon--hover::before {
        opacity: 0.5;
    }
}
