/**
 * mcPedia - Mush Cana Pedia
 * Custom Styles
 */

/* Root Variables */
:root {
    --mcpedia-primary: #0d6efd;
    --mcpedia-secondary: #6c757d;
    --mcpedia-success: #198754;
    --mcpedia-info: #0dcaf0;
    --mcpedia-warning: #ffc107;
    --mcpedia-danger: #dc3545;
    --mcpedia-light: #f8f9fa;
    --mcpedia-dark: #212529;
}

/* General Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
}

/* Cards */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    font-weight: 600;
}

/* Wiki Content Styles */
.wiki-content {
    line-height: 1.7;
}

.wiki-content h1 {
    font-size: 1.75rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.wiki-content h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.3rem;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.wiki-content h3 {
    font-size: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.wiki-content h4,
.wiki-content h5,
.wiki-content h6 {
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.wiki-content p {
    margin-bottom: 1rem;
}

.wiki-content ul,
.wiki-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.wiki-content blockquote {
    border-left: 4px solid var(--mcpedia-primary);
    padding-left: 1rem;
    margin-left: 0;
    color: var(--mcpedia-secondary);
    font-style: italic;
}

.wiki-content pre {
    background: var(--mcpedia-light);
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
}

.wiki-content code {
    background: var(--mcpedia-light);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.wiki-content pre code {
    background: none;
    padding: 0;
}

.wiki-content table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.wiki-content th,
.wiki-content td {
    border: 1px solid #dee2e6;
    padding: 0.5rem;
}

.wiki-content th {
    background: var(--mcpedia-light);
    font-weight: 600;
}

.wiki-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

.wiki-content hr {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 1.5rem 0;
}

/* Article Info Box */
.article-info-box {
    background: var(--mcpedia-light);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Search Results */
.search-highlight {
    background-color: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
}

/* User Avatar */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-lg {
    width: 150px;
    height: 150px;
}

/* Badges */
.badge-role-admin {
    background-color: var(--mcpedia-danger);
}

.badge-role-moderator {
    background-color: var(--mcpedia-warning);
    color: var(--mcpedia-dark);
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.active {
    background-color: var(--mcpedia-success);
}

.status-indicator.inactive {
    background-color: var(--mcpedia-danger);
}

/* Form improvements */
.form-control:focus,
.form-select:focus {
    border-color: var(--mcpedia-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Revision diff styles */
.diff-view {
    font-family: monospace;
    font-size: 0.85rem;
}

.diff-add {
    background-color: #d4edda;
}

.diff-remove {
    background-color: #f8d7da;
}

.diff-change {
    background-color: #fff3cd;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wiki-content h1 {
        font-size: 1.5rem;
    }

    .wiki-content h2 {
        font-size: 1.25rem;
    }

    .card-body {
        padding: 1rem;
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--mcpedia-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Tooltips */
.tooltip-custom {
    position: relative;
}

.tooltip-custom:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mcpedia-dark);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }

    .wiki-content {
        font-size: 12pt;
    }

    a {
        text-decoration: none;
        color: inherit;
    }
}
