/* ============================================================
   Layout Header & Navigation Improvements
   ============================================================ */

:root {
    --nav-height: 64px;
    --primary-color: #0dcaf0; /* Bootstrap info */
    --primary-dark: #0baccc;
}

body {
    padding-top: var(--nav-height) !important;
}

/* Navbar Styling */
.navbar-custom {
    height: var(--nav-height);
    background: #0dcaf0 !important; /* bg-info color */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease;
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    color: #ffffff !important;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.navbar-custom .dropdown-menu {
    margin-top: 0;
}

@media (min-width: 992px) {
    .navbar-custom .dropdown:hover > .dropdown-menu {
        display: block;
    }
}

.navbar-custom .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.25) !important;
}

.navbar-custom .navbar-toggler {
    color: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.navbar-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* AI Assistant Floating Button */
#ai-assistant-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(13, 202, 240, 0.4);
    cursor: pointer;
    z-index: 1030;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    outline: none;
}

#ai-assistant-fab:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 6px 20px rgba(13, 202, 240, 0.5);
    background: var(--primary-dark);
}

#ai-assistant-fab i {
    font-size: 24px;
}

#ai-assistant-fab .badge {
    position: absolute;
    top: -5px;
    right: -5px;
}

/* Notification Badge Adjustment */
.nav-link .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

/* Notification Dropdown — SPでは画面幅を超えない */
.notification-dropdown {
    min-width: min(24rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .navbar-custom {
        height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .navbar-custom .navbar-collapse {
        background: #0dcaf0;
        margin-top: 10px;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }

    .navbar-custom .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    #ai-assistant-fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}