// Main app styles
.rtddpw-app {
    margin-top: 20px;

    .components-card {
        margin-bottom: 20px;
    }
}

// Detection Settings
.rtddpw-detection-settings {
    h2 {
        margin-top: 0;
        margin-bottom: 16px;
    }

    .components-radio-control {
        margin-bottom: 20px;
    }

    .components-notice {
        margin: 16px 0;
    }
}

// Duplicates List
.rtddpw-duplicates-list {
    h2 {
        margin-bottom: 20px;

        .count {
            color: #757575;
            font-size: 0.9em;
        }
    }

    .duplicate-group {
        margin-bottom: 20px;

        .group-header {
            display: flex;
            align-items: center;
            gap: 16px;

            .components-checkbox-control {
                margin: 0;
            }

            .group-info {
                flex: 1;

                .badge {
                    background: #2271b1;
                    color: white;
                    padding: 2px 8px;
                    border-radius: 3px;
                    font-size: 12px;
                    margin-left: 8px;
                }
            }
        }

        table {
            margin-top: 0;

            th {
                font-weight: 600;
            }

            .components-checkbox-control {
                margin: 0;

                .components-checkbox-control__input-container {
                    margin: 0;
                }
            }

            .stock-status {
                padding: 2px 8px;
                border-radius: 3px;
                font-size: 12px;
                text-transform: capitalize;

                &.instock {
                    background: #d4edda;
                    color: #155724;
                }

                &.outofstock {
                    background: #f8d7da;
                    color: #721c24;
                }

                &.onbackorder {
                    background: #fff3cd;
                    color: #856404;
                }
            }

            .button-small {
                padding: 4px 8px;
                font-size: 12px;
                height: auto;
                line-height: 1.4;
            }
        }
    }
}

// Delete Controls
.rtddpw-delete-controls {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 16px;
    border-top: 1px solid #ddd;
    margin: 20px -20px -20px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);

    .components-notice {
        margin-bottom: 16px;
    }

    .controls-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;

        .selected-info {
            font-weight: 600;
            color: #2271b1;
        }

        .action-buttons {
            display: flex;
            gap: 12px;
        }
    }
}

// Delete Modal
.rtddpw-delete-modal {
    .components-modal__content {
        padding: 24px;

        p {
            margin-bottom: 12px;

            strong {
                color: #d63638;
            }
        }

        .modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            margin-top: 24px;
            padding-top: 16px;
            border-top: 1px solid #ddd;
        }
    }
}

// Responsive adjustments
@media (max-width: 782px) {
    .rtddpw-duplicates-list {
        .duplicate-group {
            .group-header {
                flex-direction: column;
                align-items: flex-start;
            }
        }

        table {
            font-size: 12px;

            th,
            td {
                padding: 8px 4px;
            }
        }
    }

    .rtddpw-delete-controls {
        .controls-wrapper {
            flex-direction: column;
            gap: 12px;
            align-items: flex-start;

            .action-buttons {
                width: 100%;

                button {
                    flex: 1;
                }
            }
        }
    }
}
/* Advanced Options panel */
.rtddpw-advanced-options {
    margin-top: 16px;

    .rtddpw-advanced-section {
        margin-bottom: 20px;

        &:last-child {
            margin-bottom: 0;
        }
    }

    .rtddpw-advanced-label {
        font-weight: 600;
        margin: 0 0 8px;
    }

    .rtddpw-status-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 24px;
    }
}

/* Filters + scan bar (advanced section above the scan button) */
.rtddpw-advanced-options {
    .rtddpw-filters-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 16px;
    }

    .rtddpw-filters-loading {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .rtddpw-filters-note {
        margin-top: 10px;
        font-style: italic;
        color: #757575;
        font-size: 12px;
    }
}

.rtddpw-scan-bar {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;

    .components-notice {
        margin: 0 0 12px;
    }
}

/* Pro feature gating */
.rtddpw-pro-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 7px;
    background: linear-gradient(135deg, #d63638, #f06595);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 4px;
    vertical-align: middle;
}

.rtddpw-pro-locked {
    margin-top: 8px;
    padding: 12px 14px;
    background: #fcf0f1;
    border: 1px solid #f0c2c4;
    border-radius: 6px;

    p {
        margin: 0 0 8px;
        color: #50575e;
    }
}

.rtddpw-pro-upgrade {
    display: inline-block;
    font-weight: 600;
    color: #d63638 !important;
    text-decoration: none;

    &:hover {
        text-decoration: underline;
    }
}
