/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

/* Đảm bảo thứ tự sections đúng */
.upload-section {
    order: 1;
}

.file-list-section {
    order: 2;
}

.total-section {
    order: 3;
    display: block !important; /* Đảm bảo hiển thị */
    visibility: visible !important;
}

/* Header - Hidden */
.header {
    display: none;
}

/* Upload Section - 2 Column Layout */
.upload-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.upload-column {
    display: flex;
    flex-direction: column;
}

.upload-column h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-column h3 i {
    color: #007bff;
}

.upload-area {
    flex: 1;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.upload-area.dragover {
    border-color: #007bff;
    background: #e3f2fd;
    transform: scale(1.02);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-content i {
    font-size: 1.5rem;
    color: #007bff;
    margin-bottom: 5px;
}

.upload-content h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
}

.upload-content p {
    margin: 0;
    font-size: 0.75rem;
    color: #666;
    line-height: 1.3;
}

.btn-upload {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.btn-upload:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Mobile responsive for upload container */
@media (max-width: 768px) {
    .upload-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .upload-area {
        min-height: 150px;
        padding: 15px;
    }
    
    .upload-content i {
        font-size: 2rem;
    }
    
    .upload-content h4 {
        font-size: 0.9rem;
    }
    
    .upload-content p {
        font-size: 0.8rem;
    }
}

/* Upload Section */
.upload-section {
    padding: 5px 15px;
    transition: all 0.3s ease;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 12px 8px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    width: 50%;
    margin: 0 auto;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #ff6b6b;
    background: #fff5f5;
}

.upload-content i {
    font-size: 1.2rem;
    color: #ff6b6b;
    margin-bottom: 6px;
}

.upload-content h3 {
    font-size: 0.8rem;
    margin-bottom: 3px;
    color: #333;
}

.upload-content p {
    color: #666;
    font-size: 0.65rem;
    margin-bottom: 8px;
}

.btn-upload {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    background: #ee5a24;
    transform: translateY(-2px);
}

/* File List Section */
.file-list-section {
    padding: 0 10px 10px;
    overflow: visible; /* Bỏ scroll */
    transition: all 0.3s ease;
}

.file-list-section h2 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
    /* Bỏ position sticky để tránh layout bị lỗi */
    background: white;
    padding: 6px 0;
    z-index: 1;
}

.file-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Custom scrollbar for file list */
.file-list-section::-webkit-scrollbar {
    width: 6px;
}

.file-list-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.file-list-section::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.file-list-section::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.file-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 8px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0; /* Cho phép flex item shrink */
}

.file-name {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    font-size: 0.85rem;
    line-height: 1.3;
    margin-right: 8px;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* File type icons with colors */
.file-icon {
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid #ff6b6b;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.file-icon i {
    font-size: 0.8rem;
}

/* PDF icon - red */
.file-icon .fa-file-pdf {
    color: #dc3545;
}

/* Word icon - blue */
.file-icon .fa-file-word {
    color: #007bff;
}

/* Image icons - green */
.file-icon .fa-file-image,
.file-icon .fa-file-alt {
    color: #28a745;
}

/* Default file icon - gray */
.file-icon i:not(.fa-file-pdf):not(.fa-file-word):not(.fa-file-image):not(.fa-file-alt) {
    color: #6c757d;
}

.file-details h4 {
    font-size: 0.8rem;
    margin-bottom: 1px;
    color: #333;
    font-weight: 600;
}

.file-details p {
    font-size: 0.7rem;
    color: #666;
    margin: 0;
}

.remove-file {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

.file-options {
    margin-top: 6px;
}

.file-options h5 {
    font-size: 0.75rem;
    margin-bottom: 5px;
    color: #333;
}

.option-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    margin-top: 6px;
}

.option-btn-small {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 30px;
}

.option-btn-small:hover {
    background: #e9ecef;
}

.option-btn-small.selected {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.option-btn-small.disabled {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.5;
}

.option-btn-small.disabled:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
}

/* Icon colors for better visibility */
.option-btn-small i {
    font-size: 0.55rem;
}

/* Stapling icon - blue */
.option-btn-small[data-option="stapling"] i {
    color: #007bff;
}

/* Binding icon - green */
.option-btn-small[data-option="binding"] i {
    color: #28a745;
}

/* Coil binding icon - orange */
.option-btn-small[data-option="coil-binding"] i {
    color: #fd7e14;
}

/* Binding with glass cover icon - gold */
.option-btn-small[data-option="binding-glass-color"] i {
    color: #ffd700;
}

/* Color printing icon - rainbow colors */
.option-btn-small[data-option="color-printing"] i {
    color: #e91e63;
}

/* Selected state - white icons */
.option-btn-small.selected i {
    color: white !important;
}

/* Quantity Controls - Mobile Optimized */
.quantity-controls {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}

.quantity-controls label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.quantity-buttons {
    display: flex;
    align-items: center;
    gap: 3px;
}

.qty-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.qty-btn:hover {
    background: #ee5a24;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.4);
}

.qty-btn:active {
    transform: translateY(0);
}

.qty-display {
    background: #f8f9fa;
    border: 2px solid #ff6b6b;
    border-radius: 5px;
    padding: 3px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #ff6b6b;
    min-width: 25px;
    text-align: center;
}

/* Options Section */
.options-section {
    padding: 20px;
    background: white;
    border-top: 1px solid #eee;
}

.options-section h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.option-btn {
    background: white;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.option-btn:hover {
    border-color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.option-btn.selected {
    border-color: #ff6b6b;
    background: #fff5f5;
}

.option-btn i {
    font-size: 1.5rem;
    color: #ff6b6b;
}

.option-btn span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.option-btn small {
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 600;
}

/* Customer Section - Mobile Optimized */
.customer-section {
    padding: 8px 10px;
    background: white;
    border-top: 1px solid #eee;
    margin-bottom: 8px;
}

.customer-section h2 {
    font-size: 0.8rem;
    margin-bottom: 6px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
}

.customer-form {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.form-group {
    flex: 1;
}

.form-group input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.75rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* Info Card */
.info-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.info-card h4 {
    color: #007bff;
    margin-bottom: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.info-label {
    font-weight: 600;
    color: #495057;
}

.info-value {
    color: #6c757d;
    text-align: right;
}

/* Total Section */
.total-section {
    padding: 8px 10px;
    background: white;
    border-top: 1px solid #eee;
    /* Bỏ sticky để tránh layout bị lỗi */
    position: relative;
    z-index: 100;
    transition: all 0.2s ease;
}

.total-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 6px;
    padding: 8px 10px;
    color: white;
}

.total-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.total-header h3 {
    font-size: 0.8rem;
    font-weight: 600;
}

.total-price {
    font-size: 1.1rem;
    font-weight: bold;
}

.total-details {
    margin-bottom: 8px;
    max-height: 60px;
    overflow-y: auto;
    padding-right: 6px;
}

.total-details p {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 2px 0;
    line-height: 1.4;
}

/* Custom scrollbar cho total-details */
.total-details::-webkit-scrollbar {
    width: 4px;
}

.total-details::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.total-details::-webkit-scrollbar-thumb {
    background: #ff6b6b;
    border-radius: 2px;
}

.total-details::-webkit-scrollbar-thumb:hover {
    background: #ff5252;
}



.btn-checkout {
    width: 100%;
    background: white;
    color: #667eea;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.btn-checkout:hover:not(:disabled) {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.btn-checkout:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover {
    color: #000;
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }
    
    .header {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .upload-section,
    .file-list-section,
    .options-section,
    .customer-section,
    .total-section {
        padding: 15px;
        /* Đảm bảo thứ tự hiển thị đúng */
        position: relative;
        z-index: 1;
        display: block !important; /* Đảm bảo hiển thị */
        visibility: visible !important;
    }
    
    /* Đảm bảo file-list-section không bị sticky */
    .file-list-section {
        position: static !important;
        overflow: visible !important;
    }
    
    .file-list-section h2 {
        position: static !important;
        top: auto !important;
    }
    
    .customer-form {
        flex-direction: column;
        gap: 8px;
    }
    
    .file-list-section {
        max-height: none; /* Bỏ giới hạn chiều cao để tránh layout bị lỗi */
        overflow: visible !important;
    }
    
    .total-details {
        max-height: 150px;
    }
    
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .option-btn {
        padding: 12px 8px;
    }
    
    .option-btn i {
        font-size: 1.3rem;
    }
    
    .option-btn span {
        font-size: 0.8rem;
    }
    
    .option-btn small {
        font-size: 0.7rem;
    }
    
    .file-details h4 {
        font-size: 0.85rem;
    }
    
    .file-details p {
        font-size: 0.75rem;
    }
    
    .option-buttons {
        gap: 6px;
    }
    
    .option-btn-small {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .quantity-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
    
    .qty-display {
        padding: 4px 8px;
        font-size: 0.9rem;
        min-width: 35px;
    }
}

/* Page count indicator with better colors and size */
.page-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #bbdefb;
    white-space: nowrap;
    flex-shrink: 0; /* Không cho shrink */
}

/* Merge file item styling */
.merge-file-item {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
}

.merge-file-item .merge-icon {
    background: #28a745;
    color: white;
}

.merge-file-item .file-name {
    color: #28a745;
    font-weight: 600;
}

.merge-file-item .file-details p {
    color: #6c757d;
    font-style: italic;
}

/* File processing with progress bar */
.file-processing {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 3px;
    transition: width 0.3s ease;
    animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-text {
    font-size: 0.8rem;
    color: #007bff;
    font-weight: 500;
    text-align: center;
}

.file-error {
    margin-top: 8px;
    padding: 6px 10px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* File processing indicator */
.file-processing {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.8rem;
}

.file-processing .loading {
    width: 12px;
    height: 12px;
    border-width: 1px;
}

/* Progress Bar */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.progress-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* Action Buttons Animation */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-in-out;
}

.action-buttons.show {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.6s ease-out;
}

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

.action-buttons.show .btn-checkout {
    animation: bounceIn 0.8s ease-out;
    animation-delay: calc(var(--delay, 0) * 0.1s);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(-5px);
    }
    70% {
        transform: scale(0.95) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Button Pulse Effect */
.btn-checkout:not(:disabled) {
    position: relative;
    overflow: hidden;
}

.btn-checkout:not(:disabled)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-checkout:not(:disabled):hover::before {
    left: 100%;
}

.btn-checkout:not(:disabled) {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Zalo Button Styling */
.btn-zalo {
    background: linear-gradient(135deg, #0068FF 0%, #00A8FF 100%) !important;
    border: none !important;
    color: white !important;
}

.btn-zalo:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056CC 0%, #0091E6 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 104, 255, 0.3);
}

.btn-zalo:not(:disabled) {
    animation: zaloPulse 2s infinite;
}

@keyframes zaloPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 104, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 104, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 104, 255, 0);
    }
}

.btn-zalo:disabled {
    background: #ccc !important;
    color: #666 !important;
    cursor: not-allowed;
}

/* Mobile Responsive for Action Buttons */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-buttons.show .btn-checkout {
        animation-delay: calc(var(--delay, 0) * 0.2s);
    }
    
    .action-buttons.show .btn-zalo {
        animation-delay: calc(var(--delay, 0) * 0.2s);
    }
    
    .btn-checkout {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .btn-zalo {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Completely hide sections */
.options-section,
.customer-section,
.info-card {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Zalo Contact Button */
.zalo-contact-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0068FF 0%, #00A8FF 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 104, 255, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
}

.zalo-contact-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 104, 255, 0.6);
}

.zalo-icon {
    color: white;
    font-size: 24px;
    z-index: 2;
    position: relative;
}

.zalo-text {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.zalo-contact-btn:hover .zalo-text {
    opacity: 1;
    right: 75px;
}

.zalo-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(0, 104, 255, 0.3);
    animation: zaloPulseAnimation 2s infinite;
}

@keyframes zaloPulseAnimation {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Blinking effect */
.zalo-contact-btn {
    animation: zaloBlink 3s infinite;
}

@keyframes zaloBlink {
    0%, 90%, 100% {
        opacity: 1;
    }
    95% {
        opacity: 0.3;
    }
}

/* Mobile responsive for file items */
@media (max-width: 480px) {
    .file-item {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .file-header {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .file-info {
        flex-direction: row;
        align-items: center;
        flex: 1;
        min-width: 0;
    }
    
    .file-name {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-right: 0;
    }
    
    .file-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }
    
    .page-count {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* Mobile responsive for Zalo button */
@media (max-width: 480px) {
    .zalo-contact-btn {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    .zalo-icon {
        font-size: 20px;
    }
    
    .zalo-text {
        font-size: 12px;
        padding: 6px 10px;
        right: 60px;
    }
    
    .zalo-contact-btn:hover .zalo-text {
        right: 65px;
    }
}