/**
 * DTF Quote Builder - Excel-Style Layout
 * Blue header (#003f7f) to match other quote builders
 * Green accent (#4cb354) for DTF transfers buttons (standardized to match DTG)
 * Two-column layout with sidebar
 */

/* Reset, Loading, Header, Main Layout — moved to quote-builder-common.css (2026-03-23) */

/* =============================================
   DTF-SPECIFIC CSS VARIABLES
   ============================================= */
:root {
    /* DTF-specific aliases pointing to standardized variables */
    --dtf-primary: var(--builder-primary, #4cb354);
    --dtf-primary-dark: var(--builder-primary-dark, #3d9244);
    --dtf-primary-light: var(--builder-primary-light, #6fcf7b);
    --dtf-primary-50: #e8f5e9;
    --dtf-primary-100: #c8e6c9;
    --dtf-header-bg: var(--builder-header-bg, #003f7f);

    /* Semantic colors (from quote-builder-common.css) */
    --dtf-error: var(--builder-error, #dc2626);
    --dtf-success: var(--builder-success, #059669);
    --dtf-warning: var(--builder-warning, #d97706);
    --dtf-info: var(--builder-info, #2563eb);

    /* DTF text colors */
    --text-dark: var(--builder-text-dark, #1f2937);
    --text-muted: var(--builder-text-muted, #6b7280);
}

/* =============================================
   DTF-SPECIFIC: Error Banner
   ============================================= */
.error-banner {
    background: var(--dtf-error);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-banner:empty {
    display: none;
}

/* DTF-SPECIFIC: Sidebar overrides (wider, auto-scroll) */
.power-sidebar {
    width: 320px;
    overflow-y: auto;
}

/* =============================================
   LOCATION SELECTION SECTION
   ============================================= */
.location-config-section {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.location-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.location-label i {
    margin-right: 6px;
    color: var(--dtf-primary);
}

.location-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* Radio/Checkbox Column Layout (DTG-style) */
.location-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin: 12px 0;
}

.location-column {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
}

.column-header {
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.location-radio,
.location-checkbox {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s;
}

.location-radio:hover,
.location-checkbox:hover {
    color: var(--dtf-primary-dark);
}

.location-radio input,
.location-checkbox input {
    margin-right: 10px;
    accent-color: var(--dtf-primary);
    width: 16px;
    height: 16px;
}

.location-radio small,
.location-checkbox small {
    color: #6c757d;
    margin-left: 4px;
    font-size: 12px;
}

.location-radio input:checked + span,
.location-checkbox input:checked + span {
    color: var(--dtf-primary-dark);
    font-weight: 600;
}

.location-summary {
    background: #e7f3ff;
    border-radius: 6px;
    padding: 10px 16px;
    margin-top: 12px;
    font-size: 14px;
}

.location-summary strong {
    color: #1e40af;
}

#location-display {
    color: #1e3a5f;
}

/* Legacy styles kept for backwards compatibility */
.location-groups {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.location-group {
    flex: 1;
    min-width: 200px;
}

.size-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.size-badge.size-small {
    background: #dbeafe;
    color: #1e40af;
}

.size-badge.size-medium {
    background: #fef3c7;
    color: #92400e;
}

.size-badge.size-large {
    background: #fce7f3;
    color: #9d174d;
}

.location-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Responsive: Stack columns on smaller screens */
@media (max-width: 900px) {
    .location-columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .location-columns {
        grid-template-columns: 1fr;
    }
}

.location-checkbox.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f3f4f6;
}

.location-checkbox.disabled:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

/* Focus indicator for accessibility (WCAG 2.4.7) */
.location-checkbox input:focus-visible + .checkbox-label {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Selected Locations Summary */
.selected-locations-summary {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-label {
    font-size: 12px;
    color: var(--text-muted);
}

.selected-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.selected-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--dtf-primary);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.selected-badge .badge-size {
    background: rgba(255,255,255,0.3);
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 10px;
}

/* Product Grid & Search — now in quote-builder-common.css (2026-03-23) */

/* Product Table Base (wrapper, table, thead, td) — now in quote-builder-common.css (2026-03-23) */

/* Style and Description column padding */
.product-table td.style-col {
    padding: 6px 10px;
}

.product-table td.desc-col {
    padding: 6px 10px;
    min-width: 180px;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Description cell with input - matches Embroidery/Screen Print pattern */
.product-table td.desc-cell {
    padding: 0;
    min-width: 180px;
    max-width: 280px;
}

.desc-input {
    width: 100%;
    height: 40px;
    border: none;
    padding: 8px 10px;
    font-size: 13px;
    background: transparent;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desc-input:focus {
    outline: none;
    background: #f8f9fa;
}

/* Description row wrapper - matches other quote builders */
.desc-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Pricing breakdown below description */
.pricing-breakdown {
    font-size: 11px;
    color: #666;
    padding: 2px 10px 4px;
    display: none; /* Hidden by default */
}

.pricing-breakdown.show {
    display: block;
}

.pricing-breakdown .breakdown-base {
    color: #2563eb;
}

.pricing-breakdown .breakdown-extra {
    color: #059669;
}

.pricing-breakdown .breakdown-total {
    color: #111;
    font-weight: 600;
}

/* Full description tooltip on hover */
.product-table td.desc-col[title] {
    cursor: help;
}

/* Product table row stripes, hover, new-row — now in quote-builder-common.css (2026-03-23) */

/* Cell displays */
.cell-display {
    padding: 8px 10px;
    font-size: 13px;
}

.style-display {
    font-weight: 600;
    color: var(--text-dark);
}

.desc-display {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Color Picker Cell - uses shared color-picker-shared.css */
.color-picker-cell {
    padding: 4px;
}

/* Size Input Cells */
.size-input {
    width: 100%;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 13px;
    background: transparent;
    padding: 4px;
    -moz-appearance: textfield; /* Firefox: hide spinners */
}

/* Hide number input spinners to match other builders */
.size-input::-webkit-inner-spin-button,
.size-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.size-input:focus {
    background: var(--dtf-primary-50);
    outline: 2px solid var(--dtf-primary);
}

.size-input:disabled {
    background: #f3f4f6;
    color: #999;
    cursor: not-allowed;
}

.btn-extended-picker:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Qty and Price Cells */
.qty-cell {
    text-align: center;
    font-weight: 600;
    color: #1e40af;
    background: #eff6ff;
    padding: 8px;
}

.price-cell {
    text-align: center;
    font-weight: 600;
    color: var(--dtf-primary-dark);
    background: var(--dtf-primary-50);
    padding: 8px;
}

/* Delete Button */
.delete-row-btn {
    width: 100%;
    height: 36px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s;
}

.delete-row-btn:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* Empty Table Message */
.empty-table-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.empty-table-message i {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 12px;
}

.empty-table-message p {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 4px 0;
}

.empty-table-message span {
    font-size: 13px;
}

.empty-table-message.hidden {
    display: none;
}

/* Keyboard Hint base — now in quote-builder-common.css (2026-03-23) */

/* =============================================
   SIDEBAR PANELS
   ============================================= */
.sidebar-panel {
    background: white;
    margin: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.panel-title {
    background: #f8f9fa;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.panel-title i {
    margin-right: 8px;
    color: var(--dtf-primary);
}

/* Locations Panel */
.locations-list {
    padding: 12px 14px;
}

.no-locations {
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
}

.sidebar-location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
}

.sidebar-location-item:last-child {
    border-bottom: none;
}

.sidebar-location-name {
    font-size: 13px;
    color: var(--text-dark);
}

.sidebar-location-size {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.sidebar-location-size.small {
    background: #dbeafe;
    color: #1e40af;
}

.sidebar-location-size.medium {
    background: #fef3c7;
    color: #92400e;
}

.sidebar-location-size.large {
    background: #fce7f3;
    color: #9d174d;
}

/* Pricing Panel, Title, Row, Tier Badge — now in quote-builder-common.css (2026-03-23) */

.pricing-panel .panel-title i {
    color: var(--dtf-primary);
}

.pricing-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 14px;
}

.ltm-row {
    background: #fef3c7;
}

.ltm-row .label,
.ltm-row .value {
    color: #92400e;
}

/* Min Order Warning — moved to quote-builder-common.css (2026-03-23) */

/* Total Row (DTG Style) */
.pricing-row.total {
    background: var(--dtf-primary);
    margin-top: 8px;
}

.pricing-row.total .label,
.pricing-row.total .value {
    color: white;
    font-weight: 700;
}

.grand-total {
    background: var(--dtf-primary);
    border-radius: 0 0 7px 7px;
}

.grand-total .label,
.grand-total .value {
    color: white;
    font-weight: 700;
}

/* Sidebar Actions */
.sidebar-actions {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-continue {
    width: 100%;
    padding: 12px 20px;
    background: var(--dtf-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-continue:hover:not(:disabled) {
    background: var(--dtf-primary-dark);
}

.btn-continue:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.btn-save-draft {
    width: 100%;
    padding: 10px 20px;
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save-draft:hover {
    background: #f8f9fa;
}

/* Copy Quote Button */
.btn-copy-quote {
    width: 100%;
    padding: 12px 20px;
    background: #1e40af;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-copy-quote:hover {
    background: #1e3a8a;
}

.btn-copy-quote.success {
    background: var(--dtf-primary);
}

.btn-copy-quote i {
    font-size: 14px;
}

/* NOTE: .btn-clear-all moved to CLEAR ALL PRODUCTS BUTTON section below (line ~1578) */

/* =============================================
   EXTENDED SIZES PICKER (XXXL Other Column)
   ============================================= */
.extended-col {
    background: #374151 !important;
    font-size: 11px;
}

.extended-picker-cell {
    padding: 4px !important;
}

.btn-extended-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 32px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    transition: all 0.2s;
}

.btn-extended-picker:hover {
    background: var(--dtf-primary-50);
    border-color: var(--dtf-primary);
    color: var(--dtf-primary-dark);
}

.ext-qty-badge {
    font-weight: 600;
    font-size: 12px;
}

.ext-qty-badge.has-qty {
    background: var(--dtf-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* =============================================
   EXTENDED SIZE POPUP MODAL
   ============================================= */
.size-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.size-popup-backdrop.hidden {
    display: none;
}

.size-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    width: 400px;
    max-width: 90vw;
    overflow: hidden;
}

.size-popup.hidden {
    display: none;
}

.size-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--dtf-primary), var(--dtf-primary-dark));
    color: white;
}

.size-popup-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.size-popup-header h4 i {
    margin-right: 8px;
}

.size-popup-header .close-popup {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.size-popup-header .close-popup:hover {
    background: rgba(255, 255, 255, 0.3);
}

.size-popup-body {
    padding: 20px;
}

.extended-sizes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.ext-size-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ext-size-input-group label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.ext-size-input {
    width: 60px;
    height: 40px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.ext-size-input:focus {
    outline: none;
    border-color: var(--dtf-primary);
    box-shadow: 0 0 0 3px var(--dtf-primary-50);
}

.ext-popup-note {
    margin-top: 16px;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 8px;
    font-size: 12px;
    color: #166534;
}

.ext-popup-note i {
    margin-right: 6px;
}

.ext-popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 14px;
}

.ext-popup-loading i {
    font-size: 18px;
    color: var(--dtf-primary);
}

.size-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.size-popup-footer .btn-cancel {
    padding: 10px 20px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.size-popup-footer .btn-cancel:hover {
    background: #f3f4f6;
}

.size-popup-footer .btn-apply {
    padding: 10px 24px;
    background: var(--dtf-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.size-popup-footer .btn-apply:hover {
    background: var(--dtf-primary-dark);
}

/* =============================================
   SUMMARY MODAL
   ============================================= */
.summary-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.summary-modal-content {
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--dtf-header-bg);
    color: white;
}

.summary-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
}

.close-modal:hover {
    opacity: 1;
}

.summary-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.quote-id-section {
    text-align: center;
    padding: 12px;
    background: var(--dtf-primary-50);
    border-radius: 8px;
    margin-bottom: 20px;
}

.quote-id-label {
    font-size: 12px;
    color: var(--text-muted);
}

.quote-id-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dtf-primary-dark);
    margin-left: 8px;
}

.summary-section {
    margin-bottom: 20px;
}

.summary-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--dtf-primary);
}

.summary-section h3 i {
    margin-right: 8px;
    color: var(--dtf-primary);
}

/* Customer Form */
.customer-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-row label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-row input,
.form-row textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--dtf-primary);
}

.form-row textarea {
    min-height: 80px;
    resize: vertical;
}

/* Summary Footer */
.summary-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
}

.btn-back {
    padding: 10px 20px;
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-back:hover {
    background: #f3f4f6;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-print,
.btn-email,
.btn-save {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.btn-print {
    background: #6b7280;
    color: white;
}

.btn-print:hover {
    background: #4b5563;
}

.btn-email {
    background: #3b82f6;
    color: white;
}

.btn-email:hover {
    background: #2563eb;
}

.btn-save {
    background: var(--dtf-primary);
    color: white;
}

.btn-save:hover {
    background: var(--dtf-primary-dark);
}

/* Color picker styles now in /shared_components/css/color-picker-shared.css */

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .power-main {
        flex-direction: column;
        height: auto;
    }

    .power-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }

    .location-groups {
        flex-direction: column;
    }

    .location-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .product-table th.desc-col,
    .product-table td:nth-child(2) {
        display: none;
    }

    .summary-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
    .power-header,
    .sidebar-actions,
    .search-row,
    .keyboard-hint {
        display: none !important;
    }

    .power-main {
        height: auto;
        display: block;
    }

    .power-sidebar {
        width: 100%;
        border: none;
    }
}

/* Old DTF color picker styles removed - now uses shared /shared_components/css/color-picker-shared.css */

/* =============================================
   COPY QUOTE ID BUTTON
   ============================================= */
.btn-copy-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: 10px;
    background: white;
    border: 2px solid var(--dtf-primary);
    border-radius: 6px;
    color: var(--dtf-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.btn-copy-id:hover {
    background: var(--dtf-primary);
    color: white;
    transform: scale(1.05);
}

.btn-copy-id:active {
    transform: scale(0.95);
}

.btn-copy-id i {
    font-size: 14px;
}

/* =============================================
   CLEAR ALL PRODUCTS BUTTON
   ============================================= */
.btn-clear-all {
    width: 100%;
    padding: 10px 20px;
    background: white;
    color: #dc2626;
    border: 1px solid #dc2626;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-clear-all:hover {
    background: #fef2f2;
    border-color: #b91c1c;
    color: #b91c1c;
}

.btn-clear-all:active {
    background: #fee2e2;
}

.btn-clear-all i {
    font-size: 13px;
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.dtf-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: #1f2937;
    color: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.dtf-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.dtf-toast i {
    font-size: 18px;
}

.dtf-toast-success {
    background: var(--dtf-success);
}

.dtf-toast-success i {
    color: #a7f3d0;
}

.dtf-toast-error {
    background: var(--dtf-error);
}

.dtf-toast-error i {
    color: #fecaca;
}

.dtf-toast-warning {
    background: var(--dtf-warning);
}

.dtf-toast-warning i {
    color: #fef3c7;
}

.dtf-toast-info {
    background: var(--dtf-info);
}

.dtf-toast-info i {
    color: #bfdbfe;
}

/* =============================================
   ENHANCED STYLE COLUMN (Product Info Display)
   ============================================= */
.style-col .product-name {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.style-col .product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 11px;
}

.style-col .location-codes {
    background: var(--dtf-primary-50);
    color: var(--dtf-primary-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.style-col .unit-preview {
    color: var(--dtf-primary);
    font-weight: 600;
}

/* =============================================
   ADD PRODUCT BUTTON
   ============================================= */
.add-product-row {
    padding: 12px 0;
    border-top: 1px dashed #e5e7eb;
    margin-top: 8px;
}

.btn-add-product {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--dtf-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-add-product:hover {
    background: var(--dtf-primary-50);
}

.btn-add-product i {
    font-size: 12px;
}

.btn-add-product .hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
}

/* LTM Distribution Toggle — now in quote-builder-common.css (2026-03-23) */

/* Child Row Styles — now in quote-builder-common.css (2026-03-23) */

/* =============================================
   SAVE & SHARE SECTION (Sidebar Panel)
   ============================================= */
.save-quote-panel {
    background: white;
    margin: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.save-quote-title {
    background: #f8f9fa;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.save-quote-title i {
    margin-right: 8px;
    color: var(--dtf-primary);
}

.save-quote-form {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.save-quote-form .quote-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.save-quote-form .quote-input:focus {
    outline: none;
    border-color: var(--dtf-primary);
    box-shadow: 0 0 0 3px var(--dtf-primary-50);
}

.save-quote-form .quote-input::placeholder {
    color: #9ca3af;
}

.btn-save-quote {
    width: calc(100% - 28px);
    margin: 0 14px 14px 14px;
    padding: 12px 20px;
    background: var(--dtf-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-save-quote:hover {
    background: var(--dtf-primary-dark);
}

.btn-save-quote:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.btn-save-quote i {
    font-size: 14px;
}

/* =============================================
   SAVE SUCCESS MODAL
   ============================================= */
.save-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.save-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.save-modal-header {
    background: linear-gradient(135deg, var(--dtf-primary), var(--dtf-primary-dark));
    color: white;
    padding: 24px;
    text-align: center;
}

.save-modal-header i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.save-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.save-modal-body {
    padding: 24px;
}

.save-modal-body p {
    margin: 0 0 12px 0;
    color: var(--text-dark);
    font-size: 14px;
}

.save-modal-body p strong {
    color: var(--dtf-primary-dark);
    font-size: 16px;
}

.url-copy-container {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.shareable-url-input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-family: monospace;
    background: #f8f9fa;
    color: var(--text-dark);
}

.shareable-url-input:focus {
    outline: none;
    border-color: var(--dtf-primary);
}

.btn-copy-url {
    padding: 12px 16px;
    background: var(--dtf-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-copy-url:hover {
    background: var(--dtf-primary-dark);
}

.btn-copy-url.copied {
    background: #059669;
}

.save-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--border-color);
    background: #f8f9fa;
}

.btn-view-quote {
    flex: 1;
    padding: 12px 20px;
    background: #1e40af;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-view-quote:hover {
    background: #1e3a8a;
}

.btn-close-modal {
    flex: 1;
    padding: 12px 20px;
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-modal:hover {
    background: #f3f4f6;
}

/* =============================================
   2026.03 VISUAL OVERHAUL
   ============================================= */

/* --- Enhanced Location Cards --- */
.location-column {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.location-column:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Column header accent colors */
.location-column:nth-child(1) .column-header {
    color: #166534;
    border-bottom: 2px solid #4cb354;
    padding-bottom: 8px;
}

.location-column:nth-child(2) .column-header {
    color: #1e40af;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 8px;
}

.location-column:nth-child(3) .column-header {
    color: #9a3412;
    border-bottom: 2px solid #f59e0b;
    padding-bottom: 8px;
}

/* --- Modern Input Focus States --- */
.size-input:focus {
    background: var(--dtf-primary-50);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 179, 84, 0.15);
    border-bottom: 2px solid var(--dtf-primary);
}

.desc-input:focus,
.style-input:focus {
    outline: none;
    background: #f0f9ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.quote-input:focus {
    outline: none;
    border-color: var(--dtf-primary);
    box-shadow: 0 0 0 3px rgba(76, 179, 84, 0.12);
}

.search-input:focus {
    border-color: var(--dtf-primary);
    box-shadow: 0 0 0 3px rgba(76, 179, 84, 0.15);
}

/* --- Sidebar Panel Elevation --- */
.pricing-panel {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s;
}

.additional-charges-panel,
.save-quote-panel-collapsible,
.dtf-order-details-panel {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s;
}

.additional-charges-panel:hover,
.save-quote-panel-collapsible:hover,
.dtf-order-details-panel:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* --- Collapsible Section Animations --- */
.collapsible-chevron {
    transition: transform 0.3s ease;
}

/* --- Product Row Hover Enhancement --- */
.product-table tbody#product-tbody tr:not(.fee-row):not(#empty-state-row):hover {
    background: #fffbeb;
    box-shadow: inset 3px 0 0 var(--dtf-primary);
}

/* New row fade-in animation */
.product-table tbody tr.new-row {
    animation: fadeHighlight 2s ease;
}

@keyframes fadeHighlight {
    0% { background: var(--dtf-primary-50); }
    100% { background: transparent; }
}

/* Unsaved badge — moved to quote-builder-common.css (2026-03-23) */

/* --- Empty State Step Badges --- */
.step-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    margin-right: 4px;
}

.step-badge.step-1 {
    background: #eef2ff;
    color: #4f46e5;
}

.step-badge.step-2 {
    background: #f0fdf4;
    color: #166534;
}

.step-badge.step-3 {
    background: #fef3c7;
    color: #92400e;
}

/* --- Tax Lookup Button --- */
.btn-tax-lookup {
    padding: 6px 10px;
    background: #0284c7;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.btn-tax-lookup:hover {
    background: #0369a1;
}

/* --- Order Details Panel --- */
.dtf-order-details-panel {
    margin: 0 12px 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.dtf-order-details-panel .charges-header {
    padding: 10px 14px;
}

.dtf-order-details-panel .charges-content {
    padding: 4px 14px 12px;
}

/* --- Grand Total Row Enhancement --- */
.grand-total-row {
    border-top: 2px solid var(--dtf-primary);
    padding-top: 8px;
    margin-top: 4px;
}

.grand-total-row .label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.grand-total-row .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--dtf-primary-dark);
}

/* --- Fee Row Styling --- */
.fee-row {
    background: #fafbfc;
    border-top: 1px dashed #e5e7eb;
}

.fee-row .fee-label {
    font-size: 13px;
    color: #475569;
    padding: 8px 12px;
}

.fee-row .fee-label i {
    color: #64748b;
    margin-right: 6px;
    width: 14px;
    text-align: center;
}

/* --- Keyboard Hints Compact --- */
.keyboard-hint {
    opacity: 0.6;
    transition: opacity 0.3s;
}

.keyboard-hint:hover {
    opacity: 1;
}

/* --- Additional Responsive Breakpoints --- */
@media (max-width: 640px) {
    .location-columns {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .power-header .header-actions {
        gap: 4px;
    }

    .btn-header {
        font-size: 11px;
        padding: 6px 10px;
    }

    .pricing-title {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .power-header {
        padding: 8px 12px;
    }

    .power-header .logo {
        height: 28px;
    }

    .product-table th.desc-col,
    .product-table td:nth-child(3) {
        display: none;
    }

    .product-table th.color-col,
    .product-table td:nth-child(4) {
        display: none;
    }

    .location-radio,
    .location-checkbox {
        font-size: 13px;
        padding: 6px 0;
    }
}
