/**
 * Quantum Navigator - Company Comparison Styles
 * Dark theme with teal accents (#64ffda)
 */

/* Base Comparison Page Styles */
.comparison-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
    color: #ffffff;
    font-family: 'SUSE Mono', monospace;
}

/* Header Navigation */
.comparison-header {
    background: rgba(26, 26, 46, 0.95);
    border-bottom: 1px solid rgba(100, 255, 218, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.comparison-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-home {
    font-size: 1.25rem;
    font-weight: 700;
    color: #64ffda;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-home:hover {
    color: #ffffff;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #b0c4de;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #64ffda;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: #64ffda;
}

/* Hero Section */
.comparison-hero {
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.1) 0%, rgba(255, 128, 1, 0.05) 100%);
    padding: 3rem 2rem;
    border-bottom: 1px solid rgba(100, 255, 218, 0.2);
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #64ffda 0%, #00c4e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: #b0c4de;
    margin: 0;
}

/* Main Content */
.comparison-main {
    padding: 3rem 2rem;
}

.comparison-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Instructions */
.comparison-instructions {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.comparison-instructions h1 {
    color: #64ffda;
    margin-top: 0;
}

.comparison-instructions h2 {
    color: #00c4e8;
    margin-top: 2rem;
}

.comparison-instructions ul,
.comparison-instructions ol {
    color: #b0c4de;
    line-height: 1.8;
}

/* Section Headers */
.selection-section,
.comparison-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    margin: 0;
    color: #64ffda;
    font-size: 1.75rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'SUSE Mono', monospace;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #64ffda 0%, #00c4e8 100%);
    color: #0a0a1a;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.3);
}

.btn-secondary {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    border: 1px solid #64ffda;
}

.btn-secondary:hover {
    background: rgba(100, 255, 218, 0.2);
}

.btn-outline {
    background: transparent;
    color: #b0c4de;
    border: 1px solid rgba(176, 196, 222, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #b0c4de;
}

/* Company Selectors */
.company-selectors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.company-selector {
    position: relative;
}

.company-search-input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(100, 255, 218, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'SUSE Mono', monospace;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.company-search-input:focus {
    outline: none;
    border-color: #64ffda;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.1);
}

.company-search-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.company-search-input::placeholder {
    color: #666;
}

/* Remove Company Button */
.remove-company-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid rgba(255, 68, 68, 0.5);
    border-radius: 4px;
    color: #ff4444;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-company-btn:hover {
    background: rgba(255, 68, 68, 0.4);
    border-color: #ff4444;
}

/* Suggestions Dropdown */
.company-suggestions {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #1a1a2e;
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.suggestion-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
}

.suggestion-item:hover {
    background: rgba(100, 255, 218, 0.1);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-name {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.suggestion-meta {
    font-size: 0.85rem;
    color: #b0c4de;
    margin-bottom: 0.25rem;
}

.suggestion-categories {
    font-size: 0.8rem;
    color: #64ffda;
}

.no-suggestions {
    padding: 1rem;
    text-align: center;
    color: #666;
}

/* Comparison Table */
.comparison-table-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 12px;
    padding: 2rem;
    overflow-x: auto;
}

.comparison-grid {
    display: grid;
    gap: 0;
    min-width: 600px;
}

/* Base comparison row - will be overridden by specific company counts */
.comparison-row {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: start;
}

/* Explicit column layouts for each company count */
.comparison-grid[data-company-count="2"] .comparison-row {
    grid-template-columns: 200px 1fr 1fr;
}

.comparison-grid[data-company-count="3"] .comparison-row {
    grid-template-columns: 200px 1fr 1fr 1fr;
}

.comparison-grid[data-company-count="4"] .comparison-row {
    grid-template-columns: 200px 1fr 1fr 1fr 1fr;
}

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

.comparison-row.has-differences {
    background: rgba(255, 128, 1, 0.05);
    border-left: 3px solid #ff8001;
}

.comparison-label {
    font-weight: 700;
    color: #64ffda;
    font-size: 0.95rem;
    padding-top: 0.25rem;
}

.comparison-cell {
    color: #b0c4de;
    line-height: 1.6;
}

.description-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #b0c4de;
}

/* Company Link */
.company-link {
    color: #64ffda;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.company-link:hover {
    color: #ffffff;
}

/* Website Link */
.website-link {
    color: #00c4e8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.website-link:hover {
    color: #64ffda;
}

/* Badges */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #64ffda;
    margin: 0.25rem 0.25rem 0.25rem 0;
}

.qubit-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 196, 232, 0.1);
    border: 1px solid rgba(0, 196, 232, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #00c4e8;
}

/* Empty State */
.comparison-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.comparison-empty p {
    font-size: 1.1rem;
    margin: 0;
}

/* Error State */
.comparison-error {
    text-align: center;
    padding: 4rem 2rem;
    color: #ff4444;
}

/* Message Toast */
.comparison-message {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1a1a2e;
    border: 1px solid #64ffda;
    color: #64ffda;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.comparison-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Help Section */
.help-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(100, 255, 218, 0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
}

.help-section h3 {
    color: #64ffda;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-2px);
    border-color: #64ffda;
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.2);
}

.tip-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.tip-card h4 {
    color: #64ffda;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.tip-card p {
    color: #b0c4de;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Back Link */
.back-link-container {
    text-align: center;
    margin: 3rem 0;
}

.back-link {
    display: inline-block;
    color: #64ffda;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #ffffff;
}

/* Footer Styles */
.quantum-footer {
    background: #1a1a2e;
    border-top: 1px solid rgba(100, 255, 218, 0.2);
    padding: 3rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
}

.footer-title {
    color: #64ffda;
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
}

.footer-subtitle {
    color: #00c4e8;
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

.footer-description {
    color: #b0c4de;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: #b0c4de;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #64ffda;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: #666;
    font-size: 0.85rem;
}

.footer-copyright a {
    color: #64ffda;
    text-decoration: none;
}

.footer-scroll-top {
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid #64ffda;
    color: #64ffda;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'SUSE Mono', monospace;
    transition: all 0.3s ease;
}

.footer-scroll-top:hover {
    background: rgba(100, 255, 218, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .comparison-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .comparison-main {
        padding: 2rem 1rem;
    }

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

    .action-buttons {
        width: 100%;
    }

    .btn {
        flex: 1;
        text-align: center;
    }

    .company-selectors {
        grid-template-columns: 1fr;
    }

    .comparison-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .comparison-label {
        font-weight: 700;
        margin-bottom: 0.25rem;
    }

    .comparison-cell {
        margin-bottom: 1rem;
    }

    .description-row {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .comparison-message {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

/* Dark mode scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 255, 218, 0.3);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 255, 218, 0.5);
}
