/**
 * AIO Comparison Table
 * Public CSS
 */

:root {
    --aio-gray-50: #f9fafb;
    --aio-gray-100: #f3f4f6;
    --aio-gray-200: #e5e7eb;
    --aio-gray-300: #d1d5db;
    --aio-gray-500: #6b7280;
    --aio-gray-600: #4b5563;
    --aio-gray-700: #374151;
    --aio-gray-800: #1f2937;
    --aio-gray-900: #111827;
    
    --aio-blue-50: #eff6ff;
    --aio-blue-100: #dbeafe;
    --aio-blue-200: #bfdbfe;
    --aio-blue-300: #93c5fd;
    --aio-blue-500: #3b82f6;
    --aio-blue-600: #2563eb;
    --aio-blue-700: #1d4ed8;
    --aio-blue-800: #1e40af;
    --aio-blue-900: #1e3a8a;
    
    --aio-red-500: #ef4444;
    --aio-green-500: #22c55e;
}

/* Container */
.aio-comparison-table {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.aio-comparison-table * {
    box-sizing: border-box;
}

/* Header */
.aio-comparison-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.aio-comparison-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--aio-gray-900);
    margin-bottom: 0.5rem;
}

.aio-comparison-header p {
    font-size: 1.125rem;
    color: var(--aio-gray-600);
    margin-bottom: 0.5rem;
}

.aio-comparison-header .aio-highlight {
    font-size: 1rem;
    color: var(--aio-blue-600);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Desktop Table */
.aio-desktop-table {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 0;
}

/* Show desktop table on medium and large screens, hide on mobile */
@media (max-width: 767px) {
    .aio-desktop-table {
        display: none;
    }
}

.aio-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
    padding: 0;
}

.aio-table th,
.aio-table td {
    padding: 1.5rem;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--aio-gray-200);
}

/* Remove bottom border from last row */
.aio-table tbody tr:last-child td {
    border-bottom: none;
}

/* Header Row */
.aio-table thead th {
    background-color: var(--aio-gray-600);
    color: white;
    font-weight: 700;
    border: none;
}

.aio-table thead th:first-child {
    background-color: var(--aio-gray-200);
    color: var(--aio-gray-900);
}

.aio-table thead th[data-column="aioCloud"] {
    background-color: var(--aio-blue-600);
}

.aio-table thead th[data-column="aioTeam"] {
    background-color: var(--aio-blue-800);
}

.aio-table thead tr:last-child th {
    padding: 0.5rem;
    background-color: var(--aio-gray-500);
    font-weight: normal;
    font-size: 0.875rem;
}

.aio-table thead tr:last-child th[data-subcolumn="aioCloud"] {
    background-color: var(--aio-blue-500);
}

.aio-table thead tr:last-child th[data-subcolumn="aioTeam-0"] {
    background-color: var(--aio-blue-600);
}

.aio-table thead tr:last-child th[data-subcolumn="aioTeam-1"] {
    background-color: var(--aio-blue-800);
}

/* Table Body */
.aio-table tbody tr:nth-child(even) {
    background-color: var(--aio-gray-50);
}

.aio-table tbody tr:nth-child(odd) {
    background-color: white;
}

.aio-table tbody tr:last-child {
    border-bottom: 0;
}

.aio-table tbody td:first-child {
    background-color: var(--aio-gray-200);
    font-weight: 700;
    color: var(--aio-gray-900);
}

.aio-table td[data-column="aioCloud"] {
    background-color: var(--aio-blue-50);
    color: var(--aio-blue-900);
}

.aio-table td[data-column="aioTeam-0"] {
    background-color: var(--aio-blue-100);
    color: var(--aio-blue-900);
}

.aio-table td[data-column="aioTeam-1"] {
    background-color: var(--aio-blue-200);
    color: var(--aio-blue-900);
    font-weight: 500;
}

/* Fix for the empty row at the bottom */
.aio-table tbody tr:last-child td {
    border-bottom: none;
    padding-bottom: 1.5rem;
}

/* Mobile Tables - Scrollable View (Now hidden by default) */
.aio-mobile-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    display: none;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Mobile table similar to desktop but scrollable (kept for reference, but hidden) */
.aio-mobile-table {
    min-width: 650px; /* Ensure table is wider than most mobile screens to force scrolling */
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
}

.aio-mobile-table th,
.aio-mobile-table td {
    padding: 1rem;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--aio-gray-200);
    white-space: nowrap;
}

.aio-mobile-table tbody tr:last-child td {
    border-bottom: none;
    padding-bottom: 1rem;
}

.aio-mobile-table thead th {
    background-color: var(--aio-gray-600);
    color: white !important; /* Force white text in all mobile headers */
    font-weight: 700;
    border: none;
}

.aio-mobile-table thead th:first-child {
    background-color: var(--aio-gray-200);
    color: var(--aio-gray-900) !important;
    position: sticky;
    left: 0;
    z-index: 1;
}

.aio-mobile-table tbody td:first-child {
    background-color: var(--aio-gray-200);
    font-weight: 700;
    color: var(--aio-gray-900);
    position: sticky;
    left: 0;
    z-index: 1;
}

.aio-mobile-table thead th[data-column="aioCloud"] {
    background-color: var(--aio-blue-600);
}

.aio-mobile-table th[data-column="aioTeam"] {
    background-color: var(--aio-blue-800);
}

.aio-mobile-table thead tr:last-child th {
    padding: 0.5rem;
    background-color: var(--aio-gray-500);
    font-weight: normal;
    font-size: 0.875rem;
}

.aio-mobile-table thead tr:last-child th[data-subcolumn="aioCloud"] {
    background-color: var(--aio-blue-500);
}

.aio-mobile-table thead tr:last-child th[data-subcolumn="aioTeam-0"] {
    background-color: var(--aio-blue-600);
}

.aio-mobile-table thead tr:last-child th[data-subcolumn="aioTeam-1"] {
    background-color: var(--aio-blue-800);
}

.aio-mobile-table td[data-column="aioCloud"] {
    background-color: var(--aio-blue-50);
    color: var(--aio-blue-900);
}

.aio-mobile-table td[data-column="aioTeam-0"] {
    background-color: var(--aio-blue-100);
    color: var(--aio-blue-900);
}

.aio-mobile-table td[data-column="aioTeam-1"] {
    background-color: var(--aio-blue-200);
    color: var(--aio-blue-900);
    font-weight: 500;
}

/* Mobile Cards - Optimized mobile display */
.aio-mobile-cards {
    display: none;
}

/* Show cards on mobile only */
@media (max-width: 767px) {
    .aio-mobile-cards {
        display: block;
    }
}

.aio-card {
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid var(--aio-gray-200);
}

.aio-card-header {
    padding: 1rem;
    text-align: center;
    background-color: var(--aio-gray-600);
    color: white !important;
}

.aio-card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: white !important;  /* Explicitly set color for company names */
}

.aio-card-header p {
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
    color: white !important;  /* Explicitly set color for subtitle */
}

.aio-card-header.aio-cloud {
    background-color: var(--aio-blue-600);
}

.aio-card-header.aio-team {
    background-color: var(--aio-blue-800);
}

.aio-card-subheader {
    padding: 0.75rem;
    text-align: center;
    font-weight: 500;
    border-bottom: 1px solid var(--aio-gray-200);
}

.aio-card-subheader.aio-cloud {
    background-color: var(--aio-blue-50);
    color: var(--aio-blue-700);
    border-bottom-color: var(--aio-blue-200);
}

.aio-card-subheader.aio-team-1 {
    background-color: var(--aio-blue-100);
    color: var(--aio-blue-700);
    border-bottom-color: var(--aio-blue-200);
}

.aio-card-subheader.aio-team-2 {
    background-color: var(--aio-blue-200);
    color: var(--aio-blue-800);
    border-bottom-color: var(--aio-blue-300);
}

.aio-card-body {
    background-color: white;
}

.aio-card-row {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid var(--aio-gray-200);
}

.aio-card-row:last-child {
    border-bottom: none;
}

.aio-card-row:nth-child(even) {
    background-color: var(--aio-gray-50);
}

.aio-card-label {
    width: 50%;
    font-weight: 500;
    color: var(--aio-gray-700);
    text-align: left;
}

.aio-card-value {
    width: 50%;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.aio-card-value.aio-cloud-value {
    color: var(--aio-blue-600);
    font-weight: 500;
}

.aio-card-value.aio-team-1-value {
    color: var(--aio-blue-600);
    font-weight: 500;
}

.aio-card-value.aio-team-2-value {
    color: var(--aio-blue-800);
    font-weight: 500;
}

/* Icons */
.aio-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
}

.aio-check {
    color: var(--aio-green-500);
}

.aio-x {
    color: var(--aio-red-500);
}

/* Logo */
.aio-logo {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    vertical-align: middle;
}

.aio-text-center {
    text-align: center;
}

.aio-mode-info {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.875rem;
}

/* Scroll indicator for mobile (now hidden since we're using cards) */
.aio-scroll-indicator {
    display: none;
    text-align: center;
    font-size: 0.875rem;
    color: var(--aio-gray-600);
    margin-bottom: 0.5rem;
    animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Hide all empty rows in tables */
tr.empty-row {
    display: none !important;
}