/* Wikipedia-like styling for the bariatric surgery directory */

/* Base typography and layout */
.wiki-style {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #202122;
}

/* Wikipedia-style content boxes */
.wiki-content {
    background: #ffffff;
    border: 1px solid #a7d7f9;
    border-radius: 0;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.wiki-content h2 {
    font-family: 'Linux Libertine','Georgia','Times',serif;
    font-size: 1.8rem;
    font-weight: 400;
    border-bottom: 1px solid #a2a9b1;
    margin-bottom: 0.5rem;
    padding-bottom: 0.2rem;
}

.wiki-content h3 {
    font-family: 'Linux Libertine','Georgia','Times',serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Wikipedia-style sidebar */
.wiki-sidebar {
    background: #f8f9fa;
    border: 1px solid #a2a9b1;
    border-radius: 0;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.wiki-sidebar h3 {
    background: #eaecf0;
    margin: -1rem -1rem 0.5rem -1rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #a2a9b1;
}

.wiki-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wiki-sidebar li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #eaecf0;
}

.wiki-sidebar li:last-child {
    border-bottom: none;
}

/* Provider cards with Wikipedia styling */
.provider-card {
    background: #ffffff;
    border: 1px solid #c8ccd1;
    border-radius: 0;
    margin-bottom: 1rem;
    padding: 1.5rem;
    position: relative;
}

.provider-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #3b82f6;
}

/* Search highlighting */
.search-highlight {
    background-color: #ffeb3b;
    color: #000;
    padding: 0.1em 0.2em;
    border-radius: 2px;
    font-weight: 600;
}

/* Featured badge */
.featured-badge {
    background: linear-gradient(45deg, #f59e0b, #fbbf24);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Rating stars */
.fa-star,
.fa-star-half-alt {
    font-size: 0.9rem;
}

/* Links */
a {
    color: #0645ad;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: #0b0080;
}

/* Buttons */
.btn-wiki {
    background: #ffffff;
    border: 1px solid #a2a9b1;
    border-radius: 0;
    color: #202122;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-wiki:hover {
    background: #f8f9fa;
    border-color: #72777d;
}

.btn-wiki-primary {
    background: #36c;
    border: 1px solid #36c;
    color: #ffffff;
}

.btn-wiki-primary:hover {
    background: #447ff5;
    border-color: #447ff5;
}

/* Form elements */
input[type="text"],
input[type="search"],
select {
    border: 1px solid #a2a9b1;
    border-radius: 0;
    padding: 0.5rem;
    font-size: 0.875rem;
    background: #ffffff;
}

input[type="text"]:focus,
input[type="search"]:focus,
select:focus {
    outline: none;
    border-color: #36c;
    box-shadow: 0 0 0 1px #36c;
}

/* Statistics grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.stat-item {
    background: #f8f9fa;
    border: 1px solid #a2a9b1;
    padding: 1rem;
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: #36c;
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: #54595d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive design */
@media (max-width: 768px) {
    .wiki-style {
        font-size: 16px;
    }
    
    .wiki-content {
        padding: 1rem;
    }
    
    .wiki-content h2 {
        font-size: 1.5rem;
    }
    
    .provider-card {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Print styles */
@media print {
    .wiki-sidebar {
        display: none;
    }
    
    .provider-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .featured-badge {
        background: #f59e0b !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .provider-card {
        transition: none;
    }
    
    .provider-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .wiki-content {
        border: 2px solid #000;
    }
    
    .wiki-sidebar {
        border: 2px solid #000;
    }
    
    .provider-card {
        border: 2px solid #000;
    }
    
    .search-highlight {
        background-color: #ffff00;
        color: #000;
        border: 1px solid #000;
    }
}