.customer-mode-panel[hidden] {
    display: none;
}

.manual-customer-box,
.duplicate-warning {
    border-radius: 14px;
    padding: 16px;
}

.manual-customer-box {
    margin-top: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.manual-customer-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.manual-customer-heading strong,
.manual-customer-heading span {
    display: block;
}

.manual-customer-heading strong {
    color: #172033;
}

.manual-customer-heading span {
    color: #64748b;
    font-size: .85rem;
    margin-top: 2px;
}

.duplicate-warning {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 16px;
    background: #fffaf0;
    border: 1px solid #f5d58a;
}

.duplicate-warning p,
.duplicate-warning small {
    margin: 5px 0 0;
    color: #7c5a12;
}

.duplicate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.quote-customer-footer {
    display: flex;
    align-items: center;
    gap: 0;
    border-top: 1px solid #e2e8f0;
    padding: 8px 12px;
    background: #fff;
}

.quote-footer-action {
    border: 0;
    background: transparent;
    color: #4f46e5;
    padding: 5px 10px;
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    white-space: nowrap;
}

.quote-footer-action:hover,
.quote-footer-action:focus-visible {
    background: #eef2ff;
    outline: none;
}

.quote-footer-action + .quote-footer-action {
    border-left: 1px solid #e2e8f0;
    margin-left: 2px;
}

/* Syncfusion creates dropdown popups under body. Keep searchable menus compact. */
#CustomerId_popup,
#productPicker_popup {
    width: min(360px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box !important;
}

#CustomerId_popup .e-content,
#productPicker_popup .e-content {
    max-width: 100%;
    overflow-x: hidden;
}

#CustomerId_popup .e-list-item,
#productPicker_popup .e-list-item {
    white-space: normal;
    min-height: 42px;
    padding-block: 10px;
}

@media (max-width: 760px) {
    .duplicate-warning {
        align-items: stretch;
        flex-direction: column;
    }

    .duplicate-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .duplicate-actions .btn {
        width: 100%;
    }

    .quote-customer-footer {
        overflow-x: auto;
    }
}

@media (max-width: 520px) {
    .manual-customer-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .duplicate-actions {
        grid-template-columns: 1fr;
    }

    .quote-customer-footer {
        display: flex;
        width: 100%;
    }

    .quote-footer-action {
        flex: 1 0 auto;
        text-align: center;
    }
}
