/**
 * Brine Calculator Styles
 * 
 * Namespaced under .dqbq-brine-calc for isolation from theme styles.
 * Supports light, dark, and auto theme modes.
 * 
 * @package Destination_BBQ_Tools
 */

/* =====================================================
   CSS Variables
   ===================================================== */
:root {
    --dqbq-brine-accent: #007499;
    --dqbq-brine-ink: #0f172a;
    --dqbq-brine-muted: #5a6978;
    --dqbq-brine-result: #059669;
}

/* =====================================================
   Base Container
   ===================================================== */
.dqbq-brine-calc,
.dqbq-brine-calc * {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.dqbq-brine-calc {
    max-width: 760px;
    margin: 24px auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    color: var(--dqbq-brine-ink);
    overflow-x: hidden;
}

/* Reset theme spacing on common elements */
.dqbq-brine-calc p,
.dqbq-brine-calc h1,
.dqbq-brine-calc h2,
.dqbq-brine-calc h3,
.dqbq-brine-calc h4,
.dqbq-brine-calc label,
.dqbq-brine-calc fieldset,
.dqbq-brine-calc legend,
.dqbq-brine-calc ul,
.dqbq-brine-calc li,
.dqbq-brine-calc span,
.dqbq-brine-calc button {
    margin: 0;
    padding: 0;
}

/* Additional button reset for theme overrides */
.dqbq-brine-calc button {
    line-height: 1 !important;
    min-height: 0 !important;
    height: auto !important;
    vertical-align: middle !important;
}

/* =====================================================
   Header
   ===================================================== */
.dqbq-brine-calc__header {
    padding: 18px 20px 10px;
    text-align: center;
    position: relative;
}

.dqbq-brine-calc__title {
    margin: 0;
    font-size: 28px;
    color: var(--dqbq-brine-ink);
    font-weight: 800;
}

.dqbq-brine-calc__subtitle {
    margin: 8px 0 0;
    color: var(--dqbq-brine-muted);
}

.dqbq-brine-calc__tip {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--dqbq-brine-muted);
}

/* Theme Toggle */
.dqbq-brine-calc__theme-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    line-height: 1;
    white-space: nowrap;
}

.dqbq-brine-calc__theme-toggle:hover {
    background: #f3f4f6;
}

.dqbq-brine-calc__theme-toggle:focus-visible {
    outline: 2px solid var(--dqbq-brine-accent);
    outline-offset: 3px;
}

.dqbq-brine-calc__theme-toggle::after {
    content: attr(data-icon);
    font-weight: 800;
    font-size: 16px;
}

/* =====================================================
   Tab Navigation
   ===================================================== */
.dqbq-brine-calc__tabs {
    display: flex;
    border-bottom: 2px solid var(--dqbq-brine-accent);
    margin: 0 20px;
    background: #eef7fa;
    padding: 6px;
    border-radius: 10px 10px 0 0;
    gap: 6px;
    overflow: visible;
}

.dqbq-brine-calc__tabs button {
    width: auto !important;
    flex: 1;
    padding: 10px 8px;
    font-weight: 700;
    border: 1px solid transparent;
    border-bottom: none;
    background: #e7f6f8;
    color: #0f172a;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    white-space: nowrap;
}

.dqbq-brine-calc__tabs button[aria-selected="true"] {
    background: var(--dqbq-brine-accent);
    border-color: var(--dqbq-brine-accent);
    color: #fff;
    box-shadow: inset 0 -2px rgba(0, 0, 0, 0.15);
}

/* Mobile tabs */
@media (max-width: 520px) {
    .dqbq-brine-calc__tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        padding-bottom: 2px;
    }
    
    .dqbq-brine-calc__tabs::-webkit-scrollbar {
        display: none;
    }
    
    .dqbq-brine-calc__tabs button {
        flex: 0 0 auto;
        min-width: max-content;
        font-size: 14px;
        padding: 8px 10px;
    }
    
    .dqbq-brine-calc__title {
        font-size: 24px;
    }
}

/* =====================================================
   Preset Chips
   ===================================================== */
.dqbq-brine-calc__presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 24px;
    margin: 0 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    justify-content: center;
    align-items: center;
    min-height: 48px;
}

.dqbq-brine-calc__preset-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px !important;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid var(--dqbq-brine-accent);
    background: #fff;
    color: var(--dqbq-brine-accent);
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    min-height: 44px !important;
    user-select: none;
}

.dqbq-brine-calc__preset-chip:hover {
    background: #eef7fa;
    border-color: #055c73;
    transform: translateY(-1px);
}

.dqbq-brine-calc__preset-chip:active {
    transform: translateY(0);
}

.dqbq-brine-calc__preset-chip.active {
    background: var(--dqbq-brine-accent);
    color: #fff;
    border-color: var(--dqbq-brine-accent);
    box-shadow: 0 2px 4px rgba(0, 116, 153, 0.2);
}

.dqbq-brine-calc__preset-chip:focus-visible {
    outline: 2px solid var(--dqbq-brine-accent);
    outline-offset: 3px;
}

.dqbq-brine-calc__preset-chip.active:hover {
    background: #006080 !important;
    border-color: #006080 !important;
    color: #fff !important;
}

/* Light mode: dark text on preset hover for visibility */
.dqbq-brine-calc.theme-light .dqbq-brine-calc__preset-chip:hover,
.dqbq-brine-calc:not(.theme-dark) .dqbq-brine-calc__preset-chip:hover {
    color: #055c73;
}

@media (max-width: 640px) {
    .dqbq-brine-calc__presets {
        padding: 8px 14px;
        gap: 6px;
    }
    
    .dqbq-brine-calc__preset-chip {
        padding: 8px 14px;
        font-size: 12px;
        min-height: 36px;
    }
}

/* =====================================================
   Body / Main Content
   ===================================================== */
.dqbq-brine-calc__body {
    padding: 16px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
}

/* =====================================================
   Form Elements
   ===================================================== */
.dqbq-brine-calc__label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

.dqbq-brine-calc__label-small {
    font-size: 12px;
    color: #475569;
}

.dqbq-brine-calc input,
.dqbq-brine-calc select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-weight: 600;
    height: 48px;
}

.dqbq-brine-calc input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.dqbq-brine-calc input[type="radio"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.dqbq-brine-calc input[aria-invalid="true"] {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* Range Slider */
.dqbq-brine-calc__range-wrap {
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 10px;
}

.dqbq-brine-calc__range-value {
    text-align: center;
    margin-top: 6px;
}

.dqbq-brine-calc input[type="range"] {
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    cursor: pointer;
}

.dqbq-brine-calc input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
}

.dqbq-brine-calc input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--dqbq-brine-accent);
    margin-top: -18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: grab;
}

.dqbq-brine-calc input[type="range"]::-webkit-slider-thumb:active {
    cursor: grabbing;
    box-shadow: 0 2px 8px rgba(0, 116, 153, 0.3);
}

.dqbq-brine-calc input[type="range"]::-moz-range-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--dqbq-brine-accent);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: grab;
}

.dqbq-brine-calc input[type="range"]::-moz-range-thumb:active {
    cursor: grabbing;
    box-shadow: 0 2px 8px rgba(0, 116, 153, 0.3);
}

.dqbq-brine-calc input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
}

/* =====================================================
   Layout Helpers
   ===================================================== */
.dqbq-brine-calc__row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

@media (max-width: 640px) {
    .dqbq-brine-calc__row {
        flex-direction: column;
    }
    
    .dqbq-brine-calc__helper {
        font-size: 13px;
    }
}

.dqbq-brine-calc__row--inputs {
    margin-top: 10px;
}

.dqbq-brine-calc__field {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.dqbq-brine-calc__imperial-inputs[hidden],
.dqbq-brine-calc__metric-inputs[hidden] {
    display: none;
}

/* =====================================================
   Helper Text
   ===================================================== */
.dqbq-brine-calc__helper {
    font-size: 12px;
    color: #667085;
    margin-top: 6px;
}

.dqbq-brine-calc__helper--error {
    color: #b91c1c;
    font-weight: 600;
}

/* =====================================================
   Unit Toggle
   ===================================================== */
.dqbq-brine-calc__unit-toggle,
.dqbq-brine-calc__time-mode {
    margin-top: 10px;
}

.dqbq-brine-calc__summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #E7F6F8;
    border: 1px solid #bfe2ea;
    padding: 8px;
    border-radius: 10px;
    gap: 8px;
    flex-wrap: wrap;
}

.dqbq-brine-calc__unit-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =====================================================
   Buttons
   ===================================================== */
.dqbq-brine-calc__btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    margin-top: 8px;
    background: var(--dqbq-brine-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1 !important;
}

.dqbq-brine-calc__btn:hover {
    background: #055c73;
}

.dqbq-brine-calc__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dqbq-brine-calc__btn--secondary {
    background: #334155;
}

.dqbq-brine-calc__btn--secondary:hover {
    background: #475569;
    transform: translateY(-1px);
}

.dqbq-brine-calc__btn--primary {
    background: var(--dqbq-brine-accent);
}

/* Button Group (Segmented Control) */
.dqbq-brine-calc [role="group"] {
    display: inline-flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    background: #cbd5e1;
    gap: 1px;
}

/* Unit Buttons */
.dqbq-brine-calc__btn--unit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto;
    margin: 0;
    padding: 12px 18px !important;
    min-height: 38px !important;
    font-size: 13px !important;
    font-weight: 700;
    border: none;
    border-radius: 0;
    background: #f1f5f9;
    color: #64748b;
    line-height: 1 !important;
}

.dqbq-brine-calc__btn--unit:hover {
    background: #e2e8f0;
    color: #334155;
}

.dqbq-brine-calc__btn--unit[aria-pressed="true"] {
    background: var(--dqbq-brine-accent);
    color: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dqbq-brine-calc__btn--unit[aria-pressed="true"]:hover {
    background: #006080;
}

/* Gap in parent handles visual division */

/* Time Mode Buttons */
.dqbq-brine-calc__btn--time {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto;
    margin: 0;
    padding: 12px 18px !important;
    min-height: 38px !important;
    font-size: 13px !important;
    font-weight: 700;
    border: none;
    border-radius: 0;
    background: #f1f5f9;
    color: #64748b;
    line-height: 1 !important;
}

.dqbq-brine-calc__btn--time:hover {
    background: #e2e8f0;
    color: #334155;
}

.dqbq-brine-calc__btn--time[aria-pressed="true"] {
    background: var(--dqbq-brine-accent);
    color: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dqbq-brine-calc__btn--time[aria-pressed="true"]:hover {
    background: #006080;
}

/* Gap in parent handles visual division */

/* =====================================================
   Notices
   ===================================================== */
.dqbq-brine-calc__notice {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    margin-top: 10px;
}

.dqbq-brine-calc__notice--warning {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #92400e;
}

.dqbq-brine-calc__notice--error {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.dqbq-brine-calc__notice--success {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #065f46;
}

.dqbq-brine-calc__notice--info {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1e3a8a;
}

.dqbq-brine-calc__notice a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.dqbq-brine-calc__notice ul {
    margin: 6px 0 0 0;
    padding-left: 20px;
    line-height: 1.6;
}

/* =====================================================
   Cure Controls
   ===================================================== */
.dqbq-brine-calc__cure-controls {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.dqbq-brine-calc__cure-header {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.dqbq-brine-calc__cure-header--warn {
    color: #c2410c;
}

.dqbq-brine-calc__cure-row {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.dqbq-brine-calc__cure-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 6px 0;
    cursor: pointer;
}

.dqbq-brine-calc__cure-checkbox label {
    margin: 0;
    font-size: 14px;
    cursor: pointer;
}

.dqbq-brine-calc__cure-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.dqbq-brine-calc__cure-help {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
    margin-top: 4px;
}

.dqbq-brine-calc__cure-help--warn {
    color: #d97706;
}

/* Cure Mode Toggle */
.dqbq-brine-calc__cure-mode {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 100%;
}

.dqbq-brine-calc__cure-mode[hidden] {
    display: none;
}

.dqbq-brine-calc__cure-mode-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dqbq-brine-calc__cure-mode-label {
    font-weight: 700;
    font-size: 13px;
    color: #334155;
    white-space: nowrap;
    flex-shrink: 0;
}

.dqbq-brine-calc__cure-mode-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 6px;
    min-height: 36px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.dqbq-brine-calc__cure-mode-option input[type="radio"] {
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
}

.dqbq-brine-calc__cure-mode-option span {
    font-size: 14px;
    line-height: 1.2;
}

.dqbq-brine-calc__cure-help-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    padding: 10px 14px !important;
    min-height: 36px !important;
    font-size: 13px !important;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    line-height: 1 !important;
}

.dqbq-brine-calc__cure-help-btn:hover {
    background: #f1f5f9;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
}

.dqbq-brine-calc__cure-help-btn:focus-visible {
    outline: 2px solid var(--dqbq-brine-accent);
    outline-offset: 3px;
}

.dqbq-brine-calc__cure-help-btn:active {
    transform: translateY(1px);
}

/* Cure Mode Explanation */
.dqbq-brine-calc__cure-explanation {
    margin-top: 8px;
    font-size: 11px;
    padding: 10px 12px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.dqbq-brine-calc__cure-explanation[hidden] {
    display: none;
}

.dqbq-brine-calc__cure-explanation strong {
    color: #0f172a;
}

.dqbq-brine-calc__cure-explanation p {
    margin: 0 0 6px 0;
    line-height: 1.5;
    color: #334155;
}

.dqbq-brine-calc__cure-explanation p:last-child {
    margin-bottom: 0;
}

.dqbq-brine-calc__cure-note {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
    color: #0f172a;
    opacity: 0.85;
}

/* Cure Advanced Controls */
.dqbq-brine-calc__cure-advanced {
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.dqbq-brine-calc__cure-advanced[hidden] {
    display: none;
}

.dqbq-brine-calc__cure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

/* Responsive cure controls */
@media (max-width: 768px) {
    .dqbq-brine-calc__cure-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dqbq-brine-calc__cure-mode {
        width: 100%;
        gap: 10px;
    }
    
    .dqbq-brine-calc__cure-mode-controls {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .dqbq-brine-calc__cure-row {
        gap: 8px;
    }
    
    .dqbq-brine-calc__cure-mode {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .dqbq-brine-calc__cure-mode-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .dqbq-brine-calc__cure-mode-label {
        margin-bottom: 4px;
    }
    
    .dqbq-brine-calc__cure-help-btn {
        margin-top: 4px;
    }
}

/* =====================================================
   Results Section
   ===================================================== */
.dqbq-brine-calc__results {
    margin-top: 12px;
}

.dqbq-brine-calc__results[hidden] {
    display: none;
}

.dqbq-brine-calc__result {
    font-size: 28px;
    font-weight: 900;
    color: var(--dqbq-brine-result);
}

/* Cards */
.dqbq-brine-calc__card {
    padding: 12px;
    border: 1px solid #dbe3ea;
    border-radius: 12px;
    background: #f1fff9;
}

.dqbq-brine-calc__card--plan {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.dqbq-brine-calc__card--time {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.dqbq-brine-calc__card--time h3 {
    color: #065f46;
}

.dqbq-brine-calc__card--time .dqbq-brine-calc__result {
    color: #047857;
}

.dqbq-brine-calc__card--time .dqbq-brine-calc__helper {
    color: #475569;
}

.dqbq-brine-calc__card-title {
    margin: 0 0 4px;
    font-size: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
    color: #0f172a;
}

.dqbq-brine-calc__card-title--ingredients {
    margin-top: 12px;
}

/* Summary Grid */
.dqbq-brine-calc__summary-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
}

/* Ingredients */
.dqbq-brine-calc__ingredients {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dqbq-brine-calc__ingredient {
    padding: 12px;
    border: 1px solid #dbe3ea;
    border-radius: 12px;
}

.dqbq-brine-calc__ingredient[hidden] {
    display: none;
}

.dqbq-brine-calc__ingredient h4 {
    margin: 0 0 6px;
    font-size: 16px;
}

.dqbq-brine-calc__ingredient--salt {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.dqbq-brine-calc__ingredient--salt h4 {
    color: #065f46;
}

.dqbq-brine-calc__ingredient--salt .dqbq-brine-calc__result {
    color: #047857;
}

.dqbq-brine-calc__ingredient--sugar {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.dqbq-brine-calc__ingredient--sugar h4 {
    color: #0c4a6e;
}

.dqbq-brine-calc__ingredient--sugar .dqbq-brine-calc__result {
    color: #0369a1;
}

.dqbq-brine-calc__ingredient--cure {
    background: #fef2f2;
    border-color: #fecaca;
}

.dqbq-brine-calc__ingredient--cure h4 {
    color: #991b1b;
}

.dqbq-brine-calc__ingredient--cure .dqbq-brine-calc__result {
    color: #b91c1c;
}

.dqbq-brine-calc__ingredient--accelerator {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.dqbq-brine-calc__ingredient--accelerator h4 {
    color: #0c4a6e;
}

.dqbq-brine-calc__ingredient--accelerator .dqbq-brine-calc__result {
    color: #0369a1;
}

/* =====================================================
   Density Controls
   ===================================================== */
.dqbq-brine-calc__density {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.dqbq-brine-calc__density[hidden] {
    display: none;
}

.dqbq-brine-calc__density fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dqbq-brine-calc__density fieldset > span {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 4px;
}

.dqbq-brine-calc__density-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

.dqbq-brine-calc__density-options label {
    margin: 0;
    padding: 6px 4px;
    min-height: 36px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.dqbq-brine-calc__density-options input[type="radio"] {
    width: 22px;
    height: 22px;
}

.dqbq-brine-calc__density-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dqbq-brine-calc__density-custom-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dqbq-brine-calc__density-custom-wrap input[type="number"] {
    width: 80px;
    padding: 6px 8px;
    font-size: 14px;
}

.dqbq-brine-calc__density-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 640px) {
    .dqbq-brine-calc__density-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .dqbq-brine-calc__density-custom {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .dqbq-brine-calc__density-custom-wrap {
        width: 100%;
    }
    
    .dqbq-brine-calc__density-custom-wrap input[type="number"] {
        width: 100%;
        max-width: 120px;
    }
}

/* =====================================================
   Volumes
   ===================================================== */
.dqbq-brine-calc__volumes {
    margin-top: 10px;
}

.dqbq-brine-calc__volumes[hidden] {
    display: none;
}

/* =====================================================
   Actions
   ===================================================== */
.dqbq-brine-calc__actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.dqbq-brine-calc__actions .dqbq-brine-calc__btn {
    margin-top: 0;
}

/* =====================================================
   Time Results
   ===================================================== */
.dqbq-brine-calc__time-results {
    margin-top: 12px;
}

/* =====================================================
   Math Toggle
   ===================================================== */
.dqbq-brine-calc__math-toggle {
    margin-top: 10px;
}

.dqbq-brine-calc__math-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dqbq-brine-calc__math-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.dqbq-brine-calc__math-btn:focus-visible {
    outline: 2px solid var(--dqbq-brine-accent);
    outline-offset: 3px;
}

.dqbq-brine-calc__math-content {
    margin-top: 8px;
    font-size: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    line-height: 1.6;
}

.dqbq-brine-calc__math-content[hidden] {
    display: none;
}

.dqbq-brine-calc__math-content code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    border: 1px solid #e2e8f0;
}

.dqbq-brine-calc__math-content strong {
    color: #0f172a;
}

/* =====================================================
   Links
   ===================================================== */
.dqbq-brine-calc__body a {
    color: #0369a1;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dqbq-brine-calc__body a:visited {
    color: #075985;
}

/* =====================================================
   Footer Sections
   ===================================================== */
.dqbq-brine-calc__safety {
    margin-top: 10px;
    font-size: 12px;
    color: #475569;
}

.dqbq-brine-calc__resources {
    margin-top: 12px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.dqbq-brine-calc__resources ul {
    margin: 6px 0 0 0;
    padding-left: 20px;
    font-size: 12px;
    line-height: 1.6;
    color: #475569;
}

.dqbq-brine-calc__disclaimer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.5;
}

/* =====================================================
   Toast Notification
   ===================================================== */
.dqbq-brine-calc__toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    background: #06D6A0;
    color: #073B4C;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 800;
    opacity: 0;
    transition: 0.25s;
    z-index: 999;
}

.dqbq-brine-calc__toast.show {
    opacity: 1;
}

/* =====================================================
   Focus Styles
   ===================================================== */
.dqbq-brine-calc :focus-visible {
    outline: 2px solid var(--dqbq-brine-accent);
    outline-offset: 3px;
}

/* =====================================================
   Hidden Utility
   ===================================================== */
.dqbq-brine-calc [hidden] {
    display: none !important;
}

/* =====================================================
   Print View (screen hidden)
   ===================================================== */
@media screen {
    .dqbq-brine-calc__print {
        display: none;
    }
}

/* =====================================================
   Accessibility
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    .dqbq-brine-calc__toast {
        transition: none;
    }
}

@media (forced-colors: active) {
    .dqbq-brine-calc * {
        forced-color-adjust: auto;
    }
    
    .dqbq-brine-calc__btn {
        border: 1px solid ButtonText;
    }
    
    .dqbq-brine-calc :focus-visible {
        outline: 2px solid Highlight;
    }
}

/* =====================================================
   DARK MODE - Auto (prefers-color-scheme)
   ===================================================== */
@media (prefers-color-scheme: dark) {
    .dqbq-brine-calc:not(.theme-light) {
        background: #0b0f12;
        border-color: #1f2937;
        box-shadow: none;
        color: #e5e7eb;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__title,
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__card-title,
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__ingredient h4 {
        color: #e5e7eb;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__subtitle,
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__helper,
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__label-small,
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__label {
        color: #a6b0ba;
    }
    
    .dqbq-brine-calc:not(.theme-light) input,
    .dqbq-brine-calc:not(.theme-light) select {
        background: #0f1418;
        border-color: #334155;
        color: #e5e7eb;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__range-wrap {
        background: #0f1418;
        border-color: #1f2937;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__card {
        background: #0f1a16;
        border-color: #123229;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__card--plan {
        background: #1a1f2e;
        border-color: #2d3748;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__card--plan .dqbq-brine-calc__card-title {
        border-bottom-color: #374151;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__summary-row {
        background: #0f1418;
        border-color: #1f2937;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__tabs {
        background: #0f1418;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__tabs button {
        background: #111827;
        color: #e5e7eb;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__tabs button[aria-selected="true"] {
        background: var(--dqbq-brine-accent);
        color: #0b0f12;
        border-color: var(--dqbq-brine-accent);
    }
    
    .dqbq-brine-calc:not(.theme-light) input[type="range"] {
        background: #374151;
    }
    
    .dqbq-brine-calc:not(.theme-light) input[type="range"]::-webkit-slider-runnable-track {
        background: #374151;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__result {
        color: #34d399;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__theme-toggle {
        background: #0f1418;
        color: #e5e7eb;
        border-color: #334155;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__body a {
        color: #7dd3fc;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__body a:visited {
        color: #93c5fd;
    }
    
    /* Time results */
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__card--time {
        background: #0f1a16 !important;
        border-color: #14532d !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__card--time h3 {
        color: #d1fae5 !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__card--time .dqbq-brine-calc__result {
        color: #34d399 !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__card--time .dqbq-brine-calc__helper {
        color: #cbd5e1 !important;
    }
    
    /* Button group dark mode */
    .dqbq-brine-calc:not(.theme-light) [role="group"] {
        background: #1f2937;
        border-color: #374151;
    }
    
    /* Unit/Time buttons dark mode */
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__btn--unit,
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__btn--time {
        color: #94a3b8;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__btn--unit:hover,
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__btn--time:hover {
        background: #374151;
        color: #e2e8f0;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__btn--unit[aria-pressed="true"],
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__btn--time[aria-pressed="true"] {
        background: var(--dqbq-brine-accent);
        color: #fff;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__btn--unit:not(:last-child),
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__btn--time:not(:last-child) {
        border-right-color: #475569;
    }
    
    /* Cure controls */
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-controls,
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-advanced {
        background: #0f1418 !important;
        border-color: #334155 !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-controls label,
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-advanced label {
        color: #e5e7eb !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-header {
        color: #cbd5e1 !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-help {
        color: #cbd5e1 !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-mode-label {
        color: #e5e7eb;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-mode-option span {
        color: #e5e7eb;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-help-btn {
        background: #111827;
        border-color: #334155;
        color: #e5e7eb;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-help-btn:hover {
        background: #1f2937;
    }
    
    /* Cure explanation */
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-explanation {
        background: #1e293b;
        color: #e2e8f0;
        border: 1px solid #334155;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-explanation strong {
        color: #fbbf24;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-explanation p {
        color: #cbd5e1;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__cure-note {
        color: #fcd34d;
    }
    
    /* Density controls */
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__density {
        background: #0f1418 !important;
        border-color: #334155 !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__density fieldset > span {
        color: #e5e7eb !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__density-options label {
        color: #e5e7eb !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__density-range {
        border-top-color: #374151 !important;
    }
    
    /* Ingredient cards */
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__ingredient--salt {
        background: #0f2419 !important;
        border-color: #1e3a2a !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__ingredient--salt h4 {
        color: #6ee7b7 !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__ingredient--sugar {
        background: #0f1a2e !important;
        border-color: #1e3a5e !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__ingredient--sugar h4 {
        color: #7dd3fc !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__ingredient--cure {
        background: #2e1a1a !important;
        border-color: #4a2727 !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__ingredient--cure h4 {
        color: #fca5a5 !important;
    }
    
    /* Math content */
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__math-btn {
        background: #111827;
        border-color: #334155;
        color: #e5e7eb;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__math-btn:hover {
        background: #374151;
        color: #f3f4f6;
        border-color: #4b5563;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__math-content {
        background: #0f1418;
        border-color: #334155;
        color: #cbd5e1;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__math-content code {
        background: #1f2937;
        border-color: #374151;
        color: #e5e7eb;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__math-content strong {
        color: #e5e7eb;
    }
    
    /* Presets */
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__presets {
        background: #0f1418;
        border-color: #1f2937;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__preset-chip {
        background: #111827;
        color: #7dd3fc;
        border-color: #7dd3fc;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__preset-chip:hover {
        background: #1f2937;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__preset-chip.active {
        background: var(--dqbq-brine-accent);
        color: #0b0f12;
        border-color: var(--dqbq-brine-accent);
    }
    
    /* Time examples */
    .dqbq-brine-calc:not(.theme-light) [data-time-examples] {
        background: #0f1a2e !important;
        border-color: #1e3a5e !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) [data-time-examples] strong {
        color: #7dd3fc !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) [data-time-examples] ul {
        color: #cbd5e1 !important;
    }
    
    /* Disclaimer */
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__disclaimer {
        border-top-color: #374151 !important;
        color: #a6b0ba !important;
    }
    
    /* Safety notices */
    .dqbq-brine-calc:not(.theme-light) [data-cure-info] {
        background: #422006 !important;
        border-color: #78350f !important;
        color: #fef3c7 !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) [data-cure-info] a {
        color: #fef3c7 !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) [data-cure-warning] {
        background: #450a0a !important;
        border-color: #7f1d1d !important;
        color: #fecaca !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) [data-thickness-warning] {
        background: #422006 !important;
        border-color: #78350f !important;
        color: #fef3c7 !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) [data-thickness-warning] a {
        color: #fef3c7 !important;
    }
    
    /* Resources */
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__resources {
        background: #0f1418 !important;
        border-color: #334155 !important;
    }
    
    .dqbq-brine-calc:not(.theme-light) .dqbq-brine-calc__resources ul {
        color: #cbd5e1 !important;
    }
}

/* =====================================================
   DARK MODE - Manual Class
   ===================================================== */
.dqbq-brine-calc.theme-dark {
    background: #0b0f12;
    border-color: #1f2937;
    box-shadow: none;
    color: #e5e7eb;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__title,
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__card-title,
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__ingredient h4 {
    color: #e5e7eb;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__subtitle,
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__helper,
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__label-small,
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__label {
    color: #a6b0ba;
}

.dqbq-brine-calc.theme-dark input,
.dqbq-brine-calc.theme-dark select {
    background: #0f1418;
    border-color: #334155;
    color: #e5e7eb;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__range-wrap {
    background: #0f1418;
    border-color: #1f2937;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__card {
    background: #0f1a16;
    border-color: #123229;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__card--plan {
    background: #1a1f2e;
    border-color: #2d3748;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__card--plan .dqbq-brine-calc__card-title {
    border-bottom-color: #374151;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__summary-row {
    background: #0f1418;
    border-color: #1f2937;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__tabs {
    background: #0f1418;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__tabs button {
    background: #111827;
    color: #e5e7eb;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__tabs button[aria-selected="true"] {
    background: var(--dqbq-brine-accent);
    color: #0b0f12;
    border-color: var(--dqbq-brine-accent);
}

.dqbq-brine-calc.theme-dark input[type="range"] {
    background: #374151;
}

.dqbq-brine-calc.theme-dark input[type="range"]::-webkit-slider-runnable-track {
    background: #374151;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__result {
    color: #34d399;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__theme-toggle {
    background: #0f1418;
    color: #e5e7eb;
    border-color: #334155;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__body a {
    color: #7dd3fc;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__body a:visited {
    color: #93c5fd;
}

/* Manual dark - same overrides as auto dark (trimmed for brevity) */
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__card--time {
    background: #0f1a16 !important;
    border-color: #14532d !important;
}

/* Button group dark mode (manual) */
.dqbq-brine-calc.theme-dark [role="group"] {
    background: #1f2937;
    border-color: #374151;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__btn--unit,
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__btn--time {
    color: #94a3b8;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__btn--unit:hover,
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__btn--time:hover {
    background: #374151;
    color: #e2e8f0;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__btn--unit[aria-pressed="true"],
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__btn--time[aria-pressed="true"] {
    background: var(--dqbq-brine-accent);
    color: #fff;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__btn--unit:not(:last-child),
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__btn--time:not(:last-child) {
    border-right-color: #475569;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__cure-controls,
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__cure-advanced {
    background: #0f1418 !important;
    border-color: #334155 !important;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__cure-explanation {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__cure-explanation strong {
    color: #fbbf24;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__cure-note {
    color: #fcd34d;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__cure-mode-label,
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__cure-mode-option span {
    color: #e5e7eb;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__cure-help-btn,
.dqbq-brine-calc.theme-dark .dqbq-brine-calc__math-btn {
    background: #111827;
    border-color: #334155;
    color: #e5e7eb;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__math-btn:hover {
    background: #374151;
    color: #f3f4f6;
    border-color: #4b5563;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__density {
    background: #0f1418 !important;
    border-color: #334155 !important;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__ingredient--salt {
    background: #0f2419 !important;
    border-color: #1e3a2a !important;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__ingredient--salt h4 {
    color: #6ee7b7 !important;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__ingredient--sugar {
    background: #0f1a2e !important;
    border-color: #1e3a5e !important;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__ingredient--sugar h4 {
    color: #7dd3fc !important;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__ingredient--cure {
    background: #2e1a1a !important;
    border-color: #4a2727 !important;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__ingredient--cure h4 {
    color: #fca5a5 !important;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__presets {
    background: #0f1418;
    border-color: #1f2937;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__preset-chip {
    background: #111827;
    color: #7dd3fc;
    border-color: #7dd3fc;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__preset-chip.active {
    background: var(--dqbq-brine-accent);
    color: #0b0f12;
    border-color: var(--dqbq-brine-accent);
}

.dqbq-brine-calc.theme-dark [data-time-examples] {
    background: #0f1a2e !important;
    border-color: #1e3a5e !important;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__disclaimer {
    border-top-color: #374151 !important;
    color: #a6b0ba !important;
}

.dqbq-brine-calc.theme-dark [data-cure-info] {
    background: #422006 !important;
    border-color: #78350f !important;
    color: #fef3c7 !important;
}

.dqbq-brine-calc.theme-dark [data-cure-warning] {
    background: #450a0a !important;
    border-color: #7f1d1d !important;
    color: #fecaca !important;
}

.dqbq-brine-calc.theme-dark .dqbq-brine-calc__resources {
    background: #0f1418 !important;
    border-color: #334155 !important;
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    @page {
        margin: 0.5in;
    }
    
    body {
        font-family: serif;
        font-size: 11pt;
        line-height: 1.3;
        color: #000;
    }
    
    .dqbq-brine-calc__print {
        display: block !important;
        padding: 0.25in;
    }
    
    .dqbq-print__brand-header {
        text-align: center;
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid #ddd;
    }
    
    .dqbq-print__brand-header h1 {
        font-size: 14pt;
        font-weight: 700;
        margin: 0 0 2px 0;
        color: #007499;
    }
    
    .dqbq-print__url {
        font-size: 9pt;
        color: #666;
    }
    
    .dqbq-brine-calc__print .dqbq-print__title {
        font-size: 20pt;
        font-weight: 700;
        margin: 0 0 6px 0;
        padding-bottom: 6px;
        border-bottom: 2px solid #ccc;
    }
    
    .dqbq-brine-calc__print h2 {
        font-size: 13pt;
        font-weight: 700;
        margin: 14px 0 6px 0;
        border-bottom: 1px solid #ddd;
        padding-bottom: 2px;
    }
    
    .dqbq-brine-calc__print p,
    .dqbq-brine-calc__print ul,
    .dqbq-brine-calc__print li {
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 11pt;
    }
    
    .dqbq-brine-calc__print p {
        font-size: 9pt;
        color: #555;
        margin-bottom: 2px;
    }
    
    .dqbq-brine-calc__print ul {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .dqbq-print__volume {
        font-size: 9pt;
        color: #555;
        padding-left: 24px;
    }
    
    .dqbq-print__weights-list li::before,
    .dqbq-print__ingredients-list li::before {
        content: '\2610  ';
        margin-right: 6px;
    }
    
    .dqbq-print__safety-list li::before {
        content: '\2022  ';
        margin-right: 6px;
    }
    
    .dqbq-print__brand-footer {
        text-align: center;
        margin-top: 16px;
        padding-top: 8px;
        border-top: 1px solid #ddd;
        font-size: 9pt;
        color: #666;
    }
    
    .dqbq-brine-calc__print [hidden] {
        display: none !important;
    }
}
