/* ──────────────────────────────────────────────────────────────────
   MailGate — Custom Styles
   ────────────────────────────────────────────────────────────────── */

/* ── 共通 ──────────────────────────────────────────────────────── */
body {
    font-size: 0.9rem;
}

.container-fluid {
    max-width: 1400px;
}

/* ── ダッシュボード（Outlook スタイル 3行リスト）───────────────── */

.notif-item {
    display: flex;
    align-items: flex-start;
    padding: 9px 14px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color .12s;
}
.notif-item:last-child {
    border-bottom: none;
}
.notif-item:hover {
    background-color: #f0f4ff;
}

/* 未読・既読・無視 */
.notif-item.notif-unread {
    background-color: #eef4ff;
    font-weight: 600;
}
.notif-item.notif-unread:hover {
    background-color: #ddeaff;
}

/* 未読ドット（左端 16px 列）*/
.notif-dot {
    width: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 5px;
    font-size: 0.42rem;
}

/* コンテンツ列 */
.notif-content {
    flex: 1;
    min-width: 0;
}

/* 1行目: 差出人 | 宛先メールボックス */
.notif-row1 {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 1px;
}
.notif-from {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
}
.notif-to {
    flex-shrink: 0;
    font-size: 0.775rem;
    color: #6c757d;
    white-space: nowrap;
    font-weight: 400;
}

/* 2行目: 件名 | 日時 + ボタン */
.notif-row2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.notif-subject {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
}
.notif-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1px;
}
.notif-time {
    font-size: 0.775rem;
    color: #6c757d;
    white-space: nowrap;
    margin-right: 2px;
    font-weight: 400;
}
.notif-actions .btn {
    padding: 1px 5px;
    font-size: 0.75rem;
    color: #9ca3af;
    border: none;
    background: none;
    line-height: 1.3;
    border-radius: 4px;
}
.notif-actions .btn:hover {
    background-color: #e2e6ea;
    color: #495057;
}
.notif-actions .notif-delete-btn:hover {
    background-color: #f8d7da;
    color: #dc3545;
}
.notif-actions .notif-restore-btn:hover {
    background-color: #d1e7dd;
    color: #198754;
}

/* 3行目: 本文プレビュー */
.notif-preview {
    font-size: 0.8rem;
    color: #9ca3af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
}

/* メールボックス サイドバー */
.mailbox-sidebar .list-group-item {
    border-radius: 0;
    border-left: 3px solid transparent;
    font-size: 0.85rem;
}
.mailbox-sidebar .list-group-item.active {
    background-color: #e9f0ff;
    border-left-color: #0d6efd;
    color: #0d6efd;
    font-weight: 600;
}
.mailbox-sidebar .list-group-item:not(.active):hover {
    background-color: #f8f9fa;
}
.mailbox-sidebar .mb-sidebar-group.mb-dragging {
    opacity: 0.35;
}
.mailbox-sidebar .mb-sidebar-group.mb-drag-over {
    border-top: 2px solid #0d6efd;
    background-color: #e8f0fe;
}

/* ── サイドバー メールボックス行 アイコン ────────────────────── */
.mb-rule-icon {
    font-size: 0.75rem;
    color: #adb5bd;
    width: 0.9rem;
    text-align: center;
}
.list-group-item:not(.active):hover .mb-rule-icon {
    color: #6c757d;
}
.list-group-item.active .mb-rule-icon {
    color: #0d6efd;
}
.mb-rule-icon-spacer {
    display: inline-block;
    width: 0.9rem;
}

/* ── サイドバー ルールアイテム ─────────────────────────────────── */
.rule-sidebar-item {
    padding-left: 1.75rem !important;
    font-size: 0.8rem;
}

/* ── メール詳細 ─────────────────────────────────────────────────── */

.mail-header-table th {
    width: 90px;
    color: #6c757d;
    font-weight: 400;
    white-space: nowrap;
}

/* HTML メール iframe（sandbox="" でスクリプト完全無効化, S1） */
.mail-iframe {
    width: 100%;
    min-height: 480px;
    border: none;
    background: #fff;
}

/* ── ユーティリティ ─────────────────────────────────────────────── */

/* フラッシュメッセージ自動フェード */
.alert-autofade {
    animation: autofade 4s forwards;
}
@keyframes autofade {
    0%   { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

/* カードのサブタイトル */
.card-subtitle-sm {
    font-size: 0.78rem;
    color: #6c757d;
}

/* 検索バー幅 */
.search-form {
    max-width: 320px;
}
