
/* 
 * Japanese Site Overrides
 * Only loaded in mkdocs_ja.yml
 */

/* 1. Hide the text in the logo area, keep the image */
.navbar-brand {
    /* Replace the logo with the Japanese SVG */
    background-image: url('../img/ja-logo.svg') !important;
    background-repeat: no-repeat !important;
    background-position: center left !important;
    
    /* Ensure the background image (logo) remains visible */
    background-size: contain !important; /* Use contain to fit the SVG nicely */
    
    /* Hide the text "Udesk | 開発者センター" */
    text-indent: -9999px;
    
    /* Adjust width if necessary, but keep it enough for the logo */
    width: 200px !important; /* Increase width for the new logo if needed */
    height: 50px !important; /* Ensure height matches navbar */
    overflow: hidden;
    display: block;
}

/* 2. Optimize Navbar Layout to prevent wrapping */
@media (min-width: 768px) {
    /* Widen the container to give more space for navbar */
    .container {
        width: 100% !important;
        max-width: 1600px; /* Optional cap */
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Prevent the navbar container from collapsing */
    .navbar-collapse {
        padding-left: 0;
        padding-right: 0;
    }

    /* Make nav items more compact */
    .navbar .navbar-nav > li > a {
        padding: 15px 6px; /* Reduce horizontal padding (was 12px) */
        font-size: 13px;   /* Slightly smaller font if needed */
        white-space: nowrap; /* Force single line */
    }

    /* Ensure the nav bar stays on the right or flows correctly */
    .navbar-nav {
        float: right;
        margin: 0;
    }
}

/* 3. Extreme compaction for medium screens */
@media (min-width: 768px) and (max-width: 1200px) {
    .container {
        width: 100%; /* Use full width on smaller desktops */
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .navbar .navbar-nav > li > a {
        padding: 15px 5px; /* Even tighter padding */
        font-size: 12px;
    }
}

/* 4. Fix sidebar overflow for Japanese content */
.bs-sidebar {
    overflow-y: auto !important;
    height: auto !important;
    max-height: calc(100vh - 100px) !important;
}

/* 5. Fix link overflow in sidebar with ellipsis */
.bs-sidebar .nav > li > a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    padding: 5px 10px;
}

/* 6. Hide Footer for Japanese Site */
footer {
    display: none !important;
}

/* 7. Fix breadcrumb overflow - Force Inline Truncation */
/* Apply global truncation rules first */
.breadcrumb {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    float: left !important;
    padding-right: 10px !important;
}

.breadcrumb li {
    display: inline !important;
    float: none !important;
}

.breadcrumb li a {
    display: inline !important;
}

/* Specific fix for Desktop where breadcrumb is FIXED positioned */
@media (min-width: 992px) {
    .breadcrumb {
        /* Limit width to match the sidebar width (approx 270px) so it doesn't overlap main content */
        max-width: 260px !important; 
    }
}

/* For smaller screens (tablet/mobile), allow more width but still truncate if needed */
@media (max-width: 991px) {
    .breadcrumb {
        max-width: 100% !important;
        position: relative !important; /* Ensure it flows */
    }
}
