/* ==========================================================================
   Expeditious Tools - Image Background Remover Stylesheet
   Mobile-First, Ultra-Responsive, Core Web Vitals Optimized
   ========================================================================== */

:root {
    --bgrm-primary: #ffc800;
    --bgrm-primary-hover: #e5b400;
    --bgrm-dark: #111418;
    --bgrm-dark-surface: #1e242b;
    --bgrm-text-main: #1e293b;
    --bgrm-text-muted: #64748b;
    --bgrm-text-light: #94a3b8;
    --bgrm-bg: #f8fafc;
    --bgrm-card-bg: #ffffff;
    --bgrm-border: #e2e8f0;
    --bgrm-border-focus: #ffc800;
    --bgrm-success: #10b981;
    --bgrm-error: #ef4444;
    --bgrm-radius-lg: 18px;
    --bgrm-radius-md: 12px;
    --bgrm-radius-sm: 8px;
    --bgrm-shadow: 0 10px 30px -5px rgba(17, 20, 24, 0.07), 0 4px 6px -2px rgba(17, 20, 24, 0.03);
    --bgrm-shadow-hover: 0 20px 35px -5px rgba(17, 20, 24, 0.12), 0 8px 12px -3px rgba(17, 20, 24, 0.05);
}

/* --------------------------------------------------------------------------
   Breadcrumbs & Hero Masthead
   -------------------------------------------------------------------------- */
.bgrm-masthead {
    background: linear-gradient(180deg, #111418 0%, #1a1f26 100%);
    color: #ffffff;
    padding: 100px 20px 45px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .bgrm-masthead {
        padding: 120px 24px 55px;
    }
}

.bgrm-breadcrumbs {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--bgrm-text-light);
    margin-bottom: 16px;
}

.bgrm-breadcrumbs a {
    color: var(--bgrm-text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.bgrm-breadcrumbs a:hover,
.bgrm-breadcrumbs a:focus-visible {
    color: var(--bgrm-primary);
}

.bgrm-breadcrumbs .sep {
    opacity: 0.5;
}

.bgrm-breadcrumbs span[aria-current="page"] {
    color: #ffffff;
    font-weight: 600;
}

.bgrm-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 200, 0, 0.12);
    color: var(--bgrm-primary);
    border: 1px solid rgba(255, 200, 0, 0.3);
    border-radius: 9999px;
    padding: 6px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.bgrm-hero-h1 {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    max-width: 860px;
    margin: 0 auto 16px;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .bgrm-hero-h1 {
        font-size: 2.75rem;
    }
}

.bgrm-hero-h1 span.highlight {
    color: var(--bgrm-primary);
    position: relative;
    display: inline-block;
}

.bgrm-hero-subhead {
    font-size: 1.05rem;
    color: #cbd5e1;
    max-width: 680px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .bgrm-hero-subhead {
        font-size: 1.15rem;
    }
}

.bgrm-trust-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 24px;
    font-size: 0.88rem;
    color: #94a3b8;
}

.bgrm-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e2e8f0;
}

.bgrm-trust-item svg {
    color: var(--bgrm-primary);
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Main Tool Application Container
   -------------------------------------------------------------------------- */
.bgrm-app-wrapper {
    max-width: 900px;
    margin: -35px auto 40px;
    padding: 0 16px;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .bgrm-app-wrapper {
        margin: -45px auto 60px;
        padding: 0 20px;
    }
}

.bgrm-card {
    background: var(--bgrm-card-bg);
    border: 1px solid var(--bgrm-border);
    border-radius: var(--bgrm-radius-lg);
    box-shadow: var(--bgrm-shadow);
    padding: 24px 18px;
    transition: box-shadow 0.3s ease;
}

@media (min-width: 768px) {
    .bgrm-card {
        padding: 36px 32px;
    }
}

/* --------------------------------------------------------------------------
   Dropzone Uploader Component
   -------------------------------------------------------------------------- */
.bgrm-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--bgrm-radius-md);
    background: #fbfcfe;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    position: relative;
}

.bgrm-dropzone:hover,
.bgrm-dropzone:focus-visible {
    border-color: var(--bgrm-primary);
    background: #fffdf5;
    box-shadow: 0 0 0 4px rgba(255, 200, 0, 0.15);
}

.bgrm-dropzone.dragover {
    border-color: #ffaa00;
    background: #fff9e6;
    transform: scale(1.008);
    box-shadow: 0 0 0 6px rgba(255, 170, 0, 0.22);
}

.bgrm-dropzone-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 200, 0, 0.15);
    color: #b48500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.25s ease;
}

.bgrm-dropzone:hover .bgrm-dropzone-icon {
    transform: translateY(-3px) scale(1.05);
}

.bgrm-dropzone-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bgrm-text-main);
    margin-bottom: 6px;
}

.bgrm-dropzone-title .accent-text {
    color: #b48500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bgrm-dropzone-subtitle {
    font-size: 0.9rem;
    color: var(--bgrm-text-muted);
    margin-bottom: 18px;
}

.bgrm-format-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
}

.bgrm-badge {
    background: #f1f5f9;
    color: #475569;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.bgrm-btn-choose {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bgrm-primary);
    color: #111418;
    font-weight: 700;
    font-size: 0.98rem;
    padding: 12px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 200, 0, 0.35);
    transition: all 0.2s ease;
}

.bgrm-btn-choose:hover {
    background: var(--bgrm-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 200, 0, 0.45);
}

.bgrm-btn-choose:active {
    transform: translateY(1px);
}

/* --------------------------------------------------------------------------
   Selected File Preview Card
   -------------------------------------------------------------------------- */
.bgrm-file-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid var(--bgrm-border);
    border-radius: var(--bgrm-radius-md);
    padding: 14px 18px;
    margin-top: 18px;
    text-align: left;
}

.bgrm-file-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    flex-shrink: 0;
}

.bgrm-file-details {
    flex: 1;
    min-width: 0;
}

.bgrm-file-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--bgrm-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.bgrm-file-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--bgrm-text-muted);
}

.bgrm-file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.bgrm-btn-text-danger {
    background: transparent;
    border: none;
    color: var(--bgrm-error);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bgrm-btn-text-danger:hover {
    background: #fee2e2;
}

.bgrm-btn-text-change {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--bgrm-text-main);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.bgrm-btn-text-change:hover {
    background: #e2e8f0;
}

/* --------------------------------------------------------------------------
   Collapsible Advanced Settings Panel
   -------------------------------------------------------------------------- */
.bgrm-advanced-wrap {
    margin-top: 20px;
    border-top: 1px solid var(--bgrm-border);
    padding-top: 16px;
}

.bgrm-advanced-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    padding: 8px 4px;
    color: var(--bgrm-text-main);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s ease;
}

.bgrm-advanced-toggle:hover {
    color: #0f172a;
}

.bgrm-advanced-toggle .toggle-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bgrm-advanced-toggle .chevron-icon {
    transition: transform 0.25s ease;
    color: var(--bgrm-text-muted);
}

.bgrm-advanced-toggle[aria-expanded="true"] .chevron-icon {
    transform: rotate(180deg);
}

.bgrm-advanced-panel {
    display: none;
    background: #f8fafc;
    border: 1px solid var(--bgrm-border);
    border-radius: var(--bgrm-radius-md);
    padding: 18px 20px;
    margin-top: 12px;
}

.bgrm-advanced-panel.show {
    display: block;
    animation: bgrmFadeIn 0.25s ease;
}

.bgrm-advanced-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 640px) {
    .bgrm-advanced-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.bgrm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bgrm-form-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--bgrm-text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bgrm-tooltip-text {
    font-size: 0.78rem;
    color: var(--bgrm-text-muted);
    font-weight: 400;
}

.bgrm-select,
.bgrm-number-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9rem;
    border: 1px solid var(--bgrm-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--bgrm-text-main);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bgrm-select:focus,
.bgrm-number-input:focus {
    border-color: var(--bgrm-primary);
    box-shadow: 0 0 0 3px rgba(255, 200, 0, 0.2);
}

.bgrm-switch-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.bgrm-switch-input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--bgrm-primary);
    cursor: pointer;
}

.bgrm-switch-content {
    display: flex;
    flex-direction: column;
}

.bgrm-switch-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bgrm-text-main);
}

.bgrm-switch-desc {
    font-size: 0.8rem;
    color: var(--bgrm-text-muted);
}

.bgrm-matting-controls {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    background: #ffffff;
    border: 1px solid var(--bgrm-border);
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 4px;
}

@media (min-width: 640px) {
    .bgrm-matting-controls {
        grid-template-columns: repeat(3, 1fr);
    }
}

.bgrm-range-sync {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bgrm-range-sync input[type="range"] {
    flex: 1;
    accent-color: var(--bgrm-primary);
    cursor: pointer;
}

.bgrm-range-sync input[type="number"] {
    width: 65px;
    padding: 6px 8px;
    font-size: 0.85rem;
    border: 1px solid var(--bgrm-border);
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Submit & Processing Controls
   -------------------------------------------------------------------------- */
.bgrm-submit-wrap {
    margin-top: 24px;
    text-align: center;
}

.bgrm-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 420px;
    background: var(--bgrm-primary);
    color: #111418;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 15px 32px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 200, 0, 0.4);
    transition: all 0.2s ease;
}

.bgrm-btn-submit:hover:not(:disabled) {
    background: var(--bgrm-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 200, 0, 0.5);
}

.bgrm-btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Processing State Bar
   -------------------------------------------------------------------------- */
.bgrm-processing-box {
    display: none;
    background: #f8fafc;
    border: 1px solid var(--bgrm-border);
    border-radius: var(--bgrm-radius-md);
    padding: 24px 20px;
    margin-top: 20px;
    text-align: center;
}

.bgrm-spinner {
    width: 40px;
    height: 40px;
    border: 3.5px solid rgba(255, 200, 0, 0.2);
    border-top-color: var(--bgrm-primary);
    border-radius: 50%;
    animation: bgrmSpin 0.8s linear infinite;
    margin: 0 auto 14px;
}

.bgrm-processing-status {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--bgrm-text-main);
    margin-bottom: 6px;
}

.bgrm-processing-sub {
    font-size: 0.85rem;
    color: var(--bgrm-text-muted);
    max-width: 480px;
    margin: 0 auto;
}

.bgrm-progress-bar-wrap {
    width: 100%;
    max-width: 400px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    margin: 14px auto 0;
    overflow: hidden;
}

.bgrm-progress-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ffc800 0%, #ffaa00 100%);
    border-radius: 999px;
    animation: bgrmPulse 1.5s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Alert Messages
   -------------------------------------------------------------------------- */
.bgrm-alert-error {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 18px;
    font-size: 0.92rem;
    align-items: center;
    gap: 12px;
}

.bgrm-alert-error.show {
    display: flex;
}

.bgrm-alert-error svg {
    flex-shrink: 0;
    color: var(--bgrm-error);
}

.bgrm-alert-error .close-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #991b1b;
    cursor: pointer;
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Checkerboard Transparency Canvas Pattern
   -------------------------------------------------------------------------- */
.bgrm-checkerboard {
    background-color: #ffffff;
    background-image: 
        linear-gradient(45deg, #e5e7eb 25%, transparent 25%), 
        linear-gradient(-45deg, #e5e7eb 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #e5e7eb 75%), 
        linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* --------------------------------------------------------------------------
   Result UI Showcase Section
   -------------------------------------------------------------------------- */
.bgrm-result-wrap {
    display: none;
    margin-top: 32px;
    border-top: 2px dashed var(--bgrm-border);
    padding-top: 28px;
}

.bgrm-result-wrap.show {
    display: block;
    animation: bgrmFadeIn 0.35s ease;
}

.bgrm-result-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    text-align: left;
}

@media (min-width: 640px) {
    .bgrm-result-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.bgrm-result-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--bgrm-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bgrm-result-title svg {
    color: var(--bgrm-success);
}

/* Toolbar Controls */
.bgrm-result-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.bgrm-view-modes {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--bgrm-border);
}

.bgrm-view-btn {
    background: transparent;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bgrm-text-muted);
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bgrm-view-btn.active {
    background: #ffffff;
    color: var(--bgrm-text-main);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bgrm-backdrop-picker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid var(--bgrm-border);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--bgrm-text-muted);
}

.bgrm-color-chip {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: transform 0.15s ease;
}

.bgrm-color-chip:hover,
.bgrm-color-chip.active {
    transform: scale(1.18);
    border-color: var(--bgrm-primary);
}

.bgrm-chip-checkerboard {
    background: linear-gradient(45deg, #bbb 25%, transparent 25%), linear-gradient(-45deg, #bbb 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #bbb 75%), linear-gradient(-45deg, transparent 75%, #bbb 75%);
    background-size: 6px 6px;
    background-color: #fff;
}

.bgrm-chip-white {
    background-color: #ffffff;
}

.bgrm-chip-dark {
    background-color: #111418;
}

/* --------------------------------------------------------------------------
   Interactive Comparison Slider
   -------------------------------------------------------------------------- */
.bgrm-slider-container {
    position: relative;
    width: 100%;
    max-height: 520px;
    border-radius: var(--bgrm-radius-md);
    overflow: hidden;
    border: 1px solid var(--bgrm-border);
    user-select: none;
    touch-action: pan-y;
}

.bgrm-slider-aspect {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

/* After image (on background / checkerboard) */
.bgrm-slider-after-layer {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.bgrm-slider-after-layer img {
    max-width: 100%;
    max-height: 520px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Before image (clipped overlay on top) */
.bgrm-slider-before-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bgrm-slider-before-layer img {
    max-width: 100%;
    max-height: 520px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Slider Handle */
.bgrm-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: #ffffff;
    cursor: ew-resize;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    transform: translateX(-50%);
    z-index: 20;
}

.bgrm-slider-handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #ffffff;
    color: #111418;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 2px solid var(--bgrm-primary);
}

/* Floating Badges */
.bgrm-slider-badge-before,
.bgrm-slider-badge-after {
    position: absolute;
    top: 14px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bgrm-slider-badge-before {
    left: 14px;
    background: rgba(17, 20, 24, 0.75);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.bgrm-slider-badge-after {
    right: 14px;
    background: rgba(255, 200, 0, 0.95);
    color: #111418;
}

/* --------------------------------------------------------------------------
   Side-by-Side View
   -------------------------------------------------------------------------- */
.bgrm-side-by-side-grid {
    display: none;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .bgrm-side-by-side-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.bgrm-preview-card {
    background: #ffffff;
    border: 1px solid var(--bgrm-border);
    border-radius: var(--bgrm-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bgrm-preview-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--bgrm-border);
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bgrm-text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bgrm-preview-stage {
    min-height: 240px;
    max-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.bgrm-preview-stage img {
    max-width: 100%;
    max-height: 340px;
    object-fit: contain;
}

/* --------------------------------------------------------------------------
   Result Actions & Download Bar
   -------------------------------------------------------------------------- */
.bgrm-result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
}

@media (min-width: 640px) {
    .bgrm-result-actions {
        flex-direction: row;
    }
}

.bgrm-btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #111418;
    color: var(--bgrm-primary);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 15px 34px;
    border-radius: 12px;
    border: 2px solid var(--bgrm-primary);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(17, 20, 24, 0.2);
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
    max-width: 320px;
}

.bgrm-btn-download:hover {
    background: #1e242b;
    color: #ffffff;
    border-color: #ffaa00;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(17, 20, 24, 0.3);
}

.bgrm-btn-download svg {
    flex-shrink: 0;
}

.bgrm-btn-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f1f5f9;
    color: var(--bgrm-text-main);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 24px;
    border-radius: 12px;
    border: 1px solid var(--bgrm-border);
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    max-width: 260px;
}

.bgrm-btn-reset:hover {
    background: #e2e8f0;
}

.bgrm-btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    color: var(--bgrm-text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.bgrm-btn-copy:hover {
    color: var(--bgrm-text-main);
}

/* --------------------------------------------------------------------------
   SEO Content & Structured Article Styling
   -------------------------------------------------------------------------- */
.bgrm-content-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 20px 60px;
    color: var(--bgrm-text-main);
    line-height: 1.75;
}

.bgrm-content-section h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 48px;
    margin-bottom: 18px;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

@media (min-width: 768px) {
    .bgrm-content-section h2 {
        font-size: 1.95rem;
    }
}

.bgrm-content-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 28px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.bgrm-content-section p {
    font-size: 1rem;
    color: #334155;
    margin-bottom: 18px;
}

.bgrm-content-section ul {
    margin-bottom: 20px;
    padding-left: 24px;
}

.bgrm-content-section li {
    margin-bottom: 8px;
    color: #334155;
}

.bgrm-highlight-box {
    background: linear-gradient(135deg, #fffdf2 0%, #fffbe6 100%);
    border-left: 4px solid var(--bgrm-primary);
    border-radius: 0 10px 10px 0;
    padding: 18px 22px;
    margin: 28px 0;
    font-size: 1.02rem;
    color: #1e293b;
    font-weight: 500;
}

/* How It Works Steps Grid */
.bgrm-steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 28px 0;
}

@media (min-width: 640px) {
    .bgrm-steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.bgrm-step-card {
    background: #ffffff;
    border: 1px solid var(--bgrm-border);
    border-radius: var(--bgrm-radius-md);
    padding: 24px 20px;
    text-align: left;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bgrm-step-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.bgrm-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bgrm-primary);
    color: #111418;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.bgrm-step-card h3 {
    font-size: 1.15rem;
    margin-top: 0;
    margin-bottom: 8px;
}

.bgrm-step-card p {
    font-size: 0.92rem;
    color: var(--bgrm-text-muted);
    margin-bottom: 0;
}

/* Use Cases Grid */
.bgrm-cases-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 28px 0;
}

@media (min-width: 640px) {
    .bgrm-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .bgrm-cases-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.bgrm-case-card {
    background: #ffffff;
    border: 1px solid var(--bgrm-border);
    border-radius: var(--bgrm-radius-md);
    padding: 22px 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.bgrm-case-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #111418;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.bgrm-case-card h3 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 6px;
}

.bgrm-case-card p {
    font-size: 0.88rem;
    color: var(--bgrm-text-muted);
    margin-bottom: 0;
}

/* Comparison Table */
.bgrm-table-wrap {
    overflow-x: auto;
    margin: 30px 0;
    border: 1px solid var(--bgrm-border);
    border-radius: var(--bgrm-radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.bgrm-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
    text-align: left;
}

.bgrm-comparison-table th {
    background: #f8fafc;
    padding: 14px 18px;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 2px solid var(--bgrm-border);
}

.bgrm-comparison-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--bgrm-border);
    color: #334155;
}

.bgrm-comparison-table tr:last-child td {
    border-bottom: none;
}

.bgrm-comparison-table tr:nth-child(even) {
    background: #fafbfe;
}

/* Demonstration Showcase Figure */
.bgrm-showcase-figure {
    margin: 36px 0;
    border-radius: var(--bgrm-radius-md);
    overflow: hidden;
    border: 1px solid var(--bgrm-border);
    box-shadow: var(--bgrm-shadow);
    background: #ffffff;
    text-align: center;
}

.bgrm-showcase-figure img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.bgrm-showcase-caption {
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--bgrm-text-muted);
    background: #f8fafc;
    border-top: 1px solid var(--bgrm-border);
}

/* --------------------------------------------------------------------------
   FAQ Section & Accordion
   -------------------------------------------------------------------------- */
.bgrm-faq-wrapper {
    margin-top: 40px;
}

.bgrm-faq-item {
    border: 1px solid var(--bgrm-border);
    border-radius: var(--bgrm-radius-md);
    margin-bottom: 14px;
    background: #ffffff;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bgrm-faq-item:hover {
    border-color: #cbd5e1;
}

.bgrm-faq-item.active {
    border-color: var(--bgrm-primary);
    box-shadow: 0 4px 12px rgba(255, 200, 0, 0.08);
}

.bgrm-faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 18px 20px;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bgrm-text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    line-height: 1.4;
}

.bgrm-faq-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--bgrm-text-muted);
}

.bgrm-faq-item.active .bgrm-faq-icon {
    transform: rotate(180deg);
    color: #b48500;
}

.bgrm-faq-answer {
    display: none;
    padding: 0 20px 20px;
    font-size: 0.96rem;
    color: #475569;
    line-height: 1.7;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
    padding-top: 14px;
}

.bgrm-faq-item.active .bgrm-faq-answer {
    display: block;
    animation: bgrmFadeIn 0.2s ease;
}

/* --------------------------------------------------------------------------
   Animations & Accessibility Utilities
   -------------------------------------------------------------------------- */
@keyframes bgrmFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bgrmSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bgrmPulse {
    0% { transform: scaleX(0.2); transform-origin: left; }
    50% { transform: scaleX(1); transform-origin: left; }
    50.1% { transform: scaleX(1); transform-origin: right; }
    100% { transform: scaleX(0.2); transform-origin: right; }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
