/* Flashメッセージトースト通知のスタイル */

/* トーストコンテナ */
.flash-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

/* トースト通知 */
.flash-toast {
    min-width: 300px;
    max-width: 400px;
    margin-bottom: 10px;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* トーストヘッダー */
.flash-toast .toast-header {
    padding: 12px 16px;
    border-bottom: 1px solid;
    display: flex;
    align-items: center;
    font-weight: 600;
}

/* トーストタイトル */
.flash-toast .toast-title {
    font-size: 1rem;
    font-weight: 600;
}

/* トーストボディ */
.flash-toast .toast-body {
    padding: 12px 16px;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
}

/* トーストメッセージ */
.flash-toast .toast-message {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 詳細表示ボタン */
.flash-toast .toggle-details {
    padding: 0;
    font-size: 0.85rem;
    text-decoration: underline;
    border: none;
    background: none;
    cursor: pointer;
}

.flash-toast .toggle-details:hover {
    text-decoration: none;
}

/* 詳細コンテンツ */
.flash-toast .details-content {
    font-size: 0.85rem;
    font-family: monospace;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 8px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
}

/* カテゴリ別のスタイル */
.flash-toast.toast-error .toast-header {
    background-color: #dc3545;
    color: #ffffff;
    border-bottom-color: #c82333;
}

.flash-toast.toast-error .toast-body {
    background-color: #f8d7da;
    color: #721c24;
}

body.dark-mode .flash-toast.toast-error .toast-header {
    background-color: #842029;
    color: #f8d7da;
    border-bottom-color: #721c24;
}

body.dark-mode .flash-toast.toast-error .toast-body {
    background-color: #2a1a1c;
    color: #f8d7da;
}

.flash-toast.toast-warning .toast-header {
    background-color: #ffc107;
    color: #212529;
    border-bottom-color: #e0a800;
}

.flash-toast.toast-warning .toast-body {
    background-color: #fff3cd;
    color: #856404;
}

body.dark-mode .flash-toast.toast-warning .toast-header {
    background-color: #856404;
    color: #fff3cd;
    border-bottom-color: #664d03;
}

body.dark-mode .flash-toast.toast-warning .toast-body {
    background-color: #2a2419;
    color: #fff3cd;
}

.flash-toast.toast-success .toast-header {
    background-color: #28a745;
    color: #ffffff;
    border-bottom-color: #218838;
}

.flash-toast.toast-success .toast-body {
    background-color: #d4edda;
    color: #155724;
}

body.dark-mode .flash-toast.toast-success .toast-header {
    background-color: #155724;
    color: #d4edda;
    border-bottom-color: #0f4016;
}

body.dark-mode .flash-toast.toast-success .toast-body {
    background-color: #1a2e1f;
    color: #d4edda;
}

.flash-toast.toast-info .toast-header {
    background-color: #17a2b8;
    color: #ffffff;
    border-bottom-color: #138496;
}

.flash-toast.toast-info .toast-body {
    background-color: #d1ecf1;
    color: #0c5460;
}

body.dark-mode .flash-toast.toast-info .toast-header {
    background-color: #0c5460;
    color: #d1ecf1;
    border-bottom-color: #084048;
}

body.dark-mode .flash-toast.toast-info .toast-body {
    background-color: #1a2e32;
    color: #d1ecf1;
}

/* 閉じるボタン */
.flash-toast .close {
    color: inherit;
    opacity: 0.7;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.flash-toast .close:hover {
    opacity: 1;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .flash-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .flash-toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }

    .flash-toast .toast-header,
    .flash-toast .toast-body {
        padding: 10px 12px;
    }

    .flash-toast .toast-title {
        font-size: 0.9rem;
    }

    .flash-toast .toast-message {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .flash-toast-container {
        top: 5px;
        right: 5px;
        left: 5px;
    }

    .flash-toast .toast-header,
    .flash-toast .toast-body {
        padding: 8px 10px;
    }

    .flash-toast .toast-title {
        font-size: 0.85rem;
    }

    .flash-toast .toast-message {
        font-size: 0.85rem;
    }
}

