/* Custom styles for LinksBook */

/* General */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

/* Cards */
.card {
    border: 1px solid #e9ecef;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* List items */
.list-group-item {
    border-left: 3px solid transparent;
    transition: border-color 0.15s ease-in-out;
}

.list-group-item:hover {
    border-left-color: #0d6efd;
}

.list-group-item-warning {
    border-left-color: #ffc107;
}

/* Badges */
.badge {
    font-size: 0.75em;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
}

.btn-group-vertical .btn {
    border-radius: 0.25rem;
    margin-bottom: 2px;
}

.btn-group-vertical .btn:last-child {
    margin-bottom: 0;
}

/* Pagination */
.pagination {
    margin-bottom: 0;
}

/* Code highlighting */
.highlight {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 0.5rem 0;
}

.highlight pre {
    margin: 0;
    background: transparent;
    border: none;
    padding: 0;
}

/* Markdown content */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

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

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

.markdown-content blockquote {
    border-left: 4px solid #dee2e6;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #6c757d;
}

.markdown-content code {
    background-color: #f8f9fa;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

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

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

.markdown-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-group-vertical {
        display: none;
    }

    .card-body {
        padding: 1rem;
    }

    .display-4 {
        font-size: 2rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Toast notifications */
.toast {
    z-index: 1055;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Search highlighting */
.search-highlight {
    background-color: #fff3cd;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

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

    .card {
        border: 1px solid #000;
        box-shadow: none;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
