/**
 * Product Report — High Specificity Scoped CSS
 * Prevents theme style overrides (Astra, Elementor, Twenty Twenty-Four)
 */

:root {
    --product-report-primary: #3A5A40;
    --product-report-primary-hover: #263c2b;
    --product-report-primary-light: #eef5f0;
    --product-report-border: #e2e8f0;
    --product-report-card-bg: #ffffff;
    --product-report-text-main: #0f172a;
    --product-report-text-muted: #64748b;
    --product-report-radius: 12px;
}

#product-report-app,
.product-report-wrapper {
    max-width: 980px !important;
    margin: 30px auto !important;
    padding: 0 16px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: #0f172a !important;
    box-sizing: border-box !important;
}

#product-report-app *,
.product-report-wrapper * {
    box-sizing: border-box !important;
}

/* Header */
.product-report-header {
    text-align: center !important;
    margin-bottom: 28px !important;
}

.product-report-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 14px !important;
    background: var(--product-report-primary-light, #eef5f0) !important;
    color: var(--product-report-primary, #3A5A40) !important;
    border-radius: 9999px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
}

.product-report-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: var(--product-report-primary, #3A5A40) !important;
    display: inline-block !important;
}

.product-report-title {
    font-size: 32px !important;
    font-weight: 800 !important;
    margin: 0 0 8px 0 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em !important;
    line-height: 1.2 !important;
}

.product-report-subtitle {
    font-size: 15px !important;
    color: #64748b !important;
    max-width: 580px !important;
    margin: 0 auto !important;
    line-height: 1.5 !important;
}

/* Search Card Container */
.product-report-search-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 28px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 24px !important;
}

.product-report-label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    color: #1e293b !important;
}

/* Bulletproof Flex Input Row: Prevents themes forcing 100% width on input */
.product-report-input-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    margin-bottom: 12px !important;
}

#product-report-app input[type="text"].product-report-input,
.product-report-wrapper input[type="text"].product-report-input {
    flex: 1 1 240px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 48px !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    outline: none !important;
    margin: 0 !important;
    text-transform: uppercase !important;
}

#product-report-app input[type="text"].product-report-input:focus,
.product-report-wrapper input[type="text"].product-report-input:focus {
    border-color: var(--product-report-primary, #3A5A40) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(58, 90, 64, 0.15) !important;
}

#product-report-app button.product-report-button,
.product-report-wrapper button.product-report-button {
    flex: 0 0 auto !important;
    height: 48px !important;
    padding: 0 24px !important;
    background: var(--product-report-primary, #3A5A40) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#product-report-app button.product-report-button:hover,
.product-report-wrapper button.product-report-button:hover {
    background: var(--product-report-primary-hover, #263c2b) !important;
}

/* Example Chips */
.product-report-examples {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    font-size: 13px !important;
    color: #64748b !important;
}

.product-report-example-chip {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.product-report-example-chip:hover {
    background: var(--product-report-primary-light, #eef5f0) !important;
    color: var(--product-report-primary, #3A5A40) !important;
}

/* Help Card */
.product-report-help-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    margin-bottom: 28px !important;
}

.product-report-help-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    user-select: none !important;
}

.product-report-help-body {
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e2e8f0 !important;
    font-size: 13px !important;
    color: #475569 !important;
    line-height: 1.6 !important;
}

/* Results Section */
.product-report-batch-header {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin-bottom: 20px !important;
}

.product-report-group-title {
    font-size: 17px !important;
    font-weight: 800 !important;
    margin: 24px 0 12px 0 !important;
    color: #0f172a !important;
}

.product-report-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 18px 20px !important;
    margin-bottom: 12px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.product-report-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05) !important;
}

.product-report-btn-download {
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-block !important;
    background: var(--product-report-primary, #3A5A40) !important;
    color: #ffffff !important;
    border: none !important;
}

@media (max-width: 600px) {
    .product-report-input-group {
        flex-direction: column !important;
    }
    #product-report-app button.product-report-button,
    .product-report-wrapper button.product-report-button {
        width: 100% !important;
    }
    .product-report-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 14px !important;
    }
    .product-report-btn-download {
        width: 100% !important;
        text-align: center !important;
    }
}

/* Report availability status */
.product-report-status-pill {
    display: inline-block !important;
    margin-left: 10px !important;
    padding: 3px 9px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    vertical-align: middle !important;
}
.product-report-status-pill.is-available {
    background: var(--product-report-primary-light, #ecfdf5) !important;
    color: var(--product-report-primary) !important;
}
.product-report-status-pill.is-unavailable {
    background: #f1f5f9 !important;
    color: #64748b !important;
}
.product-report-unavailable {
    background: #f8fafc !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 16px 20px !important;
    margin-bottom: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    color: #475569 !important;
    font-size: 14px !important;
}
.product-report-unavailable strong { color: #0f172a !important; font-size: 15px !important; }
.product-report-unavailable span { font-size: 13px !important; color: #64748b !important; }
