/* SelectCustomer Component CSS Variables */
:root {
    /* Primary Brand Colors */
    --select-customer-primary-color: var(--ct-select-customer-primary-color);
    --select-customer-primary-hover: var(--ct-select-customer-primary-hover);
    --select-customer-primary-light: var(--ct-select-customer-primary-light);
    --select-customer-primary-lighter: var(--ct-select-customer-primary-lighter);
    
    /* Text Colors */
    --select-customer-text-primary: var(--ct-select-customer-text-primary);
    --select-customer-text-secondary: var(--ct-select-customer-text-secondary);
    --select-customer-text-muted: var(--ct-select-customer-text-muted);
    
    /* Border Colors */
    --select-customer-border-light: var(--ct-select-customer-border-light);
    --select-customer-border-primary: var(--ct-select-customer-border-primary);
    
    /* Background Colors */
    --select-customer-bg-white: var(--ct-select-customer-bg-white);
    --select-customer-bg-light: var(--ct-select-customer-bg-light);
    
    /* Error Colors */
    --select-customer-error-color: var(--ct-select-customer-error-color);
    --select-customer-error-hover: var(--ct-select-customer-error-hover);
    --select-customer-error-bg: var(--ct-select-customer-error-bg);
    --select-customer-error-text: var(--ct-select-customer-error-text);
    
    /* Button Colors */
    --select-customer-btn-secondary: var(--ct-select-customer-btn-secondary);
    --select-customer-btn-secondary-hover: var(--ct-select-customer-btn-secondary-hover);
    
    /* Shadow Colors */
    --select-customer-shadow-light: var(--ct-select-customer-shadow-light);
    --select-customer-shadow-primary: var(--ct-select-customer-shadow-primary);
    --select-customer-shadow-primary-strong: var(--ct-select-customer-shadow-primary-strong);
    --select-customer-shadow-primary-stronger: var(--ct-select-customer-shadow-primary-stronger);
}

/* SelectCustomer Component Styles */
.select-customer-container {
    padding: 1.5rem;
    max-height: 80vh;
    height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Current Customer Section */
.current-customer-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--select-customer-border-primary);
    flex-shrink: 0;
}

.current-customer-card {
    border: 2px solid var(--select-customer-border-primary);
    border-radius: 8px;
    padding: 1rem;
    background: var(--select-customer-primary-light);
    box-shadow: 0 4px 12px var(--select-customer-shadow-primary-strong);
}

.current-customer-card .customer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.current-customer-card .customer-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--select-customer-primary-color);
    border: 2px solid var(--select-customer-primary-hover);
}

.current-customer-card .user-icon {
    font-size: 24px;
    color: var(--select-customer-bg-white);
}

.customer-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.reset-customer-button {
    padding: 0.5rem 1rem;
    background: var(--select-customer-error-color);
    color: var(--select-customer-bg-white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.reset-customer-button:hover {
    background: var(--select-customer-error-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px var(--select-customer-shadow-light);
}

.reset-customer-button i {
    font-size: 14px;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
    flex-shrink: 0;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--select-customer-text-primary);
    border-bottom: 2px solid var(--select-customer-border-light);
    padding-bottom: 0.5rem;
}

.search-bar {
    margin-bottom: 1rem;
}

.input-search-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--select-customer-border-primary);
    border-radius: 8px;
    overflow: hidden;
    background: var(--select-customer-bg-white);
}

.input-search {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
}

.input-search::placeholder {
    color: var(--select-customer-text-muted);
}

.customer-search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.customer-search-btn:hover:not(:disabled) {
}

.customer-search-btn:disabled {
    cursor: not-allowed;
}

.customer-search-icon {
    height: 30px;
    width: 30px;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--select-customer-primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Results Section */
.results-section {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    min-height: 300px;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    color: var(--select-customer-text-secondary);
}

.loading-container p {
    margin-top: 1rem;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Error Container */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--select-customer-error-color);
    border-radius: 8px;
    background: var(--select-customer-error-bg);
    color: var(--select-customer-error-text);
}

.error-icon {
    font-size: 3rem;
    color: var(--select-customer-error-color);
    margin-bottom: 1rem;
}

.error-content h4 {
    color: var(--select-customer-error-text);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.error-content p {
    margin-bottom: 1rem;
    color: var(--select-customer-error-text);
}

.retry-button {
    padding: 0.5rem 1rem;
    background: var(--select-customer-error-color);
    color: var(--select-customer-bg-white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.retry-button:hover {
    background: var(--select-customer-error-hover);
}

.retry-button i {
    font-size: 14px;
}

.customers-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    padding-top: 4px;
    flex: 1;
}

.customer-card {
    border: 1px solid var(--select-customer-border-light);
    border-radius: 8px;
    padding: 1rem;
    background: var(--select-customer-bg-white);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px var(--select-customer-shadow-light);
    cursor: pointer;
    user-select: none;
}

.customer-card:hover {
    border-color: var(--select-customer-border-primary);
    box-shadow: 0 4px 8px var(--select-customer-shadow-primary);
    transform: translateY(-1px);
}

.customer-card.selected {
    border-color: var(--select-customer-border-primary);
    background: var(--select-customer-primary-light);
    box-shadow: 0 4px 12px var(--select-customer-shadow-primary-strong);
}

.customer-card.selected:hover {
    background: var(--select-customer-primary-lighter);
    box-shadow: 0 6px 16px var(--select-customer-shadow-primary-stronger);
}

.customer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.customer-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--select-customer-primary-light);
    border: 2px solid var(--select-customer-border-primary);
}

.customer-card.selected .customer-icon {
    background: var(--select-customer-primary-color);
    border-color: var(--select-customer-primary-hover);
}

.user-icon {
    font-size: 24px;
    color: var(--select-customer-primary-color);
}

.customer-card.selected .user-icon {
    color: var(--select-customer-bg-white);
}

.customer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.customer-field {
    font-size: 0.9rem;
    line-height: 1.4;
}

.customer-field:first-child {
    font-size: 1rem;
    color: var(--select-customer-text-primary);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.field-label {
    font-weight: 600;
    color: var(--select-customer-text-primary);
}

.customer-selection {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    pointer-events: auto;
}

.customer-radio {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--select-customer-primary-color);
}

.radio-label {
    cursor: pointer;
    margin-left: 0.25rem;
}

/* Support for legacy checkbox class name for backwards compatibility */
.customer-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--select-customer-primary-color);
}

.checkbox-label {
    cursor: pointer;
    margin-left: 0.25rem;
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.load-more-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--select-customer-bg-white);
    border: 2px solid var(--select-customer-primary-color);
    border-radius: 30px;
    color: var(--select-customer-primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
}

.load-more-button:hover:not(:disabled) {
    background: var(--select-customer-primary-color);
    color: var(--select-customer-bg-white);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--select-customer-shadow-primary);
}

.load-more-button:disabled {
    background: var(--select-customer-bg-light);
    border-color: var(--select-customer-btn-secondary);
    color: var(--select-customer-text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.load-more-button i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.load-more-button:hover:not(:disabled) i {
    transform: translateY(2px);
}

.load-more-button .spinner-small {
    border-color: var(--select-customer-text-muted);
    border-top-color: transparent;
}

.load-more-button:disabled .spinner-small {
    border-color: var(--select-customer-text-muted);
    border-top-color: transparent;
}

/* Enhanced No Results and Empty State */
.no-results,
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--select-customer-text-secondary);
}

.no-results-icon,
.empty-state-icon {
    font-size: 3rem;
    color: var(--select-customer-btn-secondary);
    margin-bottom: 1rem;
}

.no-results h4,
.empty-state h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.no-results p,
.empty-state p {
    margin-bottom: 0.5rem;
    color: var(--select-customer-text-secondary);
    font-size: 0.9rem;
}

.no-results .suggestion {
    color: var(--select-customer-text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--select-customer-border-light);
    flex-shrink: 0;
}

.accept-button,
.cancel-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.accept-button {
    background: var(--select-customer-primary-color);
    color: var(--select-customer-bg-white);
}

.accept-button:hover:not(:disabled) {
    background: var(--select-customer-primary-hover);
}

.accept-button:disabled {
    background: var(--select-customer-btn-secondary);
    cursor: not-allowed;
}

.cancel-button {
    background: var(--select-customer-btn-secondary);
    color: var(--select-customer-bg-white);
}

.cancel-button:hover {
    background: var(--select-customer-btn-secondary-hover);
}

/* Spinner Animation */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--select-customer-primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Container Scrollbar Styling */
.select-customer-container::-webkit-scrollbar {
    width: 8px;
}

.select-customer-container::-webkit-scrollbar-track {
    background: var(--select-customer-bg-light);
    border-radius: 4px;
}

.select-customer-container::-webkit-scrollbar-thumb {
    background: var(--select-customer-primary-color);
    border-radius: 4px;
}

.select-customer-container::-webkit-scrollbar-thumb:hover {
    background: var(--select-customer-primary-hover);
}

/* Modal Customizations */
#select-customer-modal .modal-dialog {
    max-width: 700px;
}

#select-customer-modal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Tablet Responsive Design */
@media (max-width: 992px) {
    .select-customer-container {
        padding: 1.25rem;
        max-height: 80vh;
        height: 80vh;
        overflow-y: auto;
    }
    
    .results-section {
        min-height: 250px;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    #select-customer-modal .modal-dialog {
        max-width: 90%;
        margin: 1rem auto;
    }
}

/* Tablet with Limited Height (Less than 800px) - Optimized for Compact Vertical Space */
@media (min-width: 769px) and (max-width: 1024px) and (max-height: 800px) {
    .select-customer-container {
        padding: 1rem;
        max-height: 85vh;
        height: 85vh;
        overflow-y: auto;
    }
    
    .current-customer-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .current-customer-card {
        padding: 0.75rem;
    }
    
    .current-customer-card .customer-icon {
        width: 45px;
        height: 45px;
    }
    
    .current-customer-card .user-icon {
        font-size: 20px;
    }
    
    .reset-customer-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .search-section {
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.05rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.4rem;
    }
    
    .search-bar {
        margin-bottom: 0.75rem;
    }
    
    .input-search {
        padding: 0.6rem 0.85rem;
        font-size: 0.95rem;
    }
    
    .customer-search-btn {
        padding: 0.6rem 0.8rem;
        min-width: 46px;
    }
    
    .customer-search-icon {
        width: 28px;
        height: 28px;
    }
    
    /* Fixed height for results section in tablet with limited vertical space */
    .results-section {
        height: 320px;
        min-height: 320px;
        max-height: 320px;
        margin-bottom: 1rem;
    }
    
    .customer-card {
        padding: 0.85rem;
        margin-bottom: 0.75rem;
    }
    
    .customer-card:hover {
        transform: translateY(-1px);
    }
    
    .customer-icon {
        width: 45px;
        height: 45px;
    }
    
    .user-icon {
        font-size: 20px;
    }
    
    .customer-info {
        gap: 0.4rem;
    }
    
    .customer-field {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .customer-field:first-child {
        font-size: 0.95rem;
        margin-bottom: 0.2rem;
    }
    
    .field-label {
        font-size: 0.8rem;
    }
    
    .customer-radio,
    .customer-checkbox {
        width: 19px;
        height: 19px;
    }
    
    .load-more-container {
        padding: 0.6rem 0;
        margin-top: 0.6rem;
    }
    
    .load-more-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        min-height: 42px;
    }
    
    .loading-container {
        padding: 1.5rem;
    }
    
    .loading-container p {
        font-size: 0.85rem;
    }
    
    .error-container {
        padding: 1.5rem;
    }
    
    .error-icon {
        font-size: 2.5rem;
    }
    
    .no-results,
    .empty-state {
        padding: 1.5rem;
    }
    
    .no-results-icon,
    .empty-state-icon {
        font-size: 2.5rem;
    }
    
    .action-buttons {
        gap: 0.6rem;
        padding-top: 0.85rem;
    }
    
    .accept-button,
    .cancel-button {
        padding: 0.65rem 1.2rem;
        font-size: 0.95rem;
        min-height: 46px;
    }
    
    #select-customer-modal .modal-dialog {
        max-width: 92%;
        margin: 0.75rem auto;
    }
    
    #select-customer-modal .modal-content {
        border-radius: 10px;
        height: 85vh;
        max-height: 85vh;
    }
}

/* Mobile Responsive Design - Maintaining Horizontal Layout */
@media (max-width: 768px) {
    .select-customer-container {
        padding: 1rem;
        max-height: 85vh;
        height: 85vh;
        overflow-y: auto;
    }
    
    .results-section {
        margin-bottom: 1rem;
        min-height: 200px;
    }
    
    .current-customer-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    /* Current Customer Card - Keep Horizontal Layout */
    .current-customer-card .customer-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0.75rem;
    }
    
    .current-customer-card .customer-icon {
        width: 40px;
        height: 40px;
    }
    
    .current-customer-card .user-icon {
        font-size: 18px;
    }
    
    .customer-actions {
        justify-content: flex-end;
        margin-top: 0;
    }
    
    .reset-customer-button {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .search-section {
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .input-search {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .input-search::placeholder {
        font-size: 0.85rem;
    }
    
    .customer-search-btn {
        padding: 0.6rem 0.75rem;
        min-width: 45px;
    }
    
    .customer-search-icon {
        width: 28px;
        height: 28px;
    }
    
    .customer-card {
        padding: 0.75rem;
    }
    
    .customer-card:hover {
        transform: none;
    }
    
    /* Customer Cards - Keep Horizontal Layout */
    .customer-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0.75rem;
    }
    
    .customer-icon {
        width: 40px;
        height: 40px;
    }
    
    .user-icon {
        font-size: 18px;
    }
    
    .customer-info {
        gap: 0.3rem;
    }
    
    .customer-field {
        font-size: 0.8rem;
    }
    
    .customer-field:first-child {
        font-size: 0.9rem;
    }
    
    .field-label {
        font-size: 0.75rem;
    }
    
    .customer-selection {
        justify-content: center;
        margin-top: 0;
    }
    
    .customer-radio,
    .customer-checkbox {
        width: 18px;
        height: 18px;
    }
    
    /* Load More Button - Mobile */
    .load-more-container {
        padding: 0.75rem 0;
        margin-top: 0.75rem;
    }
    
    .load-more-button {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
        min-height: 44px;
    }
    
    .loading-container {
        padding: 1.5rem;
    }
    
    .loading-container p {
        font-size: 0.85rem;
    }
    
    .error-container {
        padding: 1.5rem;
    }
    
    .error-icon {
        font-size: 2.5rem;
    }
    
    .no-results,
    .empty-state {
        padding: 1.5rem;
    }
    
    .no-results-icon,
    .empty-state-icon {
        font-size: 2.5rem;
    }
    
    .action-buttons {
        gap: 0.6rem;
        padding-top: 1rem;
    }
    
    .accept-button,
    .cancel-button {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        min-height: 48px;
    }
    
    #select-customer-modal .modal-dialog {
        max-width: 95%;
        margin: 0.5rem auto;
    }
    
    #select-customer-modal .modal-content {
        border-radius: 8px;
        height: 90vh;
        max-height: 90vh;
    }
}

/* Small Mobile Responsive Design */
@media (max-width: 576px) {
    .select-customer-container {
        padding: 0.75rem;
        max-height: 90vh;
        height: 90vh;
        overflow-y: auto;
    }
    
    .results-section {
        min-height: 180px;
    }
    
    .section-title {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }
    
    /* Current Customer - Maintain Horizontal Layout */
    .current-customer-card .customer-icon {
        width: 36px;
        height: 36px;
    }
    
    .current-customer-card .user-icon {
        font-size: 16px;
    }
    
    .reset-customer-button {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .input-search {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .input-search::placeholder {
        font-size: 0.8rem;
    }
    
    .customer-search-btn {
        padding: 0.5rem 0.6rem;
        min-width: 40px;
    }
    
    .customer-search-icon {
        width: 26px;
        height: 26px;
    }
    
    .customer-card {
        padding: 0.6rem;
        border-radius: 6px;
    }
    
    .customer-content {
        gap: 0.6rem;
    }
    
    /* Customer Cards - Adjusted for Small Mobile */
    .customer-icon {
        width: 36px;
        height: 36px;
    }
    
    .user-icon {
        font-size: 16px;
    }
    
    .customer-info {
        gap: 0.25rem;
    }
    
    .customer-field {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .customer-field:first-child {
        font-size: 0.85rem;
    }
    
    .field-label {
        font-size: 0.7rem;
    }
    
    .customer-radio,
    .customer-checkbox {
        width: 16px;
        height: 16px;
    }
    
    /* Load More Button - Small Mobile */
    .load-more-container {
        padding: 0.5rem 0;
        margin-top: 0.5rem;
    }
    
    .load-more-button {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .loading-container {
        padding: 1rem;
    }
    
    .loading-container p {
        font-size: 0.8rem;
    }
    
    .error-container {
        padding: 1rem;
    }
    
    .error-icon {
        font-size: 2rem;
    }
    
    .spinner {
        width: 28px;
        height: 28px;
    }
    
    .no-results,
    .empty-state {
        padding: 1rem;
    }
    
    .no-results-icon,
    .empty-state-icon {
        font-size: 2rem;
    }
    
    .action-buttons {
        padding-top: 0.75rem;
        gap: 0.5rem;
    }
    
    .accept-button,
    .cancel-button {
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
        border-radius: 30px;
        min-height: 44px;
    }
    
    #select-customer-modal .modal-dialog {
        max-width: 98%;
        margin: 0.25rem auto;
    }
}

/* Mobile Landscape Responsive Design */
@media (max-width: 896px) and (orientation: landscape) and (max-height: 500px) {
    .select-customer-container {
        max-height: 95vh;
        height: 95vh;
        padding: 0.5rem;
        overflow-y: auto;
    }
    
    .results-section {
        min-height: 150px;
    }
    
    .current-customer-section {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    /* Current Customer - Optimized for Landscape */
    .current-customer-card .customer-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0.75rem;
    }
    
    .current-customer-card .customer-icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    
    .current-customer-card .user-icon {
        font-size: 14px;
    }
    
    .customer-actions {
        flex-shrink: 0;
        justify-content: center;
        margin-top: 0;
    }
    
    .reset-customer-button {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .search-section {
        margin-bottom: 0.75rem;
    }
    
    .section-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.25rem;
    }
    
    .search-bar {
        margin-bottom: 0.5rem;
    }
    
    .customer-card {
        padding: 0.5rem;
        border-radius: 4px;
    }
    
    .customer-card:hover {
        transform: none;
    }
    
    /* Customer Cards - Landscape Optimized */
    .customer-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0.5rem;
    }
    
    .customer-icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    
    .user-icon {
        font-size: 14px;
    }
    
    .customer-info {
        flex: 1;
        gap: 0.15rem;
    }
    
    .customer-field {
        font-size: 0.7rem;
        line-height: 1.2;
    }
    
    .customer-field:first-child {
        font-size: 0.8rem;
        margin-bottom: 0.1rem;
    }
    
    .field-label {
        font-size: 0.65rem;
    }
    
    .customer-selection {
        flex-shrink: 0;
        justify-content: center;
        margin-top: 0;
    }
    
    .customer-radio,
    .customer-checkbox {
        width: 16px;
        height: 16px;
    }
    
    /* Load More Button - Landscape */
    .load-more-container {
        padding: 0.25rem 0;
        margin-top: 0.25rem;
    }
    
    .load-more-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        min-height: 32px;
    }
    
    .loading-container {
        padding: 0.75rem;
    }
    
    .loading-container p {
        font-size: 0.7rem;
    }
    
    .error-container {
        padding: 0.75rem;
    }
    
    .error-icon {
        font-size: 1.8rem;
    }
    
    .spinner {
        width: 24px;
        height: 24px;
    }
    
    .no-results,
    .empty-state {
        padding: 0.75rem;
    }
    
    .no-results-icon,
    .empty-state-icon {
        font-size: 1.8rem;
    }
    
    .action-buttons {
        flex-direction: row;
        justify-content: space-between;
        padding-top: 0.5rem;
        gap: 0.5rem;
    }
    
    .accept-button,
    .cancel-button {
        flex: 1;
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
        border-radius: 30px;
        min-height: 36px;
    }
    
    #select-customer-modal .modal-dialog {
        max-width: 98%;
        margin: 0.25rem auto;
    }
    
    #select-customer-modal .modal-content {
        border-radius: 6px;
        height: 95vh;
        max-height: 95vh;
    }
}

/* Extra Small Mobile (Portrait) */
@media (max-width: 480px) and (orientation: portrait) {
    .select-customer-container {
        max-height: 95vh;
        height: 95vh;
        padding: 0.5rem;
        overflow-y: auto;
    }
    
    .results-section {
        min-height: 160px;
    }
    
    .loading-container {
        padding: 0.75rem;
    }
    
    .error-container {
        padding: 0.75rem;
    }
    
    .no-results,
    .empty-state {
        padding: 0.75rem;
    }
}

/* Large Mobile Landscape (iPhone Pro Max, Galaxy S series) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) and (max-height: 500px) {
    .select-customer-container {
        padding: 0.75rem;
        max-height: 90vh;
        height: 90vh;
        overflow-y: auto;
    }
    
    .results-section {
        min-height: 180px;
    }
    
    /* Maintain horizontal layout for large mobile landscape */
    .customer-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 1rem;
    }
    
    .customer-info {
        gap: 0.3rem;
    }
    
    .customer-field {
        font-size: 0.8rem;
    }
    
    .customer-field:first-child {
        font-size: 0.9rem;
    }
    
    /* Load More Button - Large Mobile Landscape */
    .load-more-container {
        padding: 0.5rem 0;
        margin-top: 0.5rem;
    }
    
    .load-more-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .action-buttons {
        flex-direction: row;
        gap: 1rem;
        padding-top: 0.75rem;
    }
    
    .accept-button,
    .cancel-button {
        flex: 1;
        min-height: 44px;
    }
}

/* Scrollbar Styling */
.customers-list::-webkit-scrollbar {
    width: 6px;
}

.customers-list::-webkit-scrollbar-track {
    background: var(--select-customer-bg-light);
    border-radius: 3px;
}

.customers-list::-webkit-scrollbar-thumb {
    background: var(--select-customer-primary-color);
    border-radius: 3px;
}

.customers-list::-webkit-scrollbar-thumb:hover {
    background: var(--select-customer-primary-hover);
}

/* Mobile Scrollbar */
@media (max-width: 768px) {
    .customers-list::-webkit-scrollbar {
        width: 4px;
    }
    
    .select-customer-container::-webkit-scrollbar {
        width: 6px;
    }
}

/* Landscape Mobile Scrollbar */
@media (orientation: landscape) and (max-height: 500px) {
    .customers-list::-webkit-scrollbar {
        width: 3px;
    }
    
    .select-customer-container::-webkit-scrollbar {
        width: 5px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .customer-card {
        padding: 1rem;
    }
    
    .customer-radio,
    .customer-checkbox {
        width: 22px;
        height: 22px;
    }
    
    .customer-search-btn {
        min-width: 48px;
        padding: 0.75rem;
    }
    
    .accept-button,
    .cancel-button {
        padding: 0.75rem 1rem;
        min-height: 48px;
    }
    
    .reset-customer-button {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
    
    .load-more-button {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
    }
}

/* Touch-friendly improvements for landscape */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
    .customer-radio,
    .customer-checkbox {
        width: 20px;
        height: 20px;
    }
    
    .accept-button,
    .cancel-button {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
    }
    
    .reset-customer-button {
        min-height: 40px;
        padding: 0.4rem 0.8rem;
    }
    
    .load-more-button {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
}