@use "sass:map";
@use "sass:color";
@use "../theme";

.button, button, input[type="submit"] {
    background-color: map.get(theme.$button, "bg");
    transition: all 200ms ease-out;
    border: 0;
    box-sizing: border-box;
    cursor: pointer;
    font-size: 0.85em;
    height: 36px;
    min-width: 95px;
    outline: 0;
    padding: 0 15px;
    text-decoration: none;

	&.btn-default {
		background-color: map.get(theme.$btn-default, "bg");
		border-radius: 3px;
		color: rgba(0, 0, 0, 0.8);

		&:hover {
			background-color: color.adjust(map.get(theme.$btn-default, "bg"), $lightness: -10%);
		}

		&:active {
			transform: scale(0.95);
		}
	}

    &.btn-primary {
        background-color: map.get(theme.$btn-primary, "bg");
        border-radius: 3px;
        color: #fff;

		&:hover {
			background-color: color.adjust(map.get(theme.$btn-primary, "bg"), $lightness: -10%);
		}

		&:active {
			transform: scale(0.95);
		}
    }

    &.btn-safe {
        background-color: map.get(theme.$btn-safe, "bg");
        border-radius: 3px;
        color: #fff;

        &:hover {
            background-color: color.adjust(map.get(theme.$btn-safe, "bg"), $lightness: -10%);
        }

        &:active {
            transform: scale(0.95);
        }
    }

    &.btn-warning {
        background-color: map.get(theme.$btn-warning, "bg");
        border-radius: 3px;
        color: #fff;

        &:hover {
            background-color: color.adjust(map.get(theme.$btn-warning, "bg"), $lightness: -10%);
        }

        &:active {
          transform: scale(0.95);
        }
    }

    &.btn-risk {
		background-color: map.get(theme.$btn-risk, "bg");
		border-radius: 3px;
		color: #fff;

		&:hover {
			background-color: color.adjust(map.get(theme.$btn-risk, "bg"), $lightness: -10%);
		}

		&:active {
			transform: scale(0.95);
		}
    }

    &.btn-minimal {
		background-color: transparent;
		color: #2196f3;

		&:hover {
			color: #1e88e5;
		}

		&:active {
			transform: scale(0.95);
		}
    }

    &.btn-outline {
        background-color: transparent;
        border: 1px solid #424242;
        border-radius: 5px;
        color: #424242;

        &:hover {
            color: #000;
            border-color: #000;
        }

        &:active {
            transform: scale(0.95);
        }
    }

    &.btn-lg {
        font-size: 1.1em;
        height: 50px;
        line-height: 50px;
    }
}

a.button {
    display: inline-block;
    line-height: 36px;
    text-align: center;
}
