/* Provider Page Styles - Matching Main Page Design */

/* Page Load Animations */
@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.provider-page > * {
    animation: slideDownFade 0.5s ease-out forwards;
    opacity: 0;
}

/* Stagger animations for different sections */
.provider-page > *:nth-child(1) { animation-delay: 0.1s; }
.provider-page > *:nth-child(2) { animation-delay: 0.2s; }
.provider-page > *:nth-child(3) { animation-delay: 0.3s; }
.provider-page > *:nth-child(4) { animation-delay: 0.4s; }
.provider-page > *:nth-child(5) { animation-delay: 0.5s; }
.provider-page > *:nth-child(6) { animation-delay: 0.6s; }

/* Narrow Container */
.container-narrow {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Auth prompt text */
.provider-auth-prompt {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0 0 20px 0;
    padding: 12px 20px;
    background: rgba(0, 100, 250, 0.05);
    border: 1px solid rgba(0, 100, 250, 0.1);
    border-radius: 10px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.provider-auth-prompt a {
    color: rgb(0, 100, 250);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.provider-auth-prompt a:hover {
    color: rgb(0, 80, 200);
    text-decoration: underline;
}

/* Provider Header Section */
.provider-header-section {
    padding: 48px 0 32px;
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.provider-icon-wrapper {
    flex-shrink: 0;
}

.provider-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.provider-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.provider-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.provider-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.provider-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.5;
}

/* Quick Filters */
.quick-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.quick-filters.llm-only {
    display: none;
}

.quick-filters.llm-only.visible,
.quick-filters.llm-only:not(.llm-only) {
    display: flex;
}

.quick-filters-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.quick-filters .filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-filters .filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.quick-filters .filter-btn.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

.quick-filters .filter-btn svg {
    flex-shrink: 0;
}

/* Organization Filter Buttons */
.org-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.org-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.org-filter:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.org-filter.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

.org-filter .org-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
}

.org-icon-small {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 6px;
    vertical-align: middle;
}

/* Filter Dropdowns */
.provider-filters-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.filters-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.provider-filter-dropdowns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Modern Filter Bar */
.provider-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* Type Tabs */
.provider-type-tabs {
    display: flex;
    gap: 4px;
}

.provider-type-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.provider-type-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.provider-type-tab.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

/* Filter Controls */
.provider-filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Quick Filters */
.provider-quick-filters {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
}

.provider-quick-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.provider-quick-filter:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.provider-quick-filter.active {
    color: white;
    background: var(--primary);
}

.provider-quick-filter svg {
    width: 18px;
    height: 18px;
}

/* Filter Buttons */
.provider-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.provider-filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.provider-filter-btn.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

.provider-filter-btn svg {
    flex-shrink: 0;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border-radius: 9px;
}

/* Reset Button */
.provider-reset-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.provider-reset-btn:hover {
    color: var(--error);
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* Selected Orgs Display */
.provider-selected-orgs {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.selected-orgs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-org-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
}

.selected-org-tag img {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.selected-org-tag .remove-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
}

.selected-org-tag .remove-tag:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.provider-dropdown-wrapper {
    position: relative;
    display: inline-block;
    overflow: visible;
}

.provider-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.provider-dropdown-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.provider-dropdown-btn.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

.provider-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    list-style: none;
}

/* Alternating positioning for adjacent dropdowns to prevent overlap */
.provider-dropdown-wrapper:nth-child(odd) .provider-dropdown-menu {
    left: 0;
    right: auto;
}

.provider-dropdown-wrapper:nth-child(even) .provider-dropdown-menu {
    left: auto;
    right: 0;
}

/* For the first dropdown, ensure it doesn't go off left edge */
.provider-dropdown-wrapper:first-child .provider-dropdown-menu {
    left: 0;
    right: auto;
}

/* For the last dropdown, ensure it doesn't go off right edge */
.provider-dropdown-wrapper:last-child .provider-dropdown-menu {
    left: auto;
    right: 0;
}

.provider-dropdown-menu.hidden {
    display: none;
}

.provider-dropdown-menu li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    color: var(--text-secondary);
    font-size: 13px;
}

.provider-dropdown-menu li:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.provider-dropdown-menu li .checkmark {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.25;
    color: var(--success);
}

.provider-dropdown-menu li .checkmark svg {
    width: 16px;
    height: 16px;
}

.provider-dropdown-menu li img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.provider-dropdown-menu li .search-item {
    padding: 4px 8px;
}

.provider-dropdown-menu li input[type="text"] {
    width: 100%;
    padding: 6px 8px;
    border-radius: 4px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
}

.provider-dropdown-menu li input[type="text"]::placeholder {
    color: var(--text-muted);
}

.provider-dropdown-menu li input[type="text"]:focus {
    outline: none;
    border: 1px solid var(--primary);
}

/* Context Dropdown */
.context-dropdown li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.context-dropdown li .checkmark {
    opacity: 0.25;
}

.context-dropdown li:hover .checkmark {
    opacity: 1;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.filter-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.filter-tab.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

/* Table Container */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.table-container.hidden {
    display: none;
}

/* Price Disclaimer */
.price-disclaimer {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    background: var(--bg-tertiary);
    /* border-bottom: 1px solid var(--border); */
    /* margin: 0 0 12px 0; */
    font-style: italic;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: var(--bg-tertiary);
}

.data-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s ease;
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.data-table td {
    padding: 10px 12px;
    color: var(--text-secondary);
    vertical-align: middle;
}

/* Table Columns */
.col-model { width: 22%; }
.col-id { width: 12%; }
.col-input { width: 8%; }
.col-output { width: 8%; }
.col-func { width: 5%; text-align: center; }
.col-context { width: 7%; }
.col-latency { width: 7%; }
.col-throughput { width: 8%; }

@media (min-width: 769px) and (max-width: 1200px) {
    .col-context { width: 10%; }
}

@media (max-width: 768px) {
    .table-container { overflow-x: auto; }
}

.connect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary);
    border: 1px solid var(--primary);
    color: white;
    cursor: pointer;
    transition: all .2s;
}
.connect-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateX(4px);
}

.connect-btn svg {
    flex-shrink: 0;
}

.cell-action {
    text-align: center;
    vertical-align: middle;
}

/* Sortable columns */
.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover .sortable-wrapper {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.sortable:hover .sort-icon,
.sortable.active .sort-icon {
    opacity: 1;
    color: var(--primary);
}

.sortable-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 100%;
}

.sortable-content {
    font: inherit;
    color: inherit;
    transition: color 0.2s ease;
    flex: 1;
}

.sortable .sort-icon {
    width: 14px;
    height: 14px;
    opacity: 0.5;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Active sort states */
.sortable.active .sortable-wrapper {
    background: rgba(0, 100, 250, 0.08);
}

.sortable.active .sort-icon svg {
    opacity: 1 !important;
    color: var(--primary) !important;
}
.col-context { width: 10%; }
.col-latency { width: 10%; }
.col-throughput { width: 10%; }
.col-quant { width: 5%; }

.col-action { width: 8%; text-align: center; }

/* Hide action column on very small screens */
@media (max-width: 480px) {
    .col-action {
        width: 10%;
    }
}

/* Model Cell */
.cell-provider-model {
    display: flex;
    align-items: center;
    gap: 12px;
}

.provider-model-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.provider-model-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.provider-model-name {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.provider-model-name:hover {
    color: var(--primary);
}

.sla-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
    border-radius: 50%;
    cursor: help;
}

.sale-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 3px;
    cursor: help;
    margin-left: 4px;
    line-height: 1;
    flex-shrink: 0;
}

.cell-id {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.old-price-table {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.6;
    margin-bottom: -2px;
}

.cell-price {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.sale-price {
    color: #22c55e !important;
    font-weight: 700 !important;
}

.cell-context,
.cell-latency,
.cell-throughput,
.cell-quant {
    color: var(--text-secondary);
}

.cell-func {
    text-align: center;
}

.check-icon {
    color: var(--success);
}

.cross-icon {
    color: var(--error);
    opacity: 0.4;
}

/* Compact Table */
.data-table.compact td {
    padding: 12px 16px;
}

.data-table.compact .cell-action {
    padding: 8px;
    text-align: start;
}

.cell-org {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cell-model-compact {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 12px;
}

.model-alias {
    color: var(--text-muted);
}

/* Charts Section */
.charts-section {
    padding: 40px 0;
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.charts-section.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}

.charts-section.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.charts-section.animate-on-scroll .container-narrow {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out 0.2s, transform 0.6s ease-out 0.2s;
}

.charts-section.animate-on-scroll.visible .container-narrow {
    opacity: 1;
    transform: translateY(0);
}

.charts-section.animate-on-scroll .chart-card {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease-out 0.4s, transform 0.6s ease-out 0.4s;
}

.charts-section.animate-on-scroll.visible .chart-card {
    opacity: 1;
    transform: translateY(0);
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-title svg {
    color: var(--primary);
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.chart-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.3);
    border: 1px solid rgba(52, 211, 153, 0.5);
}

.chart-wrapper {
    position: relative;
    height: 350px;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Definitions Section */
.definitions-section {
    padding: 40px 0;
}

.definitions-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.definitions-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.definitions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.definition-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.definition-term {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.definition-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Back Section */
.back-section {
    padding: 32px 0 64px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--primary);
}

.back-link svg {
    transition: transform 0.2s ease;
}

.back-link:hover svg {
    transform: translateX(-4px);
}

/* Responsive */
@media (max-width: 1024px) {
    .container-narrow {
        max-width: 100%;
        padding: 0 20px;
    }

    .data-table {
        font-size: 13px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }

    .col-model { width: 25%; }
    .col-id { width: 20%; }

    .provider-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .provider-type-tabs {
        overflow-x: auto;
        padding-bottom: 8px;
        margin-bottom: 8px;
    }

    .provider-filter-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .provider-header-section {
        padding: 40px 0 32px;
    }

    .provider-header {
        flex-direction: column;
        text-align: center;
    }

    .provider-icon {
        width: 64px;
        height: 64px;
    }

    .provider-title {
        font-size: 1.75rem;
    }

    .provider-type-tabs {
        justify-content: flex-start;
    }

    .provider-type-tab {
        padding: 6px 12px;
        font-size: 12px;
    }

    .provider-filter-btn span:not(.filter-count) {
        display: none;
    }

    .provider-filter-btn {
        padding: 8px;
        position: relative;
        z-index: 10;
        flex-shrink: 0;
    }

    .provider-quick-filters {
        display: flex;
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
        padding: 4px;
        background: var(--bg-tertiary);
        border-radius: var(--radius);
    }

    .provider-filter-controls {
        display: flex;
        justify-content: center;
        width: 100%;
        gap: 8px;
        flex-wrap: wrap;
    }

    .provider-filter-bar {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin: -8px -16px 20px -16px;
        padding: 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        background: var(--bg-card);
        position: relative;
        z-index: 100;
    }

    .provider-dropdown-menu {
        position: fixed;
        left: 16px !important;
        right: 16px !important;
        min-width: auto;
        width: auto;
        max-width: none;
        max-height: 60vh;
        z-index: 10000;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Scrollable table for mobile */
    .table-container {
        overflow-x: auto;
    }

    .data-table {
        min-width: 900px;
    }
}

@media (max-width: 480px) {
    .provider-header {
        gap: 16px;
    }

    .provider-title {
        font-size: 1.5rem;
    }

    .provider-subtitle {
        font-size: 0.875rem;
    }

    .filter-tab {
        padding: 8px 14px;
        font-size: 13px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .chart-card {
        padding: 16px;
    }

    .definitions-card {
        padding: 16px;
    }
}

/* Mobile Filter Overflow Fix */
@media (max-width: 768px) {
    .quick-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 12px;
        margin: -12px -16px 16px -16px;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }

    .quick-filters::-webkit-scrollbar {
        display: none;
    }

    .quick-filters .filter-btn {
        flex-shrink: 0;
    }

    .org-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        margin-bottom: 16px;
    }

    .org-filters::-webkit-scrollbar {
        display: none;
    }

    .org-filter {
        flex-shrink: 0;
    }

    .filter-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        margin: -8px -16px 20px -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-tab {
        flex-shrink: 0;
    }

    .provider-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin: -8px -16px 20px -16px;
        padding: 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .provider-type-tabs {
        justify-content: flex-start;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .provider-type-tabs::-webkit-scrollbar {
        display: none;
    }

    .provider-type-tab {
        flex-shrink: 0;
    }

    .provider-filter-controls {
        justify-content: space-between;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    }
}

@media (max-width: 480px) {
    .provider-header {
        gap: 16px;
    }

    .provider-title {
        font-size: 1.5rem;
    }

    .provider-subtitle {
        font-size: 0.875rem;
    }

    .filter-tab {
        padding: 8px 14px;
        font-size: 13px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .chart-card {
        padding: 16px;
    }

    .definitions-card {
        padding: 16px;
    }
}


/* Hide action column on very small screens */
@media (max-width: 480px) {
    .col-action {
        display: none;
    }
    
    .data-table.compact .col-action {
        display: none;
    }
}

/* Auth prompt responsive */
@media (max-width: 768px) {
    .provider-auth-prompt {
        font-size: 0.875rem;
        padding: 10px 16px;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .provider-auth-prompt {
        font-size: 0.8125rem;
        padding: 10px 12px;
    }
}

/* Model Page Specific Styles */
.provider-page {
    min-height: 100vh;
}

.provider-page .header {
    position: relative;
}

.provider-page .header-search {
    display: flex !important;
}

.provider-page .mobile-search {
    display: none !important;
}

@media (max-width: 768px) {
    .provider-page .header-search {
        display: none !important;
    }
    
    .provider-page .mobile-search {
        display: block !important;
    }
    
    .provider-page .mobile-menu-toggle {
        display: flex !important;
    }
    
    .provider-page .mobile-menu {
        display: block !important;
    }
    
    .provider-page .mobile-menu-overlay {
        display: block !important;
    }
}

.provider-elo {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(0, 100, 250);
    margin: 4px 0 0 0;
}

.model-page-header .provider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.model-page-header .provider-header-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.model-page-header .provider-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.model-page-header .provider-header .primary-button {
    flex-shrink: 0;
}

.model-page-header .provider-tabs-nav {
    padding: 0 24px;
    margin-bottom: 0;
    width: 100%;
    max-width: var(--container-width);
    box-sizing: border-box;
}

.model-page-header .provider-tabs-nav .provider-tab-btn:first-child {
    border-radius: 10px 0 0 0;
}

.model-page-header .provider-tabs-nav .provider-tab-btn:last-of-type {
    border-radius: 0 10px 0 0;
}

.provider-info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .provider-info-cards {
        grid-template-columns: 1fr;
    }
}

.provider-info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
}

.provider-info-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.provider-info-card-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.provider-info-subtext {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

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

.provider-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.provider-info-row:last-child {
    border-bottom: none;
}

.provider-info-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.provider-info-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.provider-modalities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.provider-modalities-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.provider-modalities-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.provider-modalities-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0;
    color: var(--text-muted);
    opacity: 0.4;
}

.provider-modalities-divider svg {
    width: 14px;
    height: 14px;
}

.provider-modality {
    display: flex;
    flex-direction: revert-layer;
    align-items: center;
    gap: 3px;
    padding: 5px 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-muted);
    opacity: 0.4;
    transition: all 0.2s ease;
}

.provider-modality.active {
    opacity: 1;
    background: rgba(0, 100, 250, 0.08);
    border-color: rgba(0, 100, 250, 0.25);
}

.provider-modality.active svg {
    color: var(--primary);
}

.provider-modality.active span {
    color: var(--primary);
    font-weight: 500;
}

.provider-modality svg {
    width: 12px;
    height: 12px;
}

.provider-modality span {
    font-size: 0.5rem;
    font-weight: 400;
}

.provider-modalities-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.provider-modalities-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.provider-modalities-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    color: var(--text-muted);
    opacity: 0.5;
}

.provider-modalities-divider svg {
    width: 16px;
    height: 16px;
}

.provider-modality {
    display: flex;
    flex-direction: revert-layer;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-muted);
    opacity: 0.5;
    transition: all 0.2s ease;
}

.provider-modality.active {
    opacity: 1;
    background: rgba(0, 100, 250, 0.1);
    border-color: rgba(0, 100, 250, 0.3);
}

.provider-modality.active svg {
    color: var(--primary);
}

.provider-modality.active span {
    color: var(--primary);
    font-weight: 500;
}

.provider-modality svg {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.provider-modality span {
    font-size: 0.75rem;
    font-weight: 400;
}

.provider-modalities-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: space-between;
    margin-bottom:6px;
}

.provider-modalities-label-inline {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: auto;
}

.provider-modality-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(0, 100, 250, 0.1);
    border: 1px solid var(--primary);
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--primary);
    text-transform: capitalize;
}

.provider-modality-badge svg {
    width: 12px;
    height: 12px;
    opacity: 0.6;
}

.provider-resolutions-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end; /* выравнивание по левому краю */
}


.resolution-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(0, 100, 250, 0.1);
    border: 1px solid rgba(0, 100, 250, 0.3);
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--primary);
}

.provider-info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 4px;
    cursor: help;
    position: relative;
    color: var(--text-muted);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.provider-info-tooltip:hover {
    opacity: 1;
}

.provider-info-tooltip svg {
    width: 14px;
    height: 14px;
}

.provider-tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.provider-info-tooltip:hover .provider-tooltip-text {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 480px) {
    .provider-modalities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.provider-features-section {
    margin-bottom: 32px;
}

.provider-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.provider-section-title svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.provider-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.provider-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 0.775rem;
    color: var(--text-primary);
}

.provider-feature svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.provider-feature.positive svg {
    color: #34d399;
}

.provider-feature.negative svg {
    color: #f87171;
}

.provider-benchmarks-section {
    margin-bottom: 32px;
}

.provider-benchmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.provider-benchmark-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.provider-benchmark-name {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.provider-benchmark-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.provider-table-section {
    margin-bottom: 32px;
}

.provider-api-section {
    margin-bottom: 32px;
}

.provider-api-steps {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-bottom: 24px;
}

.provider-api-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    flex: 1;
}

.provider-api-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 50%;
    flex-shrink: 0;
}

.provider-api-step h4 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.provider-api-step p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.provider-api-step .highlight {
    color: var(--primary);
    font-weight: 500;
}

.provider-api-commands {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.provider-api-command {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0, 100, 250, 0.1);
    border: 1px solid rgba(0, 100, 250, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
}

.provider-api-command:hover {
    background: rgba(0, 100, 250, 0.15);
    border-color: rgba(0, 100, 250, 0.3);
}

.provider-api-step .primary-button {
    align-self: flex-start;
    margin-top: 8px;
}

.provider-code-section {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
}

.provider-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #0f172a;
    border-bottom: 1px solid #334155;
}

.provider-code-header span {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f8fafc;
}

.provider-code-tabs {
    display: flex;
    gap: 8px;
}

.provider-code-tab {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #94a3b8;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.provider-code-tab:hover {
    color: #f8fafc;
}

.provider-code-tab.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: #334155;
    color: #f8fafc;
}

.provider-code-block-wrapper {
    position: relative;
    padding: 16px;
    padding-right: 100px;
}

.provider-code-block {
    margin: 0;
    padding: 0;
    background: transparent;
    color: #e2e8f0;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.provider-code-copy {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0, 100, 250, 0.2);
    border: 1px solid rgba(0, 100, 250, 0.3);
    border-radius: 6px;
    color: #f8fafc;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.provider-code-copy:hover {
    background: rgba(0, 100, 250, 0.3);
}

.provider-code-copy svg {
    color: rgb(0, 100, 250);
}

.provider-code-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
}

.provider-code-footer a {
    color: var(--primary);
    font-size: 0.875rem;
    text-decoration: none;
}

.provider-code-footer a:hover {
    text-decoration: underline;
}

.provider-other-models-section {
    margin-bottom: 32px;
}

.provider-other-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.provider-other-model-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.provider-other-model-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 100, 250, 0.3);
    transform: translateY(-2px);
}

.provider-other-model-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.provider-other-model-name {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.provider-other-model-link {
    font-size: 0.8125rem;
    color: var(--primary);
}

.provider-back-link {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.provider-back-link a {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.provider-back-link a:hover {
    color: var(--text-primary);
}

.provider-model-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.provider-model-link:hover {
    color: var(--primary);
}

.sla-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 50%;
}

.cell-price {
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .provider-info-cards {
        grid-template-columns: 1fr;
    }
    
    .provider-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .provider-other-models-grid {
        grid-template-columns: 1fr;
    }
    
    .provider-code-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .provider-code-block-wrapper {
        padding-right: 16px;
    }
    
    .provider-code-copy {
        position: static;
        margin-top: 12px;
    }
}

/* Tab Navigation */
.provider-tabs-nav {
    display: flex;
    gap: 0;
    padding: 0 24px;
    margin-bottom: 24px;
    position: relative;
    border-bottom: 1px solid var(--border-light);
}

.provider-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.provider-tab-btn:hover {
    color: var(--text-primary);
}

.provider-tab-btn.active {
    color: var(--primary);
}

.provider-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.provider-tab-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.provider-tab-indicator {
    display: none;
}

@media (max-width: 640px) {
    .provider-tabs-nav {
        padding: 0 16px;
        overflow-x: auto;
    }
    
    .provider-tab-btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
    
    .provider-tab-indicator {
        left: 16px;
    }
}

.provider-tab-content {
    animation: fadeInTab 0.3s ease;
}

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

#api.provider-tab-content {
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
    margin-top: 32px;
}

/* Feature tooltip styles */
.feature-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 6px;
    cursor: help;
    flex-shrink: 0;
}

.feature-tooltip svg {
    color: var(--text-secondary);
    opacity: 0.6;
    width: 16px;
    height: 16px;
}

.feature-tooltip:hover svg {
    opacity: 1;
    color: var(--primary);
}

.feature-tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    right: 0;
    transform: translateX(0);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-light);
    margin-top: 8px;
    z-index: 100;
    max-width: 250px;
    white-space: normal;
    text-align: center;
}

.feature-tooltip:hover .feature-tooltip-text {
    visibility: visible;
    opacity: 1;
}
