/* WC Quote Generator – Cart button styles */
.wcqg-quote-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 16px;
    padding: 14px 18px;
    background: #f8f9fa;
    border: 1px solid #e0e4ea;
    border-radius: 6px;
    clear: both;
    width: 100%;
}

.wcqg-label {
    font-size: 0.9em;
    font-weight: 600;
    color: #444;
    margin-right: 4px;
}

.wcqg-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    padding: 9px 16px !important;
    border-radius: 5px !important;
    text-decoration: none !important;
    transition: all 0.18s ease !important;
    border: 2px solid transparent !important;
    cursor: pointer;
    line-height: 1 !important;
}

.wcqg-btn svg {
    flex-shrink: 0;
}

.wcqg-btn-pdf {
    background: #1a1a2e !important;
    color: #ffffff !important;
    border-color: #1a1a2e !important;
}

.wcqg-btn-pdf:hover {
    background: #16213e !important;
    border-color: #16213e !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,26,46,0.3) !important;
}

.wcqg-btn-excel {
    background: #ffffff !important;
    color: #217346 !important;
    border-color: #217346 !important;
}

.wcqg-btn-excel:hover {
    background: #217346 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33,115,70,0.3) !important;
}

@media (max-width: 600px) {
    .wcqg-quote-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    .wcqg-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── Quantity toggle (admin only) ── */
.wcqg-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-left: 8px;
    user-select: none;
}

.wcqg-toggle input[type="checkbox"] {
    display: none;
}

.wcqg-toggle-slider {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 22px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.wcqg-toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.wcqg-toggle input:checked + .wcqg-toggle-slider {
    background: #1a1a2e;
}

.wcqg-toggle input:checked + .wcqg-toggle-slider::after {
    left: 21px;
}

.wcqg-toggle-label {
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Price Editor Panel (admin only) ── */
.wcqg-price-editor {
    background: #fff;
    border: 2px solid #1a1a2e;
    border-radius: 8px;
    margin: 20px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26,26,46,0.10);
}

.wcqg-pe-header {
    background: #1a1a2e;
    padding: 10px 18px;
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
}

.wcqg-pe-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.wcqg-pe-hint {
    color: rgba(255,255,255,0.65);
    font-size: 0.78rem;
}

.wcqg-pe-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.wcqg-pe-table thead tr {
    background: #f0f4fa;
}

.wcqg-pe-table th {
    padding: 8px 14px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    border-bottom: 1px solid #e0e4ea;
}

.wcqg-price-row {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.wcqg-price-row:last-child { border-bottom: none; }
.wcqg-price-row:hover { background: #fafbff; }

.wcqg-pe-name {
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wcqg-pe-name td { display: flex; align-items: center; gap: 10px; }

.wcqg-pe-table td.wcqg-pe-name {
    display: table-cell;
    vertical-align: middle;
}

.wcqg-pe-thumb {
    display: inline-block;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.wcqg-pe-thumb img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #eee;
}

.wcqg-pe-table td {
    padding: 8px 14px;
    vertical-align: middle;
}

.wcqg-pe-orig {
    color: #888;
    white-space: nowrap;
    text-decoration: line-through;
    font-size: 0.83rem;
}

.wcqg-pe-input { width: 160px; }

.wcqg-input-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.wcqg-price-input {
    width: 120px !important;
    padding: 6px 28px 6px 8px !important;
    border: 2px solid #d0d8e4 !important;
    border-radius: 5px !important;
    font-size: 0.9rem !important;
    transition: border-color 0.15s !important;
    -moz-appearance: textfield !important;
    text-align: right !important;
}

.wcqg-price-input:focus {
    border-color: #1a1a2e !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(26,26,46,0.12) !important;
}

.wcqg-price-input.wcqg-modified {
    border-color: #e67e22 !important;
    background: #fffbf5 !important;
    font-weight: 700 !important;
    color: #c0392b !important;
}

.wcqg-currency {
    position: absolute;
    right: 8px;
    color: #888;
    font-size: 0.82rem;
    pointer-events: none;
}

.wcqg-reset-price {
    background: none !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    width: 26px !important;
    height: 26px !important;
    cursor: pointer !important;
    color: #888 !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s !important;
}

.wcqg-reset-price:hover {
    background: #f0f4fa !important;
    border-color: #1a1a2e !important;
    color: #1a1a2e !important;
    transform: rotate(-30deg) !important;
}

@media (max-width: 600px) {
    .wcqg-pe-table th:nth-child(2),
    .wcqg-pe-table td.wcqg-pe-orig { display: none; }
    .wcqg-pe-input { width: auto; }
}

/* ── Price editor panel (admin only) ── */
.wcqg-price-editor {
    background: #fff;
    border: 2px solid #1a1a2e;
    border-radius: 8px;
    margin: 20px 0 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(26,26,46,0.12);
}

.wcqg-pe-header {
    background: #1a1a2e;
    color: #fff;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.wcqg-pe-title {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.wcqg-pe-hint {
    font-size: 0.8rem;
    opacity: 0.75;
}

.wcqg-pe-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.wcqg-pe-table thead tr {
    background: #f0f4fa;
}

.wcqg-pe-table thead th {
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid #e0e4ea;
    text-align: left;
}

.wcqg-price-row {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.wcqg-price-row:last-child {
    border-bottom: none;
}

.wcqg-price-row:hover {
    background: #fafbff;
}

.wcqg-pe-name {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a2e;
    min-width: 200px;
}

.wcqg-pe-name td {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wcqg-pe-thumb img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.wcqg-pe-orig {
    padding: 10px 14px;
    color: #888;
    font-size: 0.9rem;
    white-space: nowrap;
    text-decoration: line-through;
}

.wcqg-pe-input {
    padding: 8px 14px;
}

.wcqg-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    border: 2px solid #e0e4ea;
    border-radius: 6px;
    padding: 4px 10px;
    width: fit-content;
    transition: border-color 0.15s;
}

.wcqg-input-wrap:focus-within {
    border-color: #1a1a2e;
    background: #fff;
}

.wcqg-price-input {
    border: none !important;
    background: transparent !important;
    width: 90px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    padding: 2px 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.wcqg-price-input.wcqg-modified {
    color: #c0392b !important;
}

.wcqg-input-wrap:focus-within .wcqg-price-input.wcqg-modified {
    color: #c0392b !important;
}

.wcqg-currency {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
}

.wcqg-pe-reset {
    padding: 8px 14px;
    text-align: center;
}

.wcqg-reset-price {
    background: none !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    color: #888 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.wcqg-reset-price:hover {
    background: #1a1a2e !important;
    border-color: #1a1a2e !important;
    color: #fff !important;
    transform: rotate(-30deg);
}

/* Responsive */
@media (max-width: 600px) {
    .wcqg-pe-table thead { display: none; }
    .wcqg-price-row { display: flex; flex-wrap: wrap; padding: 10px 0; }
    .wcqg-pe-name, .wcqg-pe-orig, .wcqg-pe-input, .wcqg-pe-reset {
        padding: 4px 14px;
    }
}

/* ── Admin price editor ── */
.wcqg-quote-actions {
    flex-direction: column;
    align-items: stretch;
}

.wcqg-buttons-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
}

.wcqg-price-editor {
    border: 2px solid #1a1a2e;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 4px;
}

.wcqg-pe-header {
    background: #1a1a2e;
    color: #fff;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.wcqg-pe-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.wcqg-pe-table thead tr {
    background: #f0f4fa;
}

.wcqg-pe-table thead th {
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #444;
    text-align: left;
    border-bottom: 1px solid #d0d8e4;
}

.wcqg-pe-table tbody tr {
    border-bottom: 1px solid #eee;
}

.wcqg-pe-table tbody tr:last-child {
    border-bottom: none;
}

.wcqg-pe-table td {
    padding: 7px 10px;
    vertical-align: middle;
}

.wcqg-pe-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a2e;
    width: 45%;
}

.wcqg-pe-name small {
    font-weight: 400;
    color: #888;
    font-size: 0.75rem;
}

.wcqg-pe-orig {
    font-size: 0.85rem;
    color: #888;
    text-decoration: line-through;
    width: 18%;
}

.wcqg-pe-input {
    width: 28%;
}

.wcqg-pe-input input[type="number"] {
    width: 100%;
    padding: 5px 8px;
    border: 1.5px solid #d0d8e4;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    background: #fff;
    transition: border-color 0.15s;
    -moz-appearance: textfield;
}

.wcqg-pe-input input[type="number"]:focus {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 2px rgba(26,26,46,0.1);
}

.wcqg-pe-input input.wcqg-price-changed {
    border-color: #e67e00;
    background: #fff8f0;
    color: #e67e00;
}

.wcqg-pe-reset {
    width: 9%;
    text-align: center;
}

.wcqg-reset-price {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    color: #888;
    padding: 3px 7px;
    transition: all 0.15s;
}

.wcqg-reset-price:hover {
    border-color: #1a1a2e;
    color: #1a1a2e;
    background: #f0f4fa;
}

@media (max-width: 700px) {
    .wcqg-pe-orig { display: none; }
    .wcqg-pe-name { width: 55%; }
    .wcqg-pe-input { width: 35%; }
}

/* ── Column selector ── */
.wcqg-col-selector {
    border: 2px solid #e0e4ea;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

.wcqg-cs-header {
    background: #f0f4fa;
    color: #1a1a2e;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid #e0e4ea;
}

.wcqg-cs-body {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
}

.wcqg-col-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1.5px solid #1a1a2e;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a1a2e;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.wcqg-col-check input[type="checkbox"] {
    display: none;
}

.wcqg-col-check:hover {
    background: #f0f4fa;
}

.wcqg-col-check:has(input:checked) {
    background: #1a1a2e;
    color: #fff;
}

.wcqg-col-off {
    background: #fff !important;
    color: #aaa !important;
    border-color: #ddd !important;
    text-decoration: line-through;
}
