/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.4;
    color: #000;
    background-color: #f6f6ef;
    font-size: 11px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #2563eb;
    color: #fff;
    padding: 8px 0;
    border-bottom: 1px solid #2563eb;
}

.logo {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 2px;
}

.logo a {
    color: #fff;
    text-decoration: none;
}

.logo a:hover {
    color: #e5e7eb;
    text-decoration: none;
}

/* Hide SEO text visually but keep it for screen readers and search engines */
.seo-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.tagline {
    font-size: 11px;
    color: #e5e7eb;
}

.data-refresh-notice {
    font-size: 10px;
    color: #dbeafe;
    margin-top: 4px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    display: inline-block;
}

/* Navigation */
.main-nav {
    background: #f6f6ef;
    border-bottom: 1px solid #ccc;
    padding: 0;
}

.main-nav .container {
    display: flex;
    gap: 20px;
}

.nav-link {
    padding: 8px 16px;
    color: #000;
    text-decoration: none;
    font-size: 12px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
}

.nav-link.active {
    font-weight: bold;
    border-bottom-color: #2563eb;
    color: #2563eb;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 11px;
    color: #828282;
    margin-bottom: 15px;
}

.breadcrumbs a {
    color: #828282;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Main Content */
.main {
    padding: 15px 0;
}

/* Filters Section */
.filters {
    background: #fff;
    padding: 10px;
    border: 1px solid #ccc;
    margin-bottom: 30px;
    border-radius: 2px;
    position: relative;
    overflow: visible;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.filters h2 {
    margin: 0;
    color: #000;
    font-size: 13px;
    font-weight: bold;
}

.filters-toggle {
    font-size: 10px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #ccc;
    background: #f8f8f8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filters-toggle:hover {
    background: #f0f0f0;
}

.toggle-icon {
    transition: transform 0.2s ease;
}

.filters-toggle[aria-expanded="false"] .toggle-icon {
    transform: rotate(-90deg);
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 300px;
    opacity: 1;
    position: relative;
}

.filter-container.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.filter-row {
    display: flex;
    gap: 8px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.filter-group label {
    margin-bottom: 2px;
    font-weight: bold;
    color: #000;
    font-size: 10px;
    white-space: nowrap;
}

.filter-group input,
.filter-group select {
    padding: 4px 6px;
    border: 1px solid #ccc;
    font-size: 11px;
    font-family: inherit;
    border-radius: 2px;
    background: #fff;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.filter-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
    padding-top: 4px;
}

/* Buttons */
.btn {
    padding: 4px 8px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    color: #000;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #fff;
    color: #000;
    border-color: #ccc;
}

.btn-secondary:hover {
    background: #f0f0f0;
}

.btn:disabled {
    background: #f0f0f0;
    color: #ccc;
    cursor: not-allowed;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1px;
    margin-bottom: 15px;
    border-bottom: 1px solid #ccc;
}

.tab-btn {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 11px;
    cursor: pointer;
    border-bottom: none;
    font-family: inherit;
    color: #000;
}

.tab-btn.active {
    background: #f6f6ef;
    font-weight: bold;
}

.tab-btn:not(.active):hover {
    background: #f0f0f0;
}

/* Loading and Error States */
.loading,
.error,
.no-results {
    text-align: center;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccc;
    color: #000;
    font-size: 11px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none;
}

/* Multi-select dropdown */
.multi-select-container {
    position: relative;
    width: 100%;
    z-index: 100;
}

.multi-select-dropdown {
    position: relative;
    width: 100%;
}

.multi-select-display {
    padding: 4px 6px;
    border: 1px solid #ccc;
    font-size: 11px;
    font-family: inherit;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    position: relative;
    min-height: 22px;
    line-height: 1.2;
}

.multi-select-display:after {
    content: '▼';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    color: #666;
}

.multi-select-display:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.multi-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.multi-select-dropdown.open .multi-select-options {
    display: block;
}

.multi-select-option {
    padding: 6px 8px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.multi-select-option:hover {
    background: #f0f0f0;
}

.multi-select-option input[type="checkbox"] {
    margin: 0;
    width: 12px;
    height: 12px;
    cursor: pointer;
}

.multi-select-option span {
    flex: 1;
    user-select: none;
}

.multi-select-search {
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.multi-select-search input {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ccc;
    font-size: 11px;
    font-family: inherit;
    border-radius: 2px;
    background: #fff;
    box-sizing: border-box;
}

.multi-select-search input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.multi-select-list {
    max-height: 450px;
    overflow-y: auto;
}

.multi-select-clear-all {
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.clear-all-btn {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 10px;
    font-family: inherit;
    color: #666;
    cursor: pointer;
    border-radius: 2px;
    text-align: center;
}

.clear-all-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Availability Disclaimer */
.availability-disclaimer {
    background: #fdf5dc;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 8px;
    margin: 15px 0;
    text-align: center;
}

.availability-disclaimer p {
    margin: 0;
    font-size: 10px;
    color: #856404;
    line-height: 1.4;
}

.availability-disclaimer strong {
    color: #212529;
}

/* Plans Table */
.plans-table-container {
    background: #fff;
    border: 1px solid #ccc;
}

.plans-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.plans-table th {
    background: #f0f0f0;
    padding: 6px 4px;
    text-align: left;
    font-weight: bold;
    color: #000;
    border-bottom: 1px solid #ccc;
    white-space: nowrap;
    font-size: 10px;
}

.plans-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.plans-table th.sortable:hover {
    background: #e8e8e8;
}

.sort-icon {
    margin-left: 4px;
    color: #828282;
    font-size: 8px;
}

.plans-table td {
    padding: 4px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.plans-table tbody tr:hover {
    background-color: #fffbf0;
}

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

/* Table cell specific styling */
.provider-cell {
    font-weight: bold;
    color: #000;
}

.provider-link {
    color: #000;
    text-decoration: none;
    font-weight: bold;
}

.provider-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.provider-link:visited {
    color: #828282;
}

.plan-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #000;
}

.speed-cell {
    font-family: inherit;
    color: #000;
}

.price-cell {
    font-weight: bold;
    color: #000;
    text-align: center;
}

.promo-cell {
    background: #e6f3ff;
    color: #000;
    padding: 2px 4px;
    text-align: center;
}

.promo-cell.no-promo {
    background: transparent;
    color: #828282;
}

.promo-price-cell {
    font-weight: bold;
    color: #2563eb;
    text-align: center;
}

.promo-price-cell.no-promo {
    color: #828282;
    font-weight: normal;
}

.savings-cell {
    font-weight: bold;
    color: #009900;
    text-align: right;
}

.contract-cell {
    text-align: center;
    color: #828282;
}

.setup-cell {
    text-align: right;
    color: #000;
}

.setup-cell.has-fee {
    color: #cc0000;
}

.data-cell {
    text-align: center;
    color: #828282;
}

/* Deal indicator */
.deal-row {
    background-color: #eff6ff !important;
    border-left: 3px solid #2563eb;
}

.deal-row:hover {
    background-color: #dbeafe !important;
}

/* Table Loading Overlay */
#table-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.table-loading-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #666;
}

.table-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background: #f0f0f0;
    border-top: 1px solid #ccc;
}

.pagination #page-info {
    font-weight: normal;
    color: #000;
    font-size: 11px;
}

.pagination #page-size {
    padding: 4px;
    border: 1px solid #ccc;
    font-size: 11px;
    font-family: inherit;
}

/* Intro Content Section */
.intro-content {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 2px;
}

.intro-content h2 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #000;
}

.intro-content h3 {
    font-size: 14px;
    margin: 16px 0 8px 0;
    color: #000;
}

.intro-content p {
    line-height: 1.6;
    margin-bottom: 12px;
    color: #333;
}

.deal-types {
    margin-top: 16px;
}

.deal-types ul {
    list-style: none;
    padding-left: 0;
}

.deal-types li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.deal-types li:last-child {
    border-bottom: none;
}

.deal-types strong {
    color: #000;
}

/* FAQ Section */
.faq-section {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #ccc;
    border-radius: 2px;
}

.faq-section h2 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #000;
}

.faq-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    font-size: 13px;
    margin-bottom: 8px;
    color: #000;
}

.faq-item p {
    line-height: 1.6;
    color: #333;
    font-size: 12px;
}

/* Static content indicator */
.static-content {
    opacity: 0.8;
}

/* Footer */
.footer {
    background: #fff;
    color: #828282;
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
    border-top: 1px solid #ccc;
    font-size: 10px;
}

.footer-nav {
    margin-top: 8px;
}

.footer-nav a {
    color: #828282;
    text-decoration: none;
    margin: 0 4px;
}

.footer-nav a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .header {
        padding: 6px 0;
    }

    .logo {
        font-size: 16px;
    }

    .tagline {
        font-size: 10px;
    }

    .data-refresh-notice {
        font-size: 9px;
        margin-top: 3px;
        padding: 2px 4px;
    }

    .main {
        padding: 10px 0;
    }

    .filters {
        padding: 8px;
        margin-bottom: 8px;
    }

    .filters h2 {
        font-size: 12px;
    }

    .filters-header {
        margin-bottom: 6px;
    }

    .filters-toggle {
        font-size: 9px;
        padding: 3px 6px;
    }

    .filter-row {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }

    .filter-group {
        flex: none;
        width: 100%;
        align-items: stretch;
    }

    .filter-group label {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .filter-group input,
    .filter-group select {
        padding: 6px 4px;
        font-size: 11px;
        width: 100%;
        box-sizing: border-box;
    }

    .filter-actions {
        justify-content: center;
        padding-top: 8px;
    }

    .filter-container {
        max-height: none;
    }

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

    .tabs {
        flex-wrap: wrap;
        gap: 0;
        margin-bottom: 10px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
        flex: 1;
        min-width: 120px;
    }

    /* Mobile table - make it scrollable horizontally */
    .plans-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .plans-table {
        min-width: 600px;
        font-size: 10px;
    }

    .plans-table th {
        padding: 6px 3px;
        font-size: 9px;
    }

    .plans-table td {
        padding: 6px 3px;
    }

    .provider-cell {
        min-width: 80px;
    }

    .plan-cell {
        min-width: 140px;
        max-width: 170px;
    }

    .speed-cell {
        min-width: 60px;
    }

    .price-cell {
        min-width: 50px;
    }

    .promo-cell {
        min-width: 80px;
        padding: 2px 1px;
    }

    .contract-cell,
    .setup-cell,
    .data-cell {
        min-width: 50px;
    }

    .pagination {
        padding: 6px;
        flex-wrap: wrap;
        gap: 4px;
    }

    .pagination #page-info {
        font-size: 10px;
        order: 3;
        flex-basis: 100%;
        text-align: center;
        margin-top: 4px;
    }

    .pagination #page-size {
        font-size: 10px;
        padding: 4px;
    }

    .pagination .btn {
        font-size: 10px;
        padding: 4px 6px;
    }

    .loading,
    .error,
    .no-results {
        padding: 15px;
        font-size: 12px;
    }

    .spinner {
        width: 16px;
        height: 16px;
        margin: 0 auto 8px;
    }

    .table-loading-content {
        font-size: 10px;
        gap: 6px;
    }

    .table-loading-spinner {
        width: 12px;
        height: 12px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .container {
        padding: 0 5px;
    }

    .logo {
        font-size: 14px;
    }

    .tagline {
        font-size: 9px;
    }

    .data-refresh-notice {
        font-size: 8px;
        margin-top: 2px;
        padding: 1px 3px;
    }

    .filters h2 {
        font-size: 11px;
    }

    .tab-btn {
        font-size: 11px;
        padding: 6px 8px;
        min-width: 100px;
    }

    .plans-table {
        min-width: 500px;
        font-size: 9px;
    }

    .plans-table th {
        font-size: 8px;
        padding: 4px 2px;
    }

    .plans-table td {
        padding: 4px 2px;
    }

    .provider-cell {
        min-width: 70px;
    }

    .plan-cell {
        min-width: 120px;
        max-width: 140px;
    }

    .pagination .btn {
        font-size: 9px;
        padding: 3px 5px;
    }

    .pagination #page-info {
        font-size: 9px;
    }
}