/* Main container styling */
.main-container {
    height: calc(100vh - 64px); /* Adjust based on your header/footer height */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Tab styling */
.order-tabs-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.order-tabs-header {
    flex-shrink: 0;
    padding: 0.25rem 0.5rem 0 0.5rem;
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    justify-content: flex-start; /* Align tabs to the left */
    gap: 0; /* Remove any gap between tab items */
}

.nav-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.nav-tabs .nav-item {
    margin: 0; /* Remove any margin between tab items */
}

.order-tabs-content {
    flex-grow: 1;
    overflow: auto;
    padding: 0.5rem;
    position: relative;
    background-color: #fcfcfd;
    border-radius: 0.7rem;
}

.nav-tabs .nav-item .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.5rem; /* Reduce horizontal padding */
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    background-color: #f0f2f7;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    margin-right: 0; /* Remove right margin */
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 2.5rem;
    width: auto; /* Allow natural width based on content */
    min-width: 120px; /* Set minimum width */
    max-width: 160px; /* Set maximum width */
}

.tab-content-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    overflow: hidden;
}
/* Updated tab-title-container to center content */
.tab-title-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center horizontally */
    justify-content: center; /* Center vertically */
    min-width: 0;
    flex: 1;
    overflow: visible; /* Make content visible even if it overflows */
    line-height: 1.2;
    padding: 0 2px;
}

/* Make tab title more visible */
.tab-title {
    width: 100%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

/* Make order ID badge more prominent */
.order-id-badge {
    color: #343a40;
    background-color: #e9ecef;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.2rem;
    display: inline-block;
    border: 1px solid #ced4da;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Make sure tab-content-wrapper can accommodate the centered content */
.tab-content-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    overflow: visible;
    padding: 0.25rem;
}

/* Increase fixed-width-tab width slightly to give more room for content */
.fixed-width-tab {
    width: 170px !important;
    min-width: 170px;
    max-width: 170px;
}


.nav-tabs .nav-item .nav-link:hover {
    background-color: #f8f9fa;
    color: #3a4255;
}

.nav-tabs .nav-item .nav-link.active {
    color: #2c3650;
    background-color: #ffffff;
    border-color: #c0c6d0 #c0c6d0 #ffffff;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.025);
    position: relative;
    z-index: 1; /* Ensure active tab is above others */
}

.nav-tabs .nav-item .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ffffff;
}

.nav-tabs .nav-item .nav-link i {
    font-size: 0.85rem;
    color: #6c757d;
}

.nav-tabs .nav-item .nav-link.active i {
    color: #4a5568;
}

.tab-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.2s ease;
    cursor: pointer;
    margin-left: 0.125rem;
    padding: 0;
}

.tab-close-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.tab-close-btn i {
    font-size: 0.7rem;
    color: #8896aa;
}

.tab-close-btn:hover i {
    color: #dc3545;
}

.tab-pane {
    height: 100%;
    overflow: auto;
    background-color: #ffffff;
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Move the "Close All" button to ensure it doesn't disrupt tab alignment */
.nav-tabs .ms-auto {
    margin-left: auto !important;
    margin-right: 0.5rem;
}

/* Make sure all content fits without scrollbars */
.card {
    max-height: calc(100% - 1rem);
    display: flex;
    flex-direction: column;
}

.card-body {
    overflow: auto;
}

/* Compact table styles to fit in available space */
.table th, .table td {
    padding: 0.35rem 0.5rem;
}

/* Fixed width tab style - maintains the same styling as nav-tabs but with fixed width */
.fixed-width-tab {
	width: 160px !important; /* Force the width regardless of content */
	min-width: 160px;
	max-width: 160px;
	/*padding: 0.5rem 0.5rem;*/ /* Reduce horizontal padding */
	font-size: 0.85rem;
	font-weight: 500;
	color: #495057;
	/*background-color: #f0f2f7;*/
	/*border: 1px solid #dee2e6;*/
	border-bottom: none;
	border-top-left-radius: 0.25rem;
	border-top-right-radius: 0.25rem;
	margin-right: 0;
	transition: all 0.2s ease;
	white-space: nowrap;
	height: 2.5rem;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

    .fixed-width-tab:hover {
        background-color: #f8f9fa;
        color: #3a4255;
    }

    .fixed-width-tab.active {
        color: #2c3650;
        background-color: #ffffff;
        border-color: #c0c6d0 #c0c6d0 #ffffff;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.025);
        position: relative;
        z-index: 1;
    }

        .fixed-width-tab.active::after {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            right: 0;
            height: 2px;
            background-color: #ffffff;
        }

    .fixed-width-tab i {
        font-size: 0.85rem;
        color: #6c757d;
    }

    .fixed-width-tab.active i {
        color: #4a5568;
    }

/* Adjust the tab-icon-container to be more compact */
.tab-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.25rem;
}

/* Active tab styling for the order ID badge */
.nav-link.active .order-id-badge {
    background-color: #e9ecef;
    border-color: #ced4da;
}
