.wprm-admin-modal-ai-text-import-container {
    padding: 20px;
    overflow: scroll;

    textarea {
        min-height: 40px;
    }

    // Hide the textarea when the preview is showing
    &.wprm-has-preview {
        > .wprm-admin-modal-field-container {
            display: none;
        }
    }

    .wprm-admin-modal-ai-text-import-loading {
        text-align: center;
        padding: 20px 0;
    }

    .wprm-admin-modal-ai-text-import-error {
        margin-top: 20px;
        padding: 12px 16px;
        border: 1px solid #d63638;
        border-radius: 4px;
        background: #fcf0f1;
    }

    .wprm-admin-modal-ai-text-import-help {
        margin: 20px 0 0 0;
    }

    .wprm-admin-modal-ai-text-import-preview {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        background: #fff;
        overflow: hidden;
    }

    .wprm-ai-preview-header {
        padding: 16px 20px 12px;
        border-bottom: 1px solid #f0f0f0;

        h3 {
            margin: 0 0 2px;
            font-size: 16px;
            line-height: 1.3;
        }
    }

    .wprm-ai-preview-summary {
        margin: 0;
        color: #646970;
        font-size: 13px;
        line-height: 1.4;
    }

    .wprm-ai-preview-meta-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        border-bottom: 1px solid #f0f0f0;
    }

    .wprm-ai-preview-meta-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px 8px;
        text-align: center;

        & + & {
            border-left: 1px solid #f0f0f0;
        }
    }

    .wprm-ai-preview-meta-label {
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #8c8f94;
        margin-bottom: 2px;
    }

    .wprm-ai-preview-meta-value {
        font-size: 14px;
        font-weight: 600;
        color: #1d2327;
    }

    .wprm-ai-preview-section {
        padding: 12px 20px;

        & + & {
            padding-top: 0;
        }

        h4 {
            margin: 0 0 6px;
            font-size: 13px;
            font-weight: 600;
            color: #1d2327;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
    }

    .wprm-ai-preview-image-options {
        display: grid;
        gap: 8px;
    }

    .wprm-ai-preview-image-option {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px;
        border: 1px solid #dcdcde;
        border-radius: 4px;
        cursor: pointer;

        &.is-selected {
            border-color: #2271b1;
            box-shadow: 0 0 0 1px #2271b1;
        }

        input {
            flex-shrink: 0;
            margin: 0;
        }
    }

    .wprm-ai-preview-image-option-none {
        min-height: 36px;
    }

    .wprm-ai-preview-image-option-thumb {
        flex-shrink: 0;
        width: 64px;
        height: 64px;
        border-radius: 4px;
        overflow: hidden;
        background: #f6f7f7;

        img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }

    .wprm-ai-preview-image-option-url {
        min-width: 0;
        color: #50575e;
        font-size: 12px;
        line-height: 1.4;
        word-break: break-word;
    }

    .wprm-ai-preview-ingredients {
        list-style: none;
        margin: 0;
        padding: 0;

        li {
            padding: 4px 0;
            border-bottom: 1px solid #f6f7f7;
            font-size: 13px;
            line-height: 1.4;

            &:last-child {
                border-bottom: none;
            }
        }
    }

    .wprm-ai-preview-ingredient-amount {
        font-weight: 600;
        margin-right: 4px;
    }

    .wprm-ai-preview-ingredient-notes {
        color: #8c8f94;
        margin-left: 4px;
        font-style: italic;
    }

    .wprm-ai-preview-instructions {
        margin: 0;
        padding: 0;
        list-style: none;
        counter-reset: step-counter;

        li {
            counter-increment: step-counter;
            padding: 6px 0 6px 32px;
            border-bottom: 1px solid #f6f7f7;
            font-size: 13px;
            line-height: 1.5;
            position: relative;

            &:last-child {
                border-bottom: none;
            }

            &::before {
                content: counter(step-counter);
                position: absolute;
                left: 0;
                top: 6px;
                width: 22px;
                height: 22px;
                border-radius: 50%;
                background: #f0f0f1;
                color: #50575e;
                font-size: 11px;
                font-weight: 600;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }
    }
}
