/* ============================================
   External Dictionary Tabs - Minimalistic Style
   ============================================ */

/* Header bar combining h5 and tabs */
.dict-header {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #dee2e6
}

/* Dictionary section headers (CAD/AHw titles) */
.dict-header h5 {
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* CAD header uses CAD font, AHw header uses AHw font */
.other-dictionaries > div > div:first-child .dict-header h5 {
    font-family: var(--cad-font-family);
}
.other-dictionaries > div > div:last-child .dict-header h5 {
    font-family: var(--ahw-font-family);
}

/* Container for the entire tab system */
.external-dict-tabs {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Tab navigation container */
.nav-tabs {
    display: flex;
    flex: 1;
    gap: 0;
    margin: 0 !important;
    padding: 0;
    border: none !important;
    border-bottom: 1px solid #dee2e6;
}

/* Individual tab items */
.nav-tabs .nav-item {
    margin: 0;
    padding: 0;
}

/* Tab buttons */
.nav-tabs .nav-link {
    padding: 0.75rem 1rem;
    margin: 0;
    border: none;
    border-bottom: 2px solid transparent;
    background-color: transparent;
    color: #6c757d;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Tab button hover state */
.nav-tabs .nav-link:hover {
    color: #495057;
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom-color: #adb5bd;
}

/* Active tab button */
.nav-tabs .nav-link.active {
    color: #212529;
    background-color: #fff !important;
    border-bottom-color: #fff !important;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Tab borders for all tabs - !important to override Bootstrap's transparent default */
.nav-tabs .nav-link {
    border-top: 1px solid #c5ccd3 !important;
    border-left: 1px solid #c5ccd3 !important;
    border-right: 1px solid #c5ccd3 !important;
}

/* Berichtigungen und Nachträge tab - subtle background tint */
.nav-tabs .nav-link.bun-tab {
    background-color: #f0e0d6;
    border-top-color: #d4c0b3;
    border-left-color: #d4c0b3;
    border-right-color: #d4c0b3;
}

.nav-tabs .nav-link.bun-tab:hover {
    background-color: #e8d3c5;
}

.nav-tabs .nav-link.bun-tab.active {
    background-color: #e0c8b8 !important;
    border-top-color: #d4c0b3 !important;
    border-left-color: #d4c0b3 !important;
    border-right-color: #d4c0b3 !important;
}

/* Schlussnachträge tab - charcoal-tinted background */
.nav-tabs .nav-link.schluss-tab {
    background-color: #e0e2e5;
    border-top-color: #c0c4c9;
    border-left-color: #c0c4c9;
    border-right-color: #c0c4c9;
}

.nav-tabs .nav-link.schluss-tab:hover {
    background-color: #d4d7db;
}

.nav-tabs .nav-link.schluss-tab.active {
    background-color: #c8ccd1 !important;
    border-top-color: #c0c4c9 !important;
    border-left-color: #c0c4c9 !important;
    border-right-color: #c0c4c9 !important;
}

/* Tab content container */
.tab-content {
    flex: 1;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    background-color: #fff;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.tab-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Individual tab panes */
.tab-pane {
    margin: 0;
    display: none;
}

/* Active tab pane */
.tab-pane.active {
    display: block;
}
/* ============================================
   Scrollable content wrapper
   ============================================ */

.scrollable-content {
    height: 100%;
    overflow-y: auto;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.scrollable-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* ============================================
   Excluded citation styling
   ============================================ */

.excluded-citation {
    opacity: 0.5;
    text-decoration: line-through;
    color: #999;
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Override hover effect for excluded citations */
.excluded-citation:hover {
    background-color: #e8e8e8;
    cursor: default;
}

/* ============================================
   Excluded sub-entry styling (referenceEntryMult)
   ============================================ */

.excluded-sub-entry {
    opacity: 0.5;
    text-decoration: line-through;
    color: #999;
}

/* ============================================
   Excluded sense styling
   ============================================ */

.excluded-sense {
    opacity: 0.5;
    text-decoration: line-through;
    color: #999;
}

/* ============================================
   No entry linked message
   ============================================ */
.no-external-entry {
    text-align: center;
    margin-top: 3rem;
}

.other-dictionaries > div > div:first-child .no-external-entry {
    font-family: var(--cad-font-family);
}
.other-dictionaries > div > div:last-child .no-external-entry {
    font-family: var(--ahw-font-family);
}

/* ============================================
   Full bibliographic reference under a CAD / AHw entry, with its copy button
   (ahw:reference in modules/ahw.xqm, cad:reference in modules/cad.xqm).
   Side padding matches .ahw-entry / .cad-entry (0 10px) so it lines up with the
   entry text; left-aligned, because justified the long CAD title opened wide
   gaps on a narrow column. The rule under it separates the reference from the
   rights notice that follows (.ahw-credit-notice / .cad-preview-notice).
   ============================================ */
.external-dict-reference {
    margin: 1.25em 10px 0;
    padding-bottom: 0.75em;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
    text-align-last: auto;
    hyphens: none;
    font-size: 0.9em;
    color: var(--note-text-color, #6c757d);
}

/* The glyph and its look come from .copy-icon (components/tooltips.css), the same
   ⧉ the bibliography tooltips use; this only strips the button chrome. */
.external-dict-reference-copy {
    border: 0;
    background: none;
    padding: 0;
    color: inherit;
    line-height: inherit;
}

/* ============================================
   AHw column left border (separator between CAD and AHw)
   ============================================ */
.other-dictionaries > div > div:last-child {
    border-left: 1px solid #dee2e6;
}

/* ============================================
   Responsive adjustments
   ============================================ */

@media (max-width: 768px) {
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .tab-pane {
        padding: 0.75rem;
    }
    
    .dict-header h5 {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}