/* Button design system */
a {
    &[disabled] {
        cursor: default;
    }
}
.button {
    font-size: 0.875rem;

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

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

    svg path {
        fill: #A5AAB2;
    }
}

.button.is-small:not(.is-rounded) {
    border-radius: 5px;
}

/* 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 {
    rect {
        fill: var(--color-green-default);
    }
}
.button.is-secondary:hover {
    background-color: #586D62;
    rect {
        fill: #586D62;
    }
}

.button.is-secondary:active {
    background-color: #42544A;
    rect {
        fill: #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 {
    border: 0.125rem solid #657B6F;

    svg path {
        stroke: #657B6F;
    }
}

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

.button.is-tertiary:hover {
    border: 0.125rem solid var(--color-green-1kmapied);
    background-color: white;
    color: var(--color-green-1kmapied);

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

    .counter {
        color: var(--color-green-1kmapied);
        border-color: var(--color-green-1kmapied);
    }
}

.button.is-tertiary.is-pressed {
    color: white;
    background-color: #657B6F;
    border: 0.125rem solid #657B6F;

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

.button.is-tertiary.filters {
    color: var(--color-grey-100);
    background-color: var(--color-white);
    border: 0.125rem 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: 0.125rem solid var(--color-blue-dark);

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

.button.is-tertiary.filters:hover {
    border: 0.125rem 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: var(--color-grey-50);
    border: 0.0625rem solid var(--color-grey-50);

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

.button.is-tertiary-deleted,
.button.is-tertiary-deleted:active {
    border: 0.125rem solid var(--color-red-default);
    color: var(--color-red-default);

    svg path {
        stroke: var(--color-red-default);
    }
}

.button.is-tertiary-deleted:hover {
    border: 0.125rem solid var(--color-red-press);
    background-color: white;
    color: var(--color-red-press);

    svg path {
        stroke: var(--color-red-press);
        /*fill: #76AE32;*/
    }
}

/* DELETED */

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

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

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

/* SPECIAL */

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

        &.is-special {
            background-color: var(--color-green-default);
            color: white;
            font-weight: 600;
            font-size: 0.875rem;

            svg path {
                stroke: white;
                stroke-width: 0.125rem;
            }
        }
    }
}

.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: 0.3125rem;
    border: none;
}

/* GHOST */

a.is-ghost, span.is-ghost {
    color: #657B6F;
    font-size: 0.75rem;
    text-decoration: underline;

    &:hover {
        color: #586D62;
    }

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

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

    &:hover {
        color: #D95B4D;
    }

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

/* DELETE ICON */
button.is-delete-icon {
    border: none;
    background: none;
    cursor: pointer;

    &:hover,
    &:active,
    &.is-delete-icon-active {
        background-color: var(--color-red-20);
        border-radius: 100%;

        svg path {
            stroke: #EC6758;
        }
    }
}