table > thead > tr > th, table > tfoot > tr > th, table > thead > tr > td, table > tbody > tr > td {
	text-align: center !important;
}

.error {
	color: red !important;
}

.swal2-container {
	z-index: 9999999 !important;
}

/* Page Loader Styles */
.page-loader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(250, 250, 250, 0.95);
	backdrop-filter: blur(2px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
	opacity: 0;
	visibility: hidden;
}

.page-loader-content {
	text-align: center;
}

.page-loader-spinner {
	width: 60px;
	height: 60px;
	margin: 0 auto 20px;
	border: 6px solid #e1e1e1;
	border-radius: 50%;
	border-top: 6px solid #F36E21;
	animation: page-loader-spin 1s linear infinite;
}

.page-loader-text {
	font-size: 16px;
	color: #666;
	font-weight: 500;
	font-family: 'Poppins', sans-serif;
}

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

/* Page loader for different screen sizes */
@media (max-width: 768px) {
	.page-loader-spinner {
		width: 50px;
		height: 50px;
		border-width: 5px;
		border-top-width: 5px;
	}
	
	.page-loader-text {
		font-size: 14px;
	}
}

/* Ensure page content is hidden during loading */
body.loading .page-wrapper {
	opacity: 0.3;
	pointer-events: none;
}

/* Custom Image Map Styles */
.interactive-map {
    width: 100%;
    height: 500px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.custom-map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
    background: #f0f0f0;
    border-radius: 8px;
}

.custom-map-wrapper:active {
    cursor: grabbing;
}

.zoom-container {
    position: relative;
    transform-origin: 0 0;
    transition: transform 0.3s ease;
}

.markers-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Custom Marker Styles */
.custom-marker {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.custom-marker .marker-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    border: 2px solid #fff;
    position: relative;
}

.custom-marker .marker-icon i {
    color: white;
    font-size: 14px;
    transform: rotate(45deg);
    margin-top: -2px;
    margin-left: -1px;
}

.custom-marker:hover .marker-icon {
    transform: rotate(-45deg) scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.custom-marker.marker-selected .marker-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 6px 16px rgba(245, 87, 108, 0.6);
    animation: pulse 2s infinite;
}

.custom-marker.marker-hover .marker-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

.custom-marker.marker-search-result .marker-icon {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    animation: bounce 1s ease-in-out infinite alternate;
}

.custom-marker.marker-highlight .marker-icon {
    animation: highlight 2s ease-in-out;
}

/* Marker Tooltip */
.marker-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    margin-bottom: 5px;
}

.marker-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.marker-tooltip strong {
    display: block;
    margin-bottom: 2px;
}

.marker-tooltip p {
    margin: 0;
    opacity: 0.8;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.zoom-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.zoom-btn i {
    font-size: 14px;
}

/* Map Loading and Error States */
.map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #667eea;
}

.map-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #dc3545;
    text-align: center;
    padding: 20px;
}

.map-error i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.map-error h3 {
    margin-bottom: 8px;
    color: #dc3545;
}

.map-error p {
    margin-bottom: 20px;
    color: #6c757d;
}

.retry-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

/* Store List Sidebar Styles */
.store-item {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.store-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

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

.store-name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.store-id {
    background: #e2e8f0;
    color: #4a5568;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.store-item-body {
    margin-bottom: 12px;
}

.store-description {
    color: #4a5568;
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.store-location {
    color: #667eea;
    font-size: 13px;
    margin: 0;
}

.store-location i {
    margin-right: 4px;
}

.store-item-footer {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-outline-primary {
    background: transparent;
    color: #667eea;
    border-color: #667eea;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

/* No stores message */
.no-stores {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

/* Modal Products Styles */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.product-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #2d3748;
}

.product-price {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 2px;
}

.product-stock {
    color: #6c757d;
    font-size: 12px;
    margin: 0;
}

.no-products, .error-text, .loading-text {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

.error-text {
    color: #dc3545;
}

/* Coordinate Display Styles */
.coordinate-popup {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 16px;
    min-width: 280px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.coordinate-popup h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coordinate-popup h4 i {
    color: #667eea;
}

.coordinate-info {
    margin-bottom: 16px;
}

.coordinate-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.coordinate-row label {
    font-weight: 500;
    min-width: 100px;
    color: #555;
    font-size: 14px;
}

.coordinate-row input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    background: #f8f9fa;
    text-align: center;
}

.coordinate-row span {
    color: #666;
    font-size: 12px;
    min-width: 15px;
}

.coordinate-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.coordinate-actions button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.copy-btn {
    background: #667eea;
    color: white;
}

.copy-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.close-btn {
    background: #6c757d;
    color: white;
}

.close-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.coordinate-note {
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.coordinate-note small {
    color: #666;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.coordinate-note i {
    color: #17a2b8;
}

/* Temporary Marker Styles */
.temp-marker-icon {
    width: 24px;
    height: 24px;
    background: #ff6b6b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    border: 2px solid white;
}

/* Notification Styles */
.map-notification {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.map-notification i {
    font-size: 16px;
}

/* Animations */
@keyframes pulse {
    0% { transform: rotate(-45deg) scale(1); }
    50% { transform: rotate(-45deg) scale(1.1); }
    100% { transform: rotate(-45deg) scale(1); }
}

@keyframes bounce {
    0% { transform: rotate(-45deg) translateY(0); }
    100% { transform: rotate(-45deg) translateY(-5px); }
}

@keyframes highlight {
    0%, 100% { transform: rotate(-45deg) scale(1); }
    50% { transform: rotate(-45deg) scale(1.2); box-shadow: 0 8px 20px rgba(102, 126, 234, 0.8); }
}

@keyframes tempMarkerPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .interactive-map {
        height: 400px;
    }

    .custom-marker .marker-icon {
        width: 28px;
        height: 28px;
    }

    .custom-marker .marker-icon i {
        font-size: 12px;
    }

    .marker-tooltip {
        font-size: 11px;
        padding: 6px 10px;
    }

    .zoom-controls {
        top: 10px;
        right: 10px;
    }

    .zoom-btn {
        width: 36px;
        height: 36px;
    }

    .store-item-footer {
        flex-direction: column;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}
