@import "~scss/variables";

$sw-file-input-color-highlighted: $color-shopware-brand-500;
$sw-file-input-background-color-highlighted: $color-shopware-brand-50;

.sw-file-input {
    .sw-file-input__file-input {
        display: none;
    }

    .sw-file-input__header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        line-height: 16px;
        min-height: 16px;
        font-size: $font-size-xs;
        margin-bottom: 8px;
        color: $color-darkgray-200;
        font-weight: normal;
        user-select: none;
    }

    .sw-file-input__dropzone {
        display: flex;
        justify-content: center;
        flex-direction: column;
        padding: 24px;
        min-height: 148px;
        border: 2px dashed $color-gray-300;
        border-radius: $border-radius-default;
        background-color: $color-gray-100;

        &.is--active {
            border-color: $sw-file-input-color-highlighted;
            background-color: $sw-file-input-background-color-highlighted;
            color: $sw-file-input-color-highlighted;

            .sw-file-input__upload-caption {
                .sw-icon {
                    color: $sw-file-input-color-highlighted;
                }
            }
        }
    }

    .sw-file-input__upload-caption {
        font-size: $font-size-m;
        margin: 12px auto;

        .sw-icon {
            margin-right: 8px;
            color: $color-gray-300;
        }
    }

    .sw-file-input__actions {
        display: flex;
        width: 100%;

        .sw-file-input__file-info {
            display: flex;
            flex-grow: 1;
            align-items: center;
            font-size: $font-size-xs;
        }

        .sw-file-input__file-headline {
            word-break: break-word;
            padding-right: 16px;
        }

        .sw-file-input__remove-icon {
            cursor: pointer;
        }
    }

    .sw-file-input__button {
        min-width: 144px;
        margin: 0 auto;
    }
}
