/* Simple Cart SaaS account-area dark mode.
   Loaded only through app/helpers.php after this patch is applied.
   Public checkout pages do not load this file. */

.sc-theme-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.sc-theme-card h2 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}

.sc-theme-card p {
    margin: 0;
}

.sc-theme-toggle {
    white-space: nowrap;
}

html[data-simple-cart-theme="dark"] {
    color-scheme: dark;
}

html[data-simple-cart-theme="dark"] body {
    background: rgb(16, 17, 21);
    color: #e5e7eb;
}

html[data-simple-cart-theme="dark"] .top {
    background: rgb(16, 17, 21);
    border-bottom-color: #334155;
}

html[data-simple-cart-theme="dark"] .brand,
html[data-simple-cart-theme="dark"] .top a,
html[data-simple-cart-theme="dark"] nav a {
    color: #f8fafc;
}

html[data-simple-cart-theme="dark"] .container,
html[data-simple-cart-theme="dark"] h1,
html[data-simple-cart-theme="dark"] h2,
html[data-simple-cart-theme="dark"] h3,
html[data-simple-cart-theme="dark"] h4,
html[data-simple-cart-theme="dark"] h5,
html[data-simple-cart-theme="dark"] h6,
html[data-simple-cart-theme="dark"] label,
html[data-simple-cart-theme="dark"] strong,
html[data-simple-cart-theme="dark"] .value {
    color: #f8fafc;
}

html[data-simple-cart-theme="dark"] .muted,
html[data-simple-cart-theme="dark"] .label,
html[data-simple-cart-theme="dark"] small,
html[data-simple-cart-theme="dark"] .small {
    color: #cbd5e1;
}

html[data-simple-cart-theme="dark"] a {
    color: #93c5fd;
}

html[data-simple-cart-theme="dark"] .card,
html[data-simple-cart-theme="dark"] .stat,
html[data-simple-cart-theme="dark"] .order-card,
html[data-simple-cart-theme="dark"] .product-card,
html[data-simple-cart-theme="dark"] .product-list-card,
html[data-simple-cart-theme="dark"] .link-card,
html[data-simple-cart-theme="dark"] .checkout-link-card,
html[data-simple-cart-theme="dark"] .settings-card,
html[data-simple-cart-theme="dark"] .panel,
html[data-simple-cart-theme="dark"] .box,
html[data-simple-cart-theme="dark"] .table-wrap,
html[data-simple-cart-theme="dark"] table {
    background: #111827;
    color: #e5e7eb;
    border-color: #334155;
    box-shadow: none;
}

html[data-simple-cart-theme="dark"] .notice,
html[data-simple-cart-theme="dark"] .flash,
html[data-simple-cart-theme="dark"] .message {
    background: #172554;
    color: #dbeafe;
    border-color: #2563eb;
}

html[data-simple-cart-theme="dark"] .notice.success,
html[data-simple-cart-theme="dark"] .notice.ok,
html[data-simple-cart-theme="dark"] .success {
    background: #052e16;
    color: #dcfce7;
    border-color: #16a34a;
}

html[data-simple-cart-theme="dark"] .notice.warning,
html[data-simple-cart-theme="dark"] .notice.warn,
html[data-simple-cart-theme="dark"] .warning {
    background: #451a03;
    color: #ffedd5;
    border-color: #f97316;
}

html[data-simple-cart-theme="dark"] .notice.danger,
html[data-simple-cart-theme="dark"] .notice.error,
html[data-simple-cart-theme="dark"] .danger,
html[data-simple-cart-theme="dark"] .error,
html[data-simple-cart-theme="dark"] .err {
    background: #450a0a;
    color: #fee2e2;
    border-color: #dc2626;
}

html[data-simple-cart-theme="dark"] input,
html[data-simple-cart-theme="dark"] select,
html[data-simple-cart-theme="dark"] textarea {
    background: #0b1220;
    color: #f8fafc;
    border-color: #475569;
}

html[data-simple-cart-theme="dark"] input::placeholder,
html[data-simple-cart-theme="dark"] textarea::placeholder {
    color: #94a3b8;
}

html[data-simple-cart-theme="dark"] input:focus,
html[data-simple-cart-theme="dark"] select:focus,
html[data-simple-cart-theme="dark"] textarea:focus {
    outline-color: #60a5fa;
    border-color: #60a5fa;
}

html[data-simple-cart-theme="dark"] button,
html[data-simple-cart-theme="dark"] .btn,
html[data-simple-cart-theme="dark"] input[type="submit"] {
    border-color: #60a5fa;
}

html[data-simple-cart-theme="dark"] .btn.secondary,
html[data-simple-cart-theme="dark"] button.secondary,
html[data-simple-cart-theme="dark"] .secondary {
    background: #1e293b;
    color: #f8fafc;
    border-color: #475569;
}

html[data-simple-cart-theme="dark"] hr {
    border-color: #334155;
}

html[data-simple-cart-theme="dark"] th {
    background: #1e293b;
    color: #f8fafc;
    border-bottom-color: #334155;
}

html[data-simple-cart-theme="dark"] td,
html[data-simple-cart-theme="dark"] tr,
html[data-simple-cart-theme="dark"] .row,
html[data-simple-cart-theme="dark"] .order-row {
    border-color: #334155;
}

html[data-simple-cart-theme="dark"] .pill,
html[data-simple-cart-theme="dark"] .badge,
html[data-simple-cart-theme="dark"] .chip {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
}

html[data-simple-cart-theme="dark"] .copybox,
html[data-simple-cart-theme="dark"] .url-box,
html[data-simple-cart-theme="dark"] code,
html[data-simple-cart-theme="dark"] pre {
    background: #0b1220;
    color: #e2e8f0;
    border-color: #334155;
}

/* Readability fixes for the product catalog and order custom-answer panels. */
html[data-simple-cart-theme="dark"] .product-link-item,
html[data-simple-cart-theme="dark"] .order-field-box,
html[data-simple-cart-theme="dark"] .subcard {
    background: #0b1220;
    color: #e5e7eb;
    border-color: #334155;
}

html[data-simple-cart-theme="dark"] .product-card-head,
html[data-simple-cart-theme="dark"] .product-card-links,
html[data-simple-cart-theme="dark"] .order-custom-fields {
    border-color: #334155;
}

html[data-simple-cart-theme="dark"] .sc-theme-card {
    background: #111827;
    border-color: #334155;
}

@media (max-width: 640px) {
    .sc-theme-toggle {
        width: 100%;
    }
}


html[data-simple-cart-theme="dark"] .link-sales-count {
    background: #052e16;
    color: #dcfce7;
    border-color: #16a34a;
}


html[data-simple-cart-theme="dark"] .export-check-option {
    background: #0b1220;
    color: #e5e7eb;
    border-color: #334155;
}


html[data-simple-cart-theme="dark"] .rich-editor-toolbar {
    background: #111827;
    border-color: #334155;
}

html[data-simple-cart-theme="dark"] .rich-editor-surface {
    background: #0b1220;
    color: #f8fafc;
    border-color: #475569;
}

html[data-simple-cart-theme="dark"] .rich-editor-button {
    background: #1e293b;
    color: #f8fafc;
    border-color: #475569;
}

html[data-simple-cart-theme="dark"] .rich-editor-button:hover {
    background: #334155;
}

html[data-simple-cart-theme="dark"] .rich-editor-control {
    background: #0b1220;
    color: #f8fafc;
    border-color: #475569;
}


html[data-simple-cart-theme="dark"] .link-metric {
    background: #0b1220;
    color: #e5e7eb;
    border-color: #334155;
}

html[data-simple-cart-theme="dark"] .link-metric-number {
    color: #f8fafc;
}

html[data-simple-cart-theme="dark"] .link-metric-label {
    color: #cbd5e1;
}

/* Dark mode support for mobile admin and checkout-link cards. */
html[data-simple-cart-theme="dark"] .checkout-link-mobile-card,
html[data-simple-cart-theme="dark"] .admin-mobile-card {
    background: #111827;
    color: #e5e7eb;
    border-color: #334155;
}

html[data-simple-cart-theme="dark"] .admin-mobile-head,
html[data-simple-cart-theme="dark"] .mobile-info-grid>div,
html[data-simple-cart-theme="dark"] .admin-connection-row>div {
    border-color: #334155;
}

html[data-simple-cart-theme="dark"] .mobile-info-grid>div,
html[data-simple-cart-theme="dark"] .admin-connection-row>div {
    background: #0b1220;
    color: #e5e7eb;
}

html[data-simple-cart-theme="dark"] .mobile-label {
    color: #cbd5e1;
}

/* Dark mode support for restored centered desktop layout and clearer product/link cards. */
html[data-simple-cart-theme="dark"] .product-list-card {
    background: #111827;
    border-color: #475569;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

html[data-simple-cart-theme="dark"] .product-list-card:hover {
    border-color: #64748b;
}

html[data-simple-cart-theme="dark"] .product-link-item,
html[data-simple-cart-theme="dark"] .checkout-link-mobile-card {
    background: #0b1220;
    border-color: #475569;
    box-shadow: inset 4px 0 0 #1d4ed8;
}

html[data-simple-cart-theme="dark"] .checkout-links-table table {
    border-color: #475569;
}

html[data-simple-cart-theme="dark"] .checkout-links-table th {
    border-bottom-color: #475569;
}

html[data-simple-cart-theme="dark"] .checkout-links-table tr:nth-child(even) td {
    background: #0f172a;
}

html[data-simple-cart-theme="dark"] .checkout-links-table tr:hover td {
    background: #1e293b;
}

@media (max-width: 760px) {
    html[data-simple-cart-theme="dark"] .product-list-card,
    html[data-simple-cart-theme="dark"] .product-link-item,
    html[data-simple-cart-theme="dark"] .checkout-link-mobile-card {
        box-shadow: none;
    }
}

/* Dark mode support for Stripe Connect readiness + advanced manual setup. */
html[data-simple-cart-theme="dark"] .stripe-status-panel{
    background:#0b1220;
    border-color:#334155;
    color:#e5e7eb;
}
html[data-simple-cart-theme="dark"] .settings-detail-list{
    color:#cbd5e1;
}
html[data-simple-cart-theme="dark"] .stripe-settings-form{
    border-top-color:#334155;
}
html[data-simple-cart-theme="dark"] .advanced-settings-section{
    background:#0b1220;
    border-color:#334155;
}
html[data-simple-cart-theme="dark"] .advanced-settings-section summary{
    color:#f8fafc;
}
html[data-simple-cart-theme="dark"] .advanced-settings-section summary::after{
    color:#cbd5e1;
}
html[data-simple-cart-theme="dark"] .advanced-settings-inner{
    background:#111827;
    border-top-color:#334155;
}

/* Dark mode support for WarriorPlus Billing Phase 1. */
html[data-simple-cart-theme="dark"] .link-button{color:#93c5fd}
html[data-simple-cart-theme="dark"] .link-button:hover{color:#bfdbfe}
html[data-simple-cart-theme="dark"] .danger-link{color:#fca5a5}
html[data-simple-cart-theme="dark"] .danger-link:hover{color:#fecaca}
html[data-simple-cart-theme="dark"] .wplus-phase-card{background:#0b1220;border-color:#334155;color:#e5e7eb}

html[data-simple-cart-theme="dark"] .wplus-generated-link .copybox {
    background: #0b1220;
    color: #e2e8f0;
    border-color: #334155;
}

html[data-simple-cart-theme="dark"] .wplus-protection-card {
    background: #0b1220;
    color: #e5e7eb;
    border-color: #334155;
}


html[data-simple-cart-theme="dark"] .purchase-complete-icon {
    background: #052e16;
    color: #bbf7d0;
    border: 1px solid #16a34a;
}

html[data-simple-cart-theme="dark"] .purchase-complete-steps,
html[data-simple-cart-theme="dark"] .wplus-url-card {
    background: #0b1220;
    border-color: #334155;
}
