/* CSS cho hiển thị danh sách khách hàng khuyến mãi */

.customers-section {
    margin-top: 40px;
    padding: 20px;
}

.customers-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 40px;
    padding: 20px 0;
}

.customer-column {
    flex: 1;
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

/* Border hiệu ứng cho khách hàng hạng bạc */
.silver-customers {
    border: 3px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box,
                linear-gradient(45deg, #c0c0c0, #e8e8e8, #c0c0c0, #f5f5f5) border-box;
    animation: silverBorder 3s ease-in-out infinite;
}

@keyframes silverBorder {
    0%, 100% {
        background: linear-gradient(#fff, #fff) padding-box,
                    linear-gradient(45deg, #c0c0c0, #e8e8e8, #c0c0c0, #f5f5f5) border-box;
    }
    50% {
        background: linear-gradient(#fff, #fff) padding-box,
                    linear-gradient(45deg, #e8e8e8, #c0c0c0, #f5f5f5, #c0c0c0) border-box;
    }
}

/* Border hiệu ứng cho khách hàng hạng vàng */
.gold-customers {
    border: 3px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box,
                linear-gradient(45deg, #ffd700, #ffed4e, #ffd700, #fff59d) border-box;
    animation: goldBorder 2s ease-in-out infinite;
}

@keyframes goldBorder {
    0%, 100% {
        background: linear-gradient(#fff, #fff) padding-box,
                    linear-gradient(45deg, #ffd700, #ffed4e, #ffd700, #fff59d) border-box;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1), 0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        background: linear-gradient(#fff, #fff) padding-box,
                    linear-gradient(45deg, #ffed4e, #ffd700, #fff59d, #ffd700) border-box;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1), 0 0 30px rgba(255, 215, 0, 0.5);
    }
}

.customer-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.silver-customers .customer-title {
    color: #666;
    background: linear-gradient(45deg, #c0c0c0, #e8e8e8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gold-customers .customer-title {
    color: #b8860b;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.customer-list {
    min-height: 400px;
}

.customer-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border-left: 4px solid #ddd;
}

.silver-customers .customer-item {
    border-left-color: #c0c0c0;
}

.gold-customers .customer-item {
    border-left-color: #ffd700;
}

.customer-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.silver-customers .customer-item:hover {
    box-shadow: 0 8px 25px rgba(192, 192, 192, 0.3);
}

.gold-customers .customer-item:hover {
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.customer-name {
    font-weight: bold;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.customer-info {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}
.customer-address{font-size: 14px;}
.customer-phone{font-size: 14px;}

.customer-value {
    font-weight: bold;
    font-size: 14px;
    margin-top: 8px;
}

.silver-customers .customer-value {
    color: #666;
}

.gold-customers .customer-value {
    color: #b8860b;
}

.promotion-code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    margin-top: 5px;
    display: inline-block;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.pagination button {
    background: #fff;
    border: 2px solid #ddd;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    font-size: 14px;
    color: #666;
    margin: 0 10px;
}

.silver-customers .pagination button.active {
    background: #c0c0c0;
    border-color: #c0c0c0;
    color: white;
}

.gold-customers .pagination button.active {
    background: #ffd700;
    border-color: #ffd700;
    color: #333;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .customers-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .customer-column {
        margin-bottom: 20px;
    }
    
    .customer-title {
        font-size: 20px;
    }
    
    .customer-item {
        padding: 12px;
    }
    
    .customer-name {
        font-size: 15px;
    }
    
    .customer-info {
        font-size: 13px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination button {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
   .customers-section{
       margin-top:0px;
       padding:0px;
   }
   
   .customers-container {
        flex-direction: column;
        margin-top:0px;
   }
   
    .customer-column {
        padding: 15px;
       
    }
    
    .customer-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .customer-item {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .customer-name {
        font-size: 14px;
    }
    
    .customer-info {
        font-size: 12px;
    }
    
    .customer-value {
        font-size: 14px;
    }
}

/* Animation cho việc load dữ liệu mới */
.customer-item.fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}