/**
 * W_Customer List & Search Styles
 * 
 * @package W_Customer
 * @version 1.0.0
 * @author W System Team
 */

/* ===== CUSTOMER LIST TABLE ===== */
.w-customer-list {
    margin: 20px 0;
}

.customer-list-table {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.customers-table th {
    background: #f8f9fa;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.customers-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.customer-row:hover {
    background: #f8f9fa;
}

/* Table Columns */
.col-stt {
    width: 60px;
    text-align: center;
    font-weight: 500;
    color: #666;
}

.col-avatar {
    width: 80px;
    text-align: center;
}

.customer-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.col-name {
    min-width: 200px;
}

.customer-name-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.customer-name-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.col-tier {
    width: 120px;
}

.tier-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.col-points {
    width: 100px;
    text-align: right;
}

.points-display {
    font-weight: 600;
    color: #28a745;
    font-size: 16px;
}

.col-contact {
    min-width: 180px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.customer-email,
.customer-phone {
    font-size: 13px;
    color: #666;
}

.col-stats {
    min-width: 150px;
}

.customer-stats-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.total-bookings,
.total-spent {
    font-size: 13px;
    color: #666;
}

.total-spent {
    font-weight: 600;
    color: #28a745;
}

/* Pagination */
.customer-list-pagination {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.pagination-nav {
    display: inline-flex;
    gap: 5px;
}

.pagination-nav a,
.pagination-nav span {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    color: #007bff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination-nav a:hover {
    background: #007bff;
    color: white;
}

.pagination-nav .current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* ===== CUSTOMER SEARCH ===== */
.w-customer-search {
    margin: 20px 0;
}

.customer-search-form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-btn {
    padding: 12px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #0056b3;
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 500;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #007bff;
}

/* Search Results */
.customer-search-results {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.results-header {
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.results-count {
    color: #666;
    font-size: 14px;
}

.results-list {
    max-height: 500px;
    overflow-y: auto;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.result-item:hover {
    background: #f8f9fa;
}

.result-item:last-child {
    border-bottom: none;
}

.result-avatar {
    margin-right: 15px;
}

.result-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.result-info {
    flex: 1;
}

.result-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.result-contact {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 14px;
}

.result-tier {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.result-actions {
    margin-left: 15px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.results-pagination {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.load-more {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.load-more:hover {
    background: #545b62;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .customers-table .col-contact,
    .customers-table .col-stats {
        display: none;
    }
}

@media (max-width: 768px) {
    .customer-list-table {
        overflow-x: auto;
    }
    
    .customers-table {
        min-width: 600px;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-filters {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .result-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .result-avatar {
        margin-right: 0;
    }
}

/* ===== EMPTY STATES ===== */
.customer-list-empty,
.search-results-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-title {
    font-size: 20px;
    color: #495057;
    margin-bottom: 10px;
}

.empty-description {
    color: #6c757d;
    margin-bottom: 20px;
}