/* ==========================================================================
   Base - CSS Variables, Reset, Typography
   Review Helper for WooCommerce
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --rhwc-sidebar-width: 292px;
    --rhwc-sidebar-collapsed: 88px;

    --rhwc-primary: #2563eb;
    --rhwc-primary-light: #60a5fa;
    --rhwc-primary-dark: #1d4ed8;
    --rhwc-primary-glow: rgba(37, 99, 235, 0.12);
    --rhwc-primary-soft: #dbeafe;

    --rhwc-bg: #f3f7fb;
    --rhwc-surface: #ffffff;
    --rhwc-surface-2: #f1f5f9;
    --rhwc-surface-3: #e8f0ff;
    --rhwc-border: rgba(100, 116, 139, 0.24);
    --rhwc-border-strong: rgba(71, 85, 105, 0.38);

    --rhwc-text: #0f172a;
    --rhwc-text-muted: #475569;
    --rhwc-text-light: #5b6b82;

    --rhwc-sidebar-bg: #0f172a;
    --rhwc-sidebar-bg-2: #111c33;
    --rhwc-sidebar-hover: rgba(148, 163, 184, 0.12);
    --rhwc-sidebar-active: rgba(37, 99, 235, 0.22);
    --rhwc-sidebar-text: #dbe7f5;
    --rhwc-sidebar-text-muted: #9fb1c8;
    --rhwc-sidebar-text-active: #f8fafc;

    --rhwc-success: #16a34a;
    --rhwc-danger: #dc2626;
    --rhwc-warning: #d97706;

    --rhwc-radius: 22px;
    --rhwc-radius-sm: 14px;
    --rhwc-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --rhwc-shadow-lg: 0 22px 48px rgba(15, 23, 42, 0.14);
    --rhwc-transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

#rhwc-react-app.wrap {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.rhwc-app {
    display: flex;
    min-height: calc(100vh - 32px);
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, #f3f7fb 46%, #eef3f8 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--rhwc-text);
    font-size: 14px;
    line-height: 1.6;
}

.rhwc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.rhwc-topbar {
    min-height: 74px;
    padding: 14px 30px;
    border-bottom: 1px solid rgba(100, 116, 139, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 32px;
    z-index: 90;
}

.rhwc-topbar__heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.rhwc-topbar__breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    min-width: 0;
}

.rhwc-topbar__plugin {
    color: var(--rhwc-text-muted);
    font-weight: 500;
}

.rhwc-topbar__page {
    color: var(--rhwc-text);
    font-weight: 700;
}

.rhwc-topbar__description {
    margin: 0;
    color: var(--rhwc-text-muted);
    font-size: 12.5px;
}

.rhwc-topbar__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(100, 116, 139, 0.2);
    background: #f8fafc;
    color: #334155;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.rhwc-topbar__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rhwc-success);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
}

.rhwc-content {
    flex: 1;
    padding: 32px;
    animation: rhwcFadeIn 0.28s ease;
    overflow-y: auto;
}

@keyframes rhwcFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rhwc-card {
    background: #ffffff;
    border: 1px solid var(--rhwc-border);
    border-radius: var(--rhwc-radius);
    padding: 28px;
    box-shadow: var(--rhwc-shadow);
    margin-bottom: 24px;
    position: relative;
    backdrop-filter: blur(10px);
}

.rhwc-card--soft {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.rhwc-card h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--rhwc-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rhwc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: var(--rhwc-radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: transform var(--rhwc-transition), box-shadow var(--rhwc-transition), background var(--rhwc-transition), border-color var(--rhwc-transition), color var(--rhwc-transition);
}

.rhwc-btn--primary {
    background: linear-gradient(135deg, var(--rhwc-primary) 0%, var(--rhwc-primary-light) 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.rhwc-btn--primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(37, 99, 235, 0.24);
}

.rhwc-btn--primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.rhwc-btn--secondary {
    background: #f8fafc;
    color: var(--rhwc-text);
    border: 1px solid var(--rhwc-border);
}

.rhwc-btn--secondary:hover {
    background: #eef4ff;
    border-color: var(--rhwc-border-strong);
    color: var(--rhwc-primary-dark);
}

.rhwc-btn--danger {
    color: var(--rhwc-danger);
    border: 1px solid #fecaca;
    background: #fff5f5;
}

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

.rhwc-btn--sm {
    padding: 6px 12px;
    font-size: 12.5px;
}

.rhwc-notice {
    padding: 12px 16px;
    border-radius: var(--rhwc-radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 20px;
}

.rhwc-notice--success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.rhwc-notice--error {
    background: #fff5f5;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.rhwc-status-bar {
    padding: 14px 18px;
    border-radius: var(--rhwc-radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    margin-top: 18px;
    border-left: 4px solid transparent;
}

.rhwc-status-bar--success {
    background: #f0fdf4;
    border-left-color: var(--rhwc-success);
    color: #166534;
}

.rhwc-status-bar--error {
    background: #fff5f5;
    border-left-color: var(--rhwc-danger);
    color: #991b1b;
}

.rhwc-status-bar--info {
    background: #eff6ff;
    border-left-color: var(--rhwc-primary);
    color: #1d4ed8;
}

.rhwc-btn:focus-visible,
.rhwc-sidebar__toggle:focus-visible,
.rhwc-nav-item:focus-visible,
.rhwc-action-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

@media (max-width: 960px) {
    .rhwc-content {
        padding: 22px;
    }

    .rhwc-topbar {
        padding: 16px 22px;
    }
}

@media (max-width: 640px) {
    .rhwc-topbar {
        align-items: flex-start;
        flex-direction: column;
        min-height: auto;
    }

    .rhwc-topbar__status {
        display: none;
    }

    .rhwc-content {
        padding: 18px 16px 24px;
    }

    .rhwc-card {
        padding: 22px 18px;
        border-radius: 18px;
    }
}
