@use '../../../styles/mat-selectors' as ms;

.adf-card-view-textitem {
    .adf-textitem-error {
        font-size: var(--theme-caption-font-size);
        padding-top: 6px;

        &::before {
            display: none;
        }

        ul {
            margin: 0;
            padding: 0;
            list-style-type: none;

            li {
                margin: 0;
                padding: 0;
            }
        }
    }

    .adf-textitem-action {
        width: 30px;
        height: 30px;
        padding: 0;
        line-height: 20px;
        color: var(--adf-theme-foreground-text-color-025);

        &:hover,
        &:focus {
            color: var(--adf-theme-foreground-text-color);
        }

        #{ms.$mat-button-touch-target} {
            width: 30px;
            height: 30px;
        }
    }

    #{ms.$mat-form-field-icon-suffix} {
        position: absolute;
        right: 1px;
        bottom: 7px;
    }

    .adf-textitem-chip-list-container {
        #{ms.$mat-form-field-label} {
            margin-top: 6px;
        }

        #{ms.$mat-form-field-infix} {
            padding-top: 0;

            .adf-property-value {
                margin-left: 0;
            }
        }
    }

    .adf-textitem-clickable {
        cursor: pointer;
        padding-top: 3px;

        .adf-textitem-action:hover {
            color: var(--adf-theme-foreground-text-color);
        }

        .adf-property-field {
            #{ms.$mat-input-element} {
                color: var(--theme-primary-color);
                cursor: pointer;
            }
        }
    }

    .adf-textitem-default-value {
        color: var(--adf-theme-foreground-text-color-054);
    }

    .adf-property-read-only:not(:has(.adf-property-readonly-value)) {
        border-bottom: 1px solid var(--adf-metadata-property-panel-border-color);
    }

    .adf-property-value-not-editable {
        /* stylelint-disable-next-line declaration-no-important */
        color: var(--adf-metadata-property-panel-title-color);
    }

    .adf-property-value-has-icon-suffix {
        padding-right: 34px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #{ms.$mat-line-ripple} {
        &::before,
        &::after {
            display: none;
        }
    }
}
