/* Button design system */


button.button {
    padding-bottom: calc(0.5em - 0.0625rem);
    padding-left: 1em;
    padding-right: 1em;
    padding-top: calc(0.5em - 0.0625rem);
    /* padding-bottom: calc(0.5em - 0.0625rem);
    padding-left: calc(0.75em - 0.0625rem);
    padding-right: calc(0.75em - 0.0625rem);
    padding-top: calc(0.5em - 0.0625rem); */


    border: 0.0625rem solid transparent;
    border-color: #dbdbdb;
    border-radius: 0.3125rem;
    box-shadow: none;

    font-size: 1rem;
    line-height: 1.5;

    height: 2.5em;
    vertical-align: top;

    background-color: white;
    color: #363636;
}

.button {
    cursor: pointer;

    display: inline-flex;
    position: relative;

    /* justify-content: center; */
    justify-content: flex-start;
    text-align: center;
    white-space: nowrap;
    align-items: center;

    &.is-primary,
    &.is-secondary,
    &.is-deleted {
        font-weight: 600;
    }
}

.button.is-primary {
    background-color: var(--color-green-default);
    border-color: transparent;
    color: #fff;
}

.button:disabled,
.button[disabled] {
    background-color: #E1E3E6;
    color: #A5AAB2;
    border: none;
    opacity: 1;

    svg path {
        fill: #A5AAB2;
    }
}

/* PRIMARY */
.button.is-primary:hover {
    background-color: #689B29;
}

.button.is-primary:active {
    background-color: #486D1C;
}

.button.is-primary:focus:not(:active) {
    box-shadow: none;
}

.button.is-primary:disabled,
.button.is-primary[disabled] {
    background-color: #E1E3E6;
    color: #A5AAB2;
    border: none;

    svg path {
        fill: #A5AAB2;
    }
}


/* SECONDARY */

.button.is-secondary:hover {
    background-color: #586D62;
}

.button.is-secondary:active {
    background-color: #42544A;
}

.button.is-secondary:focus:not(:active) {
    box-shadow: none;
}

.button.is-secondary:disabled {
    background-color: #E1E3E6;
    color: #A5AAB2;
    cursor: initial;

    svg path {
        fill: #A5AAB2;
    }
}

/* TERTIARY */

.button.is-tertiary,
.button.is-tertiary:active {
    background-color: white;
    color: #657B6F;
    border: 2px solid var(--color-green-secondary);

    svg path {
        stroke: var(--color-green-secondary);
    }
}

.button.is-tertiary:focus {
    border: 2px solid #486D1C;
    color: #486D1C;
}

.button.is-tertiary:hover {
    border: 2px solid var(--color-green-default);
    background-color: white;
    color: var(--color-green-default);

    svg path {
        stroke: var(--color-green-default);
        /*fill: var(--color-green-default);*/
    }
}

.button.is-tertiary.is-pressed {
    color: white;
    background-color: var(--color-green-secondary);
    border: 2px solid var(--color-green-secondary);

    svg path {
        stroke: white;
        fill: white;
    }
}

.button.is-tertiary.filters {
    color: var(--color-grey-100);
    background-color: var(--color-white);
    border: 2px solid var(--color-grey-100);

    svg path {
        stroke: var(--color-grey-200);
        fill: var(--color-grey-200);
    }
}

.button.is-tertiary.is-pressed-filters,
.button.is-tertiary.filters.is-pressed {
    color: var(--color-blue-dark);
    background-color: #4485B60D;
    border: 2px solid var(--color-blue-dark);

    svg path {
        stroke: var(--color-blue-dark);
        fill: var(--color-blue-dark);
    }
}

.button.is-tertiary.filters:hover {
    border: 2px solid var(--color-blue-dark);
    color: var(--color-blue-dark);

    svg path {
        stroke: var(--color-blue-dark);
        fill: var(--color-blue-dark);
    }
}

.button.is-tertiary:disabled {
    color: #A5AAB2;
    border: 1px solid #A5AAB2;

    svg path {
        stroke: #A5AAB2;
        fill: #A5AAB2;
    }
}

/* DELETED */

.button.is-deleted {
    background-color: #D95B4D;
    border-color: transparent;
    color: white;
}

.button.is-deleted:hover {
    background-color: #D95B4D;
}

.button.is-deleted:focus {
    background-color: #BD5346;
}

/* SPECIAL */

.control {
    .button {
        font-family: Roboto;
        &.is-white {
            background-color: white;
            color: var(--color-grey-50);
        }

        &.is-special {
            background-color: var(--color-green-secondary);
            color: white;
            font-weight: 600;
            font-size: 14px;

            svg path {
                stroke: white;
                stroke-width: 2px;
            }
        }
    }
}

.field.has-addons .control:first-child:not(:only-child) .button.is-special,
.field.has-addons .control:last-child:not(:only-child) .button.is-special {
    border-radius: 5px;
    border: none;
}

/* GHOST */

a.is-ghost {
    color: var(--color-green-secondary);
    font-size: 12px;
    text-decoration: underline;

    &:hover {
        color: #586D62;
    }

    &.disabled {
        color: #A5AAB2;
        cursor: default;
    }
}

a.is-ghost-deleted {
    color: #EC6758;
    font-size: 12px;
    text-decoration: underline;

    &:hover {
        color: #D95B4D;
    }

    &.disabled {
        color: #A5AAB2;
        cursor: default;
    }
}