/* Visually separate Linux and Windows price columns in the VM table */
#vm-table th.linux-windows-separator, #vm-table td.linux-windows-separator {
  border-right: 4px solid #0078d4; /* Azure blue, adjust as needed */
  background: #f3fafd;
}
/* Sticky table headers for VM table */
#vm-table thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  box-shadow: 0 2px 2px -1px rgba(0,0,0,0.04);
}

body {
    background-color: #f8f9fa;
}

/* Expand the VM table card and table to use more of the screen width */
.container-fluid {
    padding-left: 2vw;
    padding-right: 2vw;
}

/* VM results card specific styles */
.vm-results-card {
    max-width: 100vw;
}

.vm-results-body {
    width: 100%;
}

.vm-table-container {
    width: 100%;
}

.card.w-100 {
    width: 100% !important;
    max-width: 100vw !important;
}

.table-responsive {
    width: 100% !important;
    overflow-x: auto;
}

#vm-table {
    width: 100% !important;
    min-width: 1200px;
}

/* Price column specific styles */
.price-col, 
.price-col td {
    min-width: 110px;
    white-space: nowrap;
}

.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.table th {
    background-color: #f8f9fa;
}

.pagination {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.vm-price {
    font-family: monospace;
    font-weight: 500;
}

.best-price {
    background-color: #e6f7e6;
    color: #0a6b0a;
    font-weight: bold;
}

.savings {
    font-weight: bold;
    color: #0a6b0a;
}

/* Sortable table headers */
.sortable {
    cursor: pointer;
    position: relative;
    -webkit-user-select: none; /* Safari 3+ */
    user-select: none;
}

.sort-icons {
    display: inline-flex;
    flex-direction: column;
    margin-left: 4px;
    line-height: 0.6;
}

.sort-icon {
    display: block;
    font-size: 10px;
    color: #ccc;
    opacity: 0.5;
}

.sort-icon.active {
    color: #0078d4;
    opacity: 1;
    font-weight: bold;
}

/* Loading state for buttons */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading:after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: calc(50% - 0.5rem);
    left: calc(50% - 0.5rem);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Column visibility dropdown */
.dropdown-menu {
    max-height: 500px;
    overflow-y: auto;
}

.dropdown-menu .form-check {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.dropdown-menu .form-check-label {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.dropdown-menu .form-check-input {
    cursor: pointer;
}

/* VM name tooltip styling */
.vm-name-tooltip {
    cursor: help;
    text-decoration: underline dotted;
    text-decoration-color: #0078d4;
    text-underline-offset: 3px;
}

.vm-name-tooltip:hover {
    color: #0078d4;
}

/* Bootstrap tooltip customization */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    max-width: 400px;
    text-align: left;
    padding: 0.75rem 1rem;
    background-color: #2d2d2d;
}

/* Top scroll bar for table */
.table-scroll-top-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 10px;
    height: 20px;
}

.table-scroll-top-content {
    height: 1px;
}

/* MCP badge */
.mcp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    margin-top: 4px;
    background: linear-gradient(135deg, #0078d4, #005a9e);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mcp-badge:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.5);
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    /* Make sure table headers are visible on small screens */
    .table th {
        white-space: nowrap;
    }
    
    /* Stack filters on mobile */
    .card-body .row .col-md-3,
    .card-body .row .col-md-6 {
        margin-bottom: 0.75rem;
    }
    
    /* Make export button smaller on mobile */
    #export-csv {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}
