/* Custom styles untuk NLM Classification */

/* Styling untuk note links */
.note-content a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 4px;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 4px;
}

.note-content a:hover {
    background-color: #0d6efd;
    color: white;
    text-decoration: none;
}

/* Styling untuk tombol schedule */
.schedule-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.schedule-btn {
    min-width: 80px;
    text-align: center;
    transition: all 0.3s ease;
}

.schedule-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Styling untuk breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    list-style: none;
    border-radius: 0.25rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
}

/* Animasi untuk scroll button */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.btn-scroll-top {
    animation: pulse 2s infinite;
    box-shadow: 0 2px 10px rgba(0,123,255,0.5);
}

/* Styling untuk tabel hierarki */
.tree-indent {
    display: inline-block;
    width: 20px;
}

.tree-indent.level-1 { margin-left: 20px; }
.tree-indent.level-2 { margin-left: 40px; }
.tree-indent.level-3 { margin-left: 60px; }
.tree-indent.level-4 { margin-left: 80px; }
.tree-indent.level-5 { margin-left: 100px; }

/* Styling untuk card klasifikasi */
.class-card {
    border-left: 4px solid #0d6efd;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.class-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: translateX(5px);
}

/* Styling untuk dark mode */
[data-theme="dark"] .card {
    background-color: #2d2d2d;
    border-color: #404040;
}

[data-theme="dark"] .table {
    color: #f8f9fa;
}

[data-theme="dark"] .table-striped>tbody>tr:nth-of-type(odd) {
    color: #f8f9fa;
    background-color: rgba(255,255,255,0.05);
}

[data-theme="dark"] .breadcrumb {
    background-color: #2d2d2d;
}

[data-theme="dark"] .breadcrumb-item a {
    color: #6ea8fe;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: #adb5bd;
}

[data-theme="dark"] .note-content a {
    background-color: rgba(110, 168, 254, 0.2);
}

/* Loading spinner */
.spinner-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

[data-theme="dark"] .spinner-wrapper {
    background: rgba(0,0,0,0.8);
}

/* Print styles */
@media print {
    .navbar, .btn-scroll-top, .footer, .btn {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* Dark mode untuk elemen-elemen spesifik */
[data-theme="dark"] {
    color-scheme: dark;
}

/* Pastikan body dan html mengambil warna background */
html, body {
    min-height: 100vh;
    background-color: var(--bg-color);
}

/* Dark mode untuk scrollbar (opsional) */
[data-theme="dark"]::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

[data-theme="dark"]::-webkit-scrollbar-track {
    background: #1e1e1e;
}

[data-theme="dark"]::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 6px;
}

[data-theme="dark"]::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Dark mode untuk selection */
[data-theme="dark"]::selection {
    background: var(--link-color);
    color: white;
}

/* Dark mode untuk focus ring */
[data-theme="dark"] :focus {
    outline-color: var(--link-color);
}

/* Dark mode untuk table row yang dipilih */
[data-theme="dark"] .table .selected {
    background-color: rgba(96, 165, 250, 0.2) !important;
}

/* Dark mode untuk card footer */
[data-theme="dark"] .card-footer {
    background-color: var(--card-bg);
    border-top-color: var(--border-color);
}

/* Dark mode untuk jumbotron */
[data-theme="dark"] .jumbotron {
    background-color: var(--card-bg);
}

/* Dark mode untuk well */
[data-theme="dark"] .well {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

/* Dark mode untuk thumbnail */
[data-theme="dark"] .thumbnail {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

/* Dark mode untuk panel */
[data-theme="dark"] .panel {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

.panel-heading {
    background-color: var(--table-header-bg);
    color: white;
}

/* Dark mode untuk popover */
[data-theme="dark"] .popover {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

.popover-header {
    background-color: var(--table-header-bg);
    color: white;
    border-bottom-color: var(--border-color);
}

.popover-body {
    color: var(--text-color);
}

/* Dark mode untuk carousel */
[data-theme="dark"] .carousel-control-prev-icon,
[data-theme="dark"] .carousel-control-next-icon {
    background-color: var(--table-header-bg);
    border-radius: 50%;
    padding: 20px;
}

[data-theme="dark"] .carousel-indicators button {
    background-color: var(--text-color);
}

[data-theme="dark"] .carousel-indicators button.active {
    background-color: var(--link-color);
}

/* Dark mode untuk nav tabs */
[data-theme="dark"] .nav-tabs {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .nav-tabs .nav-link {
    color: var(--text-color);
}

[data-theme="dark"] .nav-tabs .nav-link:hover {
    border-color: var(--border-color);
}

[data-theme="dark"] .nav-tabs .nav-link.active {
    background-color: var(--card-bg);
    color: var(--link-color);
    border-color: var(--border-color) var(--border-color) var(--card-bg);
}

/* Dark mode untuk nav pills */
[data-theme="dark"] .nav-pills .nav-link {
    color: var(--text-color);
}

[data-theme="dark"] .nav-pills .nav-link.active {
    background-color: var(--table-header-bg);
    color: white;
}

/* Mobile Responsive Enhancements */

/* Tablet (768px - 992px) */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .modern-card {
        padding: 1rem;
    }
    
    h1.display-4 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    /* Typography */
    h1.display-4 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    h5 {
        font-size: 1rem;
    }
    
    h6 {
        font-size: 0.9rem;
    }
    
    p, .lead {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Cards */
    .modern-card {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    /* Schedule buttons */
    .d-flex.flex-wrap.gap-2 {
        gap: 0.25rem !important;
    }
    
    .schedule-btn {
        min-width: 45px;
        font-size: 11px;
        padding: 0.2rem 0.4rem;
        margin: 1px;
    }
    
    /* Quick stats */
    .col-md-4 .modern-card {
        padding: 0.75rem 0.5rem;
    }
    
    .col-md-4 .modern-card i {
        font-size: 1.5rem !important;
    }
    
    .col-md-4 .modern-card h2 {
        font-size: 1.2rem;
    }
    
    .col-md-4 .modern-card h5 {
        font-size: 0.8rem;
    }
    
    /* Tables */
    .table-responsive {
        margin: 0 -0.75rem;
        width: calc(100% + 1.5rem);
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .table th, .table td {
        padding: 0.5rem 0.25rem;
        white-space: normal;
    }
    
    .table .btn-sm {
        padding: 0.2rem 0.3rem;
        font-size: 0.7rem;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.8rem;
        padding: 0.5rem 0;
    }
    
    /* Footer */
    .modern-footer {
        padding: 2rem 0 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-col h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .footer-links li {
        margin-bottom: 0.5rem;
    }
    
    .footer-contact li {
        font-size: 0.85rem;
    }
    
    /* Developer section */
    .developer-card {
        padding: 1.5rem;
    }
    
    .developer-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .developer-card h3 {
        font-size: 1.3rem;
    }
    
    .developer-card p {
        font-size: 0.85rem;
    }
    
    /* About section */
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-item {
        padding: 1rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .feature-item h3 {
        font-size: 1.1rem;
    }
    
    .feature-item p {
        font-size: 0.85rem;
    }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
    body {
        padding-top: 55px;
    }
    
    .modern-navbar {
        height: 55px;
    }
    
    .sticky-search {
        top: 55px;
    }
    
    .brand-text {
        font-size: 1rem !important;
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
    }
    
    .logo-icon i {
        font-size: 16px;
    }
    
    h1.display-4 {
        font-size: 1.5rem;
    }
    
    .schedule-btn {
        min-width: 38px;
        font-size: 10px;
    }
    
    .btn-group-sm .btn {
        padding: 0.15rem 0.25rem;
        font-size: 0.65rem;
    }
    
    /* Hide extra text on very small screens */
    .d-none.d-sm-inline {
        display: none !important;
    }
}