/* Price List Catalog Styles */

.pricelist-catalog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 15px;
}

.catalog-intro {
    text-align: center;
    margin-bottom: 30px;
}

.catalog-intro .lead {
    font-size: 1.1rem;
    color: #666;
}

/* Filters Section */
.filters-section {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: none;
}

.filters-section .card-body {
    padding: 20px;
}

.filters-section label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.filters-section .form-control {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 10px 15px;
}

.filters-section .form-control:focus {
    border-color: #2c3e50;
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.15);
}

/* Selection Bar */
.selection-bar {
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    color: #2d2222;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.selection-bar .card-body {
    padding: 15px 20px;
}

.selection-bar #selected-count {
    font-size: 1.1rem;
}

.selection-bar #selected-count strong {
    font-size: 1.2rem;
    color: #413939;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.selection-bar #inquiry-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: none;
    font-weight: 400;
    padding: 10px 25px;
    transition: all 0.3s ease;
}

.selection-bar #inquiry-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.selection-bar #inquiry-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.selection-bar #inquiry-btn i {
    vertical-align: middle;
    font-size: 18px;
    margin-right: 5px;
}

/* Brand filter hint */
#brand-filter-hint {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.85em;
    font-style: italic;
}

/* Brand stats button */
#show-brand-stats {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
    color: white;
    font-weight: 400;
    transition: all 0.3s ease;
}

#show-brand-stats:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

#show-brand-stats i {
    vertical-align: middle;
    margin-right: 5px;
}

/* Brand statistics modal */
.brand-stats-table {
    margin-bottom: 0;
}

.brand-stats-table thead {
    background: #f8f9fa;
}

.brand-stats-table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 12px;
    border-bottom: 2px solid #dee2e6;
}

.brand-stats-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

.brand-stats-table tbody tr:hover {
    background: #e3f2fd;
    transform: scale(1.01);
}

.brand-stats-table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
}

.brand-stats-table tfoot {
    background: #f8f9fa;
    border-top: 2px solid #dee2e6;
}

.brand-stats-table tfoot td {
    padding: 12px;
    font-size: 1.1rem;
}

#brand-stats-modal .modal-header {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

#brand-stats-modal .modal-header i {
    vertical-align: middle;
    margin-right: 8px;
}

/* Table Wrapper */
.table-wrapper {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: none;
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

/* Products Table */
.pricelist-table {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.pricelist-table thead {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.pricelist-table thead th {
    border: none;
    padding: 15px 12px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.pricelist-table tbody tr {
    transition: all 0.2s ease;
}

.pricelist-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.005);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pricelist-table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-top: 1px solid #e9ecef;
}

.pricelist-table .product-code {
    font-weight: 600;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
}

.pricelist-table .product-name {
    color: #555;
}

.pricelist-table .price {
    font-weight: 600;
    color: #27ae60;
    font-size: 0.85rem;
}

.pricelist-table .ean-code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #666;
}

.pricelist-table .brand-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #ecf0f1;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Eshop Match Icon */
/* Eshop Match Icon */
.eshop-match-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #27ae60;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.eshop-match-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
    color: white;
    text-decoration: none;
}

/* Přidat podtržení pro indikaci odkazu */
.eshop-match-icon::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s ease;
}

.eshop-match-icon:hover::after {
    width: 80%;
}

/* Tooltip pro nápovědu */
.eshop-match-icon {
    position: relative;
}

.eshop-match-icon::before {
    content: 'Zobrazit na e-shopu';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: #2c3e50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
}

.eshop-match-icon:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

.eshop-match-icon i {
    font-size: 18px;
}

.eshop-match-icon.not-in-eshop {
    background: #95a5a6;
    opacity: 0.3;
    cursor: default;
}

.eshop-match-icon.not-in-eshop::before {
    content: 'Produkt není na e-shopu';
}

.eshop-match-icon.not-in-eshop:hover {
    transform: none;
    box-shadow: none;
}

.eshop-match-icon.not-in-eshop:hover::after {
    width: 0;
}

.eshop-match-icon.not-in-eshop:hover::before {
    opacity: 0.7;
}

/* Checkbox Styling */
.pricelist-table input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Pagination */
#pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

.pagination-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Results Info */
.results-info {
    font-size: 0.95rem;
    padding: 15px;
}

.results-info #results-count {
    font-weight: 600;
    color: #667eea;
}

/* Modal Customization */
#inquiry-modal .modal-header {
    background: #304357;
    color: white;
    border-bottom: none;
}

#inquiry-modal .modal-title {
    font-weight: 600;
}

.selected-products-preview {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    background: #f8f9fa;
	 margin-bottom: 15px;
}

.selected-products-preview .list-group-item {
    padding: 10px;
    border: none;
    border-bottom: 1px solid #dee2e6;
    background: white;
    margin-bottom: 5px;
    border-radius: 4px;
}

.selected-products-preview .list-group-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.product-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-preview-name {
    flex: 1;
    font-weight: 500;
}

.product-preview-code {
    font-family: 'Courier New', monospace;
    color: #666;
    font-size: 0.9rem;
    margin-right: 10px;
}

.product-preview-price {
    font-weight: 600;
    color: #27ae60;
}

/* Success Modal */
#success-modal .modal-header {
    border-bottom: none;
}

#success-modal .modal-header i {
    vertical-align: middle;
    margin-right: 8px;
}

/* Loading Indicator */
#loading-indicator {
    position: relative;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pricelist-catalog-container {
        padding: 15px 10px;
    }
    
    .filters-section .card-body {
        padding: 15px;
    }
    
    .selection-bar #inquiry-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .pricelist-table {
        font-size: 0.85rem;
    }
    
    .pricelist-table thead th,
    .pricelist-table tbody td {
        padding: 8px;
    }
    
    .pricelist-table .price {
        font-size: 0.95rem;
    }
    
    /* Hide less important columns on mobile */
    .pricelist-table th:nth-child(5),
    .pricelist-table td:nth-child(5) {
        display: none;
    }
}

@media (max-width: 576px) {
    .catalog-intro .lead {
        font-size: 1rem;
    }
    
    .selection-bar .card-body {
        flex-direction: column;
        gap: 10px;
    }
    
    .selection-bar #inquiry-btn {
        width: 100%;
    }
    
    /* Stack table on very small screens */
    .pricelist-table thead {
        display: none;
    }
    
    .pricelist-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .pricelist-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 10px 15px;
        border-top: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .pricelist-table tbody td:last-child {
        border-bottom: none;
    }
    
    .pricelist-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
    }
}

/* Print Styles */
@media print {
    .filters-section,
    .selection-bar,
    #pagination-wrapper,
    .pricelist-table input[type="checkbox"] {
        display: none;
    }
    
    .pricelist-table {
        font-size: 10pt;
    }
    
    .pricelist-table tbody tr {
        page-break-inside: avoid;
    }
}

/* Loading Overlay */
#pricelist-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
}

#pricelist-loading-overlay.show {
    display: flex !important;
}

#pricelist-loading-overlay .loading-content {
    background: white;
    padding: 50px 60px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
}

#pricelist-loading-overlay h4 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
    font-weight: 600;
}

#pricelist-loading-overlay .progress {
    margin: 20px auto;
    border-radius: 10px;
    overflow: hidden;
}

#pricelist-loading-overlay .progress-bar {
    transition: width 0.3s ease;
}

#pricelist-loading-overlay .spinner-border {
    border-width: 0.3em;
}

#pricelist-loading-overlay small {
    display: block;
    margin-top: 15px;
    font-size: 12px;
    color: #888;
}

/* Sortable Header */
th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

th.sortable:hover {
    background-color: #f0f0f0;
}

th.sortable i {
    vertical-align: middle;
    margin-left: 5px;
    transition: color 0.2s ease;
}
/* Eshop filter checkbox */
.custom-control-label {
    cursor: pointer;
    padding-top: 2px;
}

#eshop-filter + .custom-control-label i {
    color: #27ae60;
}

/* Eshop link cursor */
.eshop-link {
    cursor: pointer;
}

.eshop-link:hover {
    transform: scale(1.15);
}
/* Progress Bar Loading Styles */
#pricelist-loading-overlay .progress {
    width: 300px;
    height: 25px;
    background-color: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

#pricelist-loading-overlay .progress-bar {
    background-color: #09A1E2 !important;
    background-image: linear-gradient(
        45deg,
        rgba(255,255,255,0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0.2) 75%,
        transparent 75%,
        transparent
    ) !important;
    background-size: 40px 40px;
    color: white !important;
    font-weight: 600;
    font-size: 13px;
    line-height: 25px;
    text-align: center;
    transition: width 0.3s ease;
    animation: progress-bar-stripes 1s linear infinite;
}



#pricelist-loading-overlay .progress-bar.progress-bar-striped {
    background-image: linear-gradient(
        45deg,
        rgba(255,255,255,0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 40px 40px;
}

#pricelist-loading-overlay .progress-bar.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% { background-position: 40px 0; }
    100% { background-position: 0 0; }
}

/* Spinner color */
#pricelist-loading-overlay .spinner-border {
    color: #09A1E2 !important;
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Loading text styling */
#pricelist-loading-overlay h4 {
    color: #09A1E2;
}

#pricelist-loading-overlay #loading-status {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}