/* トーストコンテナの基本設定 */
.toast {
    opacity: 1 !important;
}
.toast-container {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
}

/* トースト間のスペース調整 */
.toast-container > .toast {
    margin-bottom: 8px; /* トースト間の間隔 */
    pointer-events: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

/* 位置調整 */
.toast-top-right {
    top: 20px;
    right: 20px;
    width: 400px !important; /* 幅を調整 */
}

.toast-top-left {
    top: 20px;
    left: 20px;
    width: 400px !important;
}

.toast-bottom-right {
    bottom: 20px;
    right: 20px;
    width: 400px !important;
}

.toast-bottom-left {
    bottom: 20px;
    left: 20px;
    width: 400px !important;
}

/* プログレスバーの調整 */
.toast-progress {
    height: 3px;
    background-color: rgba(255, 255, 255, 0.7);
}

/* 各タイプのカスタムスタイル */
.toast-success {
    background-color: #28a745 !important;
    border-left: 5px solid #1e7e34 !important;
    width: 450px !important;
    /*opacity: 1 !important;*/
}

.toast-error {
    background-color: #dc3545 !important;
    border-left: 5px solid #c82333 !important;
    width: 450px !important;
}

.toast-info {
    background-color: #17a2b8 !important;
    border-left: 5px solid #138496 !important;
    width: 450px !important;
}

.toast-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
    border-left: 5px solid #d39e00 !important;
    width: 450px !important;
}

/* アニメーション調整 */
@keyframes toast-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out-right {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast {
    animation: toast-in-right 0.3s ease;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .toast-container {
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
    }

    .toast-container > .toast {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* AdminLTE使用時のz-index調整 */
.main-sidebar {
    /*z-index: 999;*/
}

.toast-container {
    /*z-index: 999999;*/
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .toast {
        color: #ffffff;
    }

    .toast-warning {
        color: #212529;
    }
}
/* AdminLTEのスタイルをオーバーライド */
.content-wrapper .toast,
.main-header ~ .toast-container .toast,
body .toast-container .toast {
    opacity: 1 !important;
    background-color: inherit !important;
}

/* AdminLTEのダークモード対応 */
.dark-mode .toast-container .toast {
    opacity: 1 !important;
}

/* メニューバッジのカスタマイズ */
.nav-sidebar .badge {
    font-size: 0.875rem !important; /* 14px - デフォルトより大きく */
    padding: 0.35em 0.65em !important; /* パディングを増やして大きく */
    min-width: 24px !important; /* 最小幅を設定 */
    font-weight: 600 !important; /* 太字 */
    border-radius: 0.5rem !important; /* 角を少し丸く */
    display: inline-flex !important; /* フレックスボックスで配置 */
    align-items: center !important; /* 垂直方向中央揃え */
    justify-content: center !important; /* 水平方向中央揃え */
    line-height: 1 !important; /* 行の高さを調整 */
    vertical-align: middle !important; /* 垂直方向中央揃え */
}

/* バッジの右側マージン調整 */
.nav-sidebar .nav-link .badge {
    margin-left: auto;
    margin-right: 0.25rem;
    top: auto !important;
}

/* メニューリンクのフレックス設定 */
.nav-sidebar .nav-link {
    display: flex !important;
    align-items: center !important; /* 垂直方向中央揃え */
}

/* メニューアイコンの調整 */
.nav-sidebar .nav-link .nav-icon {
    display: inline-flex !important;
    align-items: center !important;
}

/* メニューテキストの調整 */
.nav-sidebar .nav-link p {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0 !important;
}

