/**
 * 障害お知らせバナー - 全ページヘッダー直下表示
 * GitHub/AWSコンソール風のインシデントバナー
 */

/* スライドダウンアニメーション */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* バナー全体のコンテナ */
.system-alert-banner {
    width: 100%;
    animation: slideDown 0.3s ease-out;
    border-bottom: 1px solid transparent;
    position: relative;
    z-index: 1040;
}

/* 情報レベル（青系） */
.system-alert-info {
    background-color: #eff6ff;
    border-bottom-color: #bfdbfe;
    color: #1e40af;
}

.system-alert-info .system-alert-icon {
    color: #3b82f6;
}

.system-alert-info .system-alert-close:hover {
    background-color: rgba(59, 130, 246, 0.15);
    color: #1e40af;
}

/* 警告レベル（黄系） */
.system-alert-warning {
    background-color: #fffbeb;
    border-bottom-color: #fde68a;
    color: #92400e;
}

.system-alert-warning .system-alert-icon {
    color: #f59e0b;
}

.system-alert-warning .system-alert-close:hover {
    background-color: rgba(245, 158, 11, 0.15);
    color: #92400e;
}

/* 重大レベル（赤系） */
.system-alert-critical {
    background-color: #fef2f2;
    border-bottom-color: #fecaca;
    color: #991b1b;
}

.system-alert-critical .system-alert-icon {
    color: #ef4444;
}

.system-alert-critical .system-alert-close:hover {
    background-color: rgba(239, 68, 68, 0.15);
    color: #991b1b;
}

/* コンテンツレイアウト（Flexbox） */
.system-alert-content {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 12px;
}

/* 左のアイコン */
.system-alert-icon {
    flex-shrink: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

/* テキストエリア */
.system-alert-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    min-width: 0;
}

/* タイトル部分 */
.system-alert-text strong {
    font-weight: 600;
    margin-right: 8px;
}

/* メッセージ部分 */
.system-alert-text span {
    opacity: 0.9;
}

/* 閉じるボタン */
.system-alert-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    color: inherit;
    opacity: 0.6;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.system-alert-close:hover {
    opacity: 1;
}

.system-alert-close:focus {
    outline: none;
    opacity: 1;
}

/* 複数バナー表示時のスペーシング */
.system-alert-banner + .system-alert-banner {
    border-top: none;
}

/* レスポンシブ対応（768px以下） */
@media (max-width: 768px) {
    .system-alert-content {
        padding: 8px 15px;
        gap: 8px;
    }

    .system-alert-icon {
        font-size: 16px;
        width: 24px;
        height: 24px;
    }

    .system-alert-text {
        font-size: 13px;
    }

    .system-alert-text strong {
        display: block;
        margin-right: 0;
        margin-bottom: 2px;
    }

    .system-alert-text span {
        display: block;
    }

    .system-alert-close {
        font-size: 16px;
        padding: 2px 6px;
    }
}
