/* Laminate Specific & Room Items */
.room-list { margin-bottom: 1rem; }
.room-item { background: var(--bg-card); border: 1px solid var(--border-primary); border-radius: 10px; padding: 1rem; margin-bottom: 0.75rem; transition: all 0.2s; animation: fadeInUp 0.3s ease-out; }
.room-item:hover { background: var(--bg-card); border-color: var(--border-primary); }
.room-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.room-title { font-size: 15px; font-weight: 600; color: var(--accent-primary); }

/* Editable Room Name Input (SaaS-style) */
.room-name-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    color: var(--accent-primary);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    padding: 4px 8px;
    margin: 0;
    width: 200px;
    max-width: 100%;
    outline: none;
    transition: all 0.2s ease;
}

.room-name-input::placeholder {
    color: rgba(255, 165, 0, 0.4);
    font-weight: 500;
}

.room-name-input:hover {
    border-bottom-color: rgba(255, 165, 0, 0.3);
}

.room-name-input:focus {
    border-bottom-color: var(--accent-primary);
    background: rgba(255, 165, 0, 0.05);
}

.btn-remove { background: transparent; border: 1px solid #ef4444; color: #ef4444; padding: 0.375rem 0.75rem; border-radius: 6px; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.btn-remove:hover { background: rgba(239, 68, 68, 0.1); }
.btn-add { width: 100%; background: transparent; border: 2px dashed rgba(255, 165, 0, 0.3); color: var(--accent-primary); padding: 0.875rem; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-add:hover { border-color: var(--accent-primary); background: rgba(255, 165, 0, 0.08); }
.total-area { background: linear-gradient(135deg, rgba(255, 165, 0, 0.12), rgba(212, 180, 131, 0.06)); border: 1px solid #FFA500; border-radius: 10px; padding: 0.875rem; margin-top: 0.75rem; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.total-area span:last-child { font-size: 18px; color: var(--accent-primary); }

/* Pricing/Unit Toggle */
.pricing-toggle-wrapper { display: flex; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-primary); border-radius: 8px; padding: 4px; position: relative; margin-bottom: 16px; height: 44px; }
.pricing-toggle-btn { flex: 1; background: transparent; border: none; color: var(--text-secondary); font-size: 14px; font-weight: 600; cursor: pointer; z-index: 2; transition: color 0.3s; border-radius: 6px; font-family: inherit; }
.pricing-toggle-btn.active { color: var(--text-primary); }
.pricing-toggle-bg { position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); height: calc(100% - 8px); background: #FFA500; border-radius: 6px; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1; box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3); }
/* Supports both per-sqm price mode and imperial unit mode */
.pricing-toggle-wrapper.mode-sqm .pricing-toggle-bg,
.pricing-toggle-wrapper.mode-imperial .pricing-toggle-bg { transform: translateX(100%); }

.price-input-group { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* Results & Shopping List (Shared) */
#out { display: none; }
.kv { display: flex; justify-content: space-between; align-items: center; padding: 0.65rem 0; }
.kv strong { color: var(--accent-primary); }

/* Room Diagram (Flooring) / Wall Diagram (Paint) */
.room-diagram, .wall-diagram { background: var(--bg-card); border: 1px solid var(--border-primary); border-radius: 10px; padding: 1.25rem; margin: 1rem 0; text-align: center; }
.room-diagram h5, .wall-diagram h5 { margin: 0 0 1rem; font-size: 15px; color: var(--accent-primary); font-weight: 600; }
.room-boxes, .wall-boxes { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 1rem; }
.room-box, .wall-box { background: linear-gradient(135deg, rgba(255, 165, 0, 0.12), rgba(212, 180, 131, 0.06)); border: 2px solid #FFA500; border-radius: 8px; padding: 0.75rem 1rem; min-width: 120px; text-align: center; transition: all 0.2s; }
.room-box-title, .wall-box-title { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.room-box-dims, .wall-box-dims { font-size: 14px; color: var(--text-primary); margin-bottom: 4px; font-weight: 600; }
.room-box-area, .wall-box-area { font-size: 16px; color: var(--accent-primary); font-weight: 700; }
.openings-summary { display: flex; gap: 1rem; justify-content: center; font-size: 14px; color: var(--text-secondary); margin-top: 10px; }

/* Shopping List */
.shopping-list { background: var(--bg-card); border: 1px solid var(--border-primary); border-radius: 10px; padding: 1rem; margin-top: 1rem; }
[data-theme="light"] .shopping-list { background: #FFEDD5; border-color: #FCD9AC; }
.shopping-list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
/* Shopping List */
.sl-top-bar { display: flex; align-items: flex-start; justify-content: flex-end; gap: 1rem; margin-bottom: 0.75rem; }
.sl-total-block { text-align: right; }
.sl-total-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.sl-total-value { font-size: 2rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.sl-panel { background: rgba(255,165,0,0.06); border: 1px solid var(--border-primary); border-radius: 12px; padding: 1.25rem; }
[data-theme="light"] .sl-panel { background: var(--bg-shopping-list); border-color: #FCD9AC; }
.sl-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 16px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-primary); margin-bottom: 1rem; text-transform: uppercase; }
[data-theme="light"] .sl-panel-header { color: var(--text-primary); }
.sl-items { display: flex; flex-direction: column; }
.sl-row { padding: 10px 0; border-bottom: 1px solid var(--border-secondary); }
.sl-row:last-child { border-bottom: none; }
.sl-row-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sl-label-input { flex: 1; min-width: 0; background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 2px 4px; color: var(--text-primary); font-size: 14px; font-weight: 600; font-family: inherit; outline: none; transition: border-color 0.15s, background 0.15s; }
.sl-label-input:hover, .sl-label-input:focus { border-color: var(--border-muted); background: var(--bg-input); }
.sl-qty { font-size: 12px; color: var(--accent-primary); margin-top: 3px; padding-left: 4px; }
[data-theme="light"] .sl-qty { color: var(--accent-secondary); }
.sl-remove-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; opacity: 0.4; flex-shrink: 0; }
.sl-remove-btn:hover { opacity: 1; color: #ef4444; }
/* Price row */
.sl-price-row { display: flex; align-items: center; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.sl-qty-display { font-size: 13px; font-weight: 600; color: var(--text-secondary); min-width: 28px; }
.sl-unit-tag { font-size: 12px; color: var(--text-muted); }
.sl-times, .sl-equals { font-size: 12px; color: var(--text-muted); padding: 0 1px; }
.sl-qty-input { width: 50px; padding: 3px 5px; font-size: 13px; text-align: center; background: var(--bg-input); border: 1px solid var(--border-muted); border-radius: 4px; color: var(--text-primary); font-family: inherit; }
.sl-price-input { width: 72px; padding: 3px 5px; font-size: 13px; background: var(--bg-input); border: 1px solid var(--border-muted); border-radius: 4px; color: var(--text-primary); font-family: inherit; }
.sl-price-input:focus, .sl-qty-input:focus { outline: none; border-color: var(--accent-primary); }
.sl-unit-select { font-size: 12px; padding: 3px 4px; background: var(--bg-input); border: 1px solid var(--border-muted); border-radius: 4px; color: var(--text-primary); font-family: inherit; max-width: 58px; }
.sl-item-total { font-size: 13px; font-weight: 700; color: var(--accent-primary); white-space: nowrap; margin-left: auto; }
.sl-qty-input::-webkit-inner-spin-button, .sl-qty-input::-webkit-outer-spin-button,
.sl-price-input::-webkit-inner-spin-button, .sl-price-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sl-add-btn { margin-top: 10px; width: 100%; padding: 7px; font-size: 13px; color: var(--accent-primary); background: none; border: 1px dashed var(--border-primary); border-radius: 8px; cursor: pointer; font-family: inherit; transition: background 0.15s; }
.sl-add-btn:hover { background: rgba(255,165,0,0.05); }
.sl-print-cta { margin-top: 14px; width: 100%; padding: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bg-card); background: var(--accent-primary); border: none; border-radius: 8px; cursor: pointer; font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 7px; transition: opacity 0.15s; }
.sl-print-cta:hover { opacity: 0.88; }
/* Price toggle switch */
.sl-price-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.sl-price-toggle input { display: none; }
.sl-price-toggle-track { width: 32px; height: 18px; background: var(--border-muted, rgba(255,255,255,0.15)); border-radius: 9px; position: relative; transition: background 0.2s; flex-shrink: 0; }
.sl-price-toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.sl-price-toggle input:checked ~ .sl-price-toggle-track { background: var(--accent-primary); }
.sl-price-toggle input:checked ~ .sl-price-toggle-track::after { transform: translateX(14px); }
.sl-price-toggle-label { white-space: nowrap; }
.shopping-item-compact { padding: 0.4rem 0; font-size: 14px; color: var(--text-secondary); line-height: 1.5; border-bottom: 1px solid rgba(255, 165, 0, 0.08); }
.shopping-item-compact:last-of-type { border-bottom: none; }
.shopping-item-compact strong { color: var(--text-primary); }
.shopping-item-compact.price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shopping-item-main { flex: 1; }
.shopping-item-main { flex: 1; min-width: 0; color: var(--text-secondary); font-size: 14px; }
.shopping-item-main strong { color: var(--text-primary); }
.shopping-price-input { width: 90px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border-primary); background: var(--bg-input); color: var(--text-primary); font-size: 12px; text-align: right; outline: none; -moz-appearance: textfield; appearance: textfield; }
.shopping-price-input:focus { border-color: var(--accent-primary); }
.shopping-price-input::-webkit-outer-spin-button,
.shopping-price-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.shopping-subtotal-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 0; margin-top: 8px; border-top: 1px solid var(--border-primary); font-weight: 600; color: var(--text-primary); font-size: 14px; }

/* Paint Specific Bucket Recommendations */
.bucket-rec { background: linear-gradient(135deg, rgba(255, 165, 0, 0.08), rgba(255, 165, 0, 0.03)); border: 2px solid var(--accent-primary); border-radius: 12px; padding: 1.25rem; margin: 1.5rem 0; }
.bucket-rec h4 { margin: 0 0 1rem; font-size: 18px; color: var(--accent-primary); display: flex; align-items: center; gap: 0.5rem; }
.bucket-option { background: var(--bg-body); border: 1px solid var(--border-primary); border-radius: 10px; padding: 1rem; margin-bottom: 0.75rem; }
.bucket-totals { border-top: 1px solid var(--border-primary); padding-top: 0.75rem; margin-top: 0.75rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; font-size: 14px; color: var(--text-secondary); }
.price-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; margin: 0.75rem 0; }
.price-table th { text-align: left; padding: 8px 12px; font-size: 14px; color: var(--accent-primary); font-weight: 600; }
.price-table td { padding: 10px 12px; background: var(--bg-card); border-top: 1px solid var(--border-primary); border-bottom: 1px solid var(--border-primary); color: var(--text-primary); }
.price-table td:first-child { border-left: 1px solid var(--border-primary); border-radius: 8px 0 0 8px; }
.price-table td:last-child { border-right: 1px solid var(--border-primary); border-radius: 0 8px 8px 0; }

/* 2-Column Layouts */
.two-column-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: stretch; position: relative; }
.two-column-wrapper::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom, transparent, rgba(255, 165, 0, 0.3) 10%, rgba(255, 165, 0, 0.3) 90%, transparent); transform: translateX(-50%); }
.two-column-wrapper > .card { min-width: 0; height: 100%; display: flex; flex-direction: column; }
.two-column-wrapper .card-content { flex: 1; }
.two-column-wrapper .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: end; }
.two-column-wrapper .input-group { display: flex; flex-direction: column; }
.two-column-wrapper .input-group label { min-height: 40px; display: flex; align-items: flex-end; margin-bottom: 0.5rem; }
.results-two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; margin-bottom: 1.5rem; }
@media (max-width: 768px) {
    .two-column-wrapper, .results-two-column { grid-template-columns: 1fr; gap: 1.5rem; }
    .two-column-wrapper::before { display: none; }
}

/* result-accent — brukes i JS-generert HTML, erstatter hardkodet #FFA500 */
.result-accent { color: var(--accent-primary); }

/* Light mode overrides */
[data-theme="light"] .result-accent { color: #111827 !important; }
[data-theme="light"] .kv strong { color: #111827; }
[data-theme="light"] .room-title { color: #111827; }
[data-theme="light"] .room-name-input { color: #111827; }
[data-theme="light"] .room-diagram h5,
[data-theme="light"] .wall-diagram h5 { color: #111827; }
[data-theme="light"] .room-box-area,
[data-theme="light"] .wall-box-area { color: #111827; }
[data-theme="light"] .price-table th { color: #485563; }
[data-theme="light"] .bucket-rec h4 { color: #111827; }
[data-theme="light"] .total-area span:last-child { color: #111827; }

/* Print specific */
@media print {
    .bg-layers, .circles-container, .header, .mobile-menu, .btns, .footer, 
    #toastContainer, .no-print, .ai-trigger, .ai-panel, .sticky-hub-btn,
    .btn-remove, button, .breadcrumbs, .quick-start { display: none !important; }
    
    .card { border: 1px solid #ddd !important; background: #fff !important; page-break-inside: avoid; margin-bottom: 8px !important; padding: 12px !important; }
    .card h3 { color: #000 !important; border-bottom: 2px solid #333 !important; padding-bottom: 4px; }
    .kv, .shopping-item-compact, strong, .room-box-title, .room-box-dims, .room-box-area, .wall-box-title, .wall-box-dims, .wall-box-area { color: #000 !important; }
    .room-box, .wall-box, .total-area { border-color: #333 !important; }
    .shopping-item-compact:nth-child(even) { background: #f9f9f9 !important; }
    input, select, textarea { border: none !important; background: transparent !important; padding: 0 !important; font-weight: 600 !important; color: #000 !important; appearance: none; }
    input[type="text"]::after, input[type="number"]::after { content: ""; }
    .input-group label { font-size: 11px !important; font-weight: normal !important; margin-bottom: 2px !important; color: #000 !important; }
    .print-footer { display: block !important; margin-top: 20px; border-top: 1px solid #ccc; padding-top: 10px; }
    
    /* Print editable room name */
    .room-name-input { border: none !important; padding: 0 !important; background: transparent !important; color: #000 !important; font-weight: 600 !important; }
}
