@import "~scss/variables";

.sw-theme-manager-detail {
    .sw-tabs__content {
        margin-bottom: 16px;
    }

    .sw-theme-manager-detail__inheritance {
        display: flex;
        padding: 20px;
        max-width: 800px;
        margin: 0 auto 20px auto;
        background-color: $color-module-purple-50;
        border: 1px solid $color-module-purple-900;
        border-radius: $border-radius-default;

        .sw-icon {
            flex-shrink: 0;
            margin-right: 8px;
            margin-top: 2px;
        }

        .sw-theme-manager-detail__inheritance-text {
            color: $color-darkgray-200;
            font-size: $font-size-xxs;
            line-height: 22px;
        }
    }

    .sw-theme-manager-detail__back-btn {
        width: 54px;
        height: 24px;
        line-height: 24px;
        display: grid;
        grid-template-columns: 30px 24px;
        align-items: center;
        margin-left: 20px;
        color: $color-darkgray-200;

        &:hover {
            color: $color-shopware-brand-500;
        }
    }

    .sw-theme-manager-detail__content {
        margin-top: 25px;

        .sw-theme-manager-detail__area {
            .sw-card__content {
                padding: 0;
            }
        }
    }

    .sw-theme-manager-detail__info-card {
        position: relative;

        .sw-theme-manager-detail__context-button {
            position: absolute;
            top: 12px;
            right: 16px;
        }
    }

    .sw-theme-manager-detail__info {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-gap: 24px;
        position: relative;
        font-size: 14px;
    }

    .sw-theme-manager-detail__info-image {
        width: 228px;
        height: 132px;
        border-radius: $border-radius-default;
        border: 1px solid $color-gray-300;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    .sw-theme-manager-detail__info-name {
        font-weight: 600;
    }

    .sw-theme-manager-detail__info-descr {
        margin-top: 12px;

        .sw-theme-manager-detail__info-descr-title {
            font-weight: 600;
        }
    }

    .sw-theme-manager-detail__saleschannels-select {
        margin-top: 20px;
    }

    .sw-theme-manager-detail__content--section_field {
        display: grid;
        gap: 28px;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));

        .sw-media-upload {
            height: 192px;
        }

        :not(div.sw-media-upload) .sw-field {
            margin: 0;
        }

        .sw-theme-manager-detail__content--section_field-full-width {
            grid-column: span 2 / auto;
        }
    }

    .sw-theme-manager-detail__content--section_title {
        margin-bottom: 12px;
    }

    .sw_theme_manager__duplicate-modal {
        .sw_theme_manager__duplicate-info {
            margin-bottom: 16px;
        }
    }

    .sw-inherit-wrapper {
        .sw-media-upload-v2__header {
            flex-direction: row-reverse;
            position: relative;
            top: -28px;
            margin-bottom: -24px;
            z-index: 99;
            height: 24px;
        }

        .sw-inherit-wrapper__toggle-wrapper {
            z-index: 100;
            position: relative;
            width: fit-content;
        }

        .sw-block-field {
            .sw-field__label {
                @extend .sw-media-upload-v2__header;
            }
        }
    }

    .sw-field-id-sw-default-switch,
    .sw-field-id-sw-custom-switch,
    .sw-field-id-sw-default-checkbox,
    .sw-field-id-sw-custom-checkbox {
        .sw-inherit-wrapper__inheritance-label {
            display: none;
        }

        .sw-field__label {
            width: 100%;
            gap: 10px;

            label {
                margin-right: 0;
                flex-grow: 0;
                padding-right: 0;
            }
        }
    }

    .sw-field-id-sw-default-switch,
    .sw-field-id-sw-custom-switch {
        .sw-field--switch {
            margin: 0 0 22px 0;

            .sw-field__label label,
            .sw-field--switch__input {
                padding-top: 0;
                padding-bottom: 0;
            }
        }
    }

    &__content-skeleton {
        margin-top: 60px;
    }

    .sw-theme-manager-detail__save-button-group {
        .sw-icon {
            padding: 4px 3px;
        }
    }
}

.sw-theme-manager-detail-modal {
    .sw_theme_manager__confirm-save-text,
    .sw-theme-manager-detail__sales-channel-warning {
        margin-bottom: 15px;
    }
}
