/**
 * Markers CSS - ハイライト＆フラグ用スタイル
 * SparkSheets v2025.12.15
 */

/* ============================================
   FlagNode - TipTapインラインフラグアイコン
   ============================================ */

.ss-flag-node {
    display: inline-block;
    vertical-align: baseline;
    cursor: pointer;
    text-align: right;
}

.ss-flag-node svg {
    width: 0.9em;
    height: 0.9em;
    vertical-align: -0.1em;
    display: inline-block;
}

/* ============================================
   TipTapハイライト（mark要素）
   ============================================ */

.ProseMirror mark {
    padding: 3px 3px;
    border-radius: 2px;
}

/* ============================================
   フラグアイコン（エディタ内）
   ============================================ */

.ss-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    cursor: pointer;
    margin: 0 2px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.ss-flag .material-icons {
    font-size: 14px;
    transition: transform 0.15s ease;
}

.ss-flag:hover .material-icons {
    transform: scale(1.2);
}

/* フラグホバーツールチップ */
.ss-flag::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: var(--bg-tertiary, #333);
    color: var(--text-primary, #fff);
    font-size: 11px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

.ss-flag:hover::after {
    opacity: 1;
    visibility: visible;
}

/* フラグタイプ別カラー */
.ss-flag[data-flag-type="bookmark"] .material-icons { color: #ef4444; }
.ss-flag[data-flag-type="readHere"] .material-icons { color: #3b82f6; }
.ss-flag[data-flag-type="important"] .material-icons { color: #f59e0b; }
.ss-flag[data-flag-type="custom"] .material-icons { color: #8b5cf6; }

/* ============================================
   マーカーサブメニュー（SparkBar内）- ハイライト＋フラグ統合
   ============================================ */

.submenu-marker {
    min-width: 280px;
    max-width: 320px;
}

/* 戻るボタン - inline-toolbarのデフォルトをオーバーライド */
.submenu-marker .marker-back {
    width: auto !important;
    height: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 6px 10px !important;
    background: var(--bg-secondary, #f5f5f5) !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    color: var(--text-secondary, #666) !important;
    transition: background 0.15s ease !important;
}

.submenu-marker .marker-back:hover {
    background: var(--bg-hover, #e5e5e5) !important;
}

.submenu-marker .marker-back .material-icons {
    font-size: 16px !important;
}

/* セクション */
.marker-section {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-primary, #333);
}

.marker-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* ハイライト色ボタン */
.marker-highlight-colors {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ハイライトボタン - inline-toolbarのデフォルトをオーバーライド */
.submenu-marker .marker-highlight-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border: 2px solid transparent !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: transform 0.15s ease, border-color 0.15s ease !important;
}

.submenu-marker .marker-highlight-btn:hover {
    border-color: var(--text-primary, #333) !important;
}

/* フラグ色ボタン（ハイライトと同じレイアウト） */
.marker-flag-colors {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* フラグ色ボタン - グレーの1px内側線で囲まれたボックス */
.inline-marker-picker .marker-flag-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid var(--border-primary, #444) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    padding: 0 !important;
    background: var(--bg-secondary, #2a2a2a) !important;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease !important;
}

.inline-marker-picker .marker-flag-btn:hover {
    border-color: var(--text-primary, #fff) !important;
    background: var(--bg-hover, #333) !important;
}

.inline-marker-picker .marker-flag-btn svg {
    width: 16px;
    height: 16px;
}

/* 旧フラグオプション（後方互換・廃止予定） */
.marker-flag-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

/* 旧フラグボタン（後方互換・廃止予定） */
.submenu-marker .flag-type-btn {
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    color: var(--text-primary, #333) !important;
    text-align: left !important;
    white-space: nowrap !important;
    transition: background 0.15s ease !important;
}

.submenu-marker .flag-type-btn:hover {
    background: var(--bg-hover, rgba(0,0,0,0.05)) !important;
}

.submenu-marker .flag-type-btn .material-icons {
    font-size: 16px !important;
    flex-shrink: 0 !important;
}

/* カスタムSVGフラグアイコン */
.flag-icon-svg {
    flex-shrink: 0;
    vertical-align: middle;
}

.submenu-marker .flag-type-btn .flag-icon-svg {
    width: 18px !important;
    height: 18px !important;
}

/* エディタ内のフラグアイコン（インラインspan方式） */
.ProseMirror .ss-flag-inline {
    display: inline-block;
    width: 1em;
    height: 1em;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin: 0 1px;
}

/* コメントセクション（新UI） */
.inline-marker-picker .comment-section {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-primary, #333);
}

.marker-comment-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-primary, #444);
    border-radius: 6px;
    background: var(--bg-secondary, #2a2a2a);
    color: var(--text-primary, #fff);
    font-size: 13px;
    box-sizing: border-box;
}

.marker-comment-input:focus {
    outline: none;
    border-color: var(--accent-color, #3b82f6);
}

.marker-comment-input::placeholder {
    color: var(--text-secondary, #888);
}

/* 旧メモ入力（後方互換） */
.marker-memo-section {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-primary, #333);
}

.marker-memo-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-primary, #444);
    border-radius: 6px;
    background: var(--bg-secondary, #2a2a2a);
    color: var(--text-primary, #fff);
    font-size: 13px;
}

.marker-memo-input:focus {
    outline: none;
    border-color: var(--accent-color, #3b82f6);
}

.marker-memo-input::placeholder {
    color: var(--text-secondary, #888);
}

/* マーカー一覧セクション */
.marker-list-section {
    padding: 8px 12px;
}

/* マーカーリストトグル - inline-toolbarのデフォルトをオーバーライド */
.submenu-marker .marker-list-toggle {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: auto !important;
    padding: 8px 0 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 12px !important;
    color: var(--text-secondary, #888) !important;
    transition: color 0.15s ease !important;
}

.submenu-marker .marker-list-toggle:hover {
    color: var(--text-primary, #333) !important;
    background: transparent !important;
}

.marker-list-icon {
    font-size: 18px;
    transition: transform 0.2s ease;
}

/* アコーディオン閉じた時は矢印右向き（-90deg） */
.marker-list-toggle.collapsed .marker-list-icon {
    transform: rotate(-90deg);
}

.marker-list-content {
    margin-top: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.marker-list-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.marker-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--bg-secondary, #2a2a2a);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.marker-list-item:hover {
    background: var(--bg-hover, #333);
}

.marker-item-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.marker-item-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.marker-item-label {
    flex: 1;
    font-size: 12px;
    color: var(--text-primary, #fff);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.marker-item-memo {
    display: block;
    font-size: 11px;
    color: var(--text-secondary, #888);
    margin-top: 2px;
}

.marker-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* 削除ボタンは常に表示（ホバー不要） */

/* 編集・削除ボタン - inline-toolbarのデフォルトをオーバーライド */
.submenu-marker .marker-item-edit,
.submenu-marker .marker-item-delete {
    width: auto !important;
    height: auto !important;
    padding: 4px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    color: var(--text-secondary, #888) !important;
    transition: color 0.15s ease, background 0.15s ease;
}

.marker-item-edit:hover {
    color: var(--accent-color, #3b82f6);
    background: rgba(59, 130, 246, 0.1);
}

.marker-item-delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.marker-item-edit .material-icons,
.marker-item-delete .material-icons {
    font-size: 14px;
}

.marker-list-empty {
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary, #888);
}

/* レガシー：フラグサブメニュー（後方互換） */
.submenu-flag {
    min-width: 200px;
}

.flag-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.flag-type-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary, #fff);
    text-align: left;
    transition: background 0.15s ease;
}

.flag-type-btn:hover {
    background: var(--bg-hover, rgba(255,255,255,0.1));
}

.flag-type-btn .material-icons {
    font-size: 18px;
}

.flag-memo-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-primary, #444);
    border-radius: 6px;
    background: var(--bg-secondary, #2a2a2a);
    color: var(--text-primary, #fff);
    font-size: 13px;
}

.flag-memo-input:focus {
    outline: none;
    border-color: var(--accent-color, #3b82f6);
}

.flag-memo-input::placeholder {
    color: var(--text-secondary, #888);
}

/* ============================================
   シートパネル - ハイライト＆フラグ一覧
   ============================================ */

.marker-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ハイライトアイテム */
.highlight-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 6px;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    pointer-events: auto; /* Ensure clickable */
}

.highlight-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .highlight-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.highlight-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative; /* marker-item-actions用 */
}

.highlight-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.highlight-text {
    flex: 1;
    font-size: 12px;
    color: var(--text-color, #333);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.highlight-memo {
    font-size: 11px;
    color: var(--text-secondary, #888);
    padding-left: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.highlight-memo .material-icons {
    font-size: 12px;
}

/* フラグアイテム */
.flag-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 6px;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    pointer-events: auto; /* Ensure clickable */
}

.flag-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .flag-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* フラグアイコン点滅アニメーション */
@keyframes flagBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.3);
    }
}

.ss-flag-node.blinking {
    animation: flagBlink 0.4s ease-in-out 3;
}

/* ハイライト点滅アニメーション */
@keyframes highlightBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.ProseMirror mark.blinking {
    animation: highlightBlink 0.3s ease-in-out 2;
}

.flag-item-header {
    display: flex;
    align-items: center;
    position: relative; /* marker-item-actions用 */
    gap: 8px;
}

.flag-item-header .material-icons {
    font-size: 16px;
    flex-shrink: 0;
}

.flag-label {
    flex: 1;
    font-size: 12px;
    color: var(--text-color, #333);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.flag-author {
    font-size: 11px;
    color: var(--text-tertiary, #666);
}

.flag-memo {
    font-size: 11px;
    color: var(--text-secondary, #888);
    padding-left: 24px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.flag-memo .material-icons {
    font-size: 12px;
}

/* アイテム削除ボタン（左パネル用）- 常に表示 */
.highlight-item .marker-item-actions,
.flag-item .marker-item-actions {
    display: flex;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: auto;
    z-index: 10;
}

.marker-delete-btn {
    padding: 4px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary, #888);
    transition: color 0.15s ease;
    pointer-events: auto; /* Ensure button is clickable */
    z-index: 10; /* Ensure button is on top */
}

.marker-delete-btn:hover {
    color: #ef4444;
}

.marker-delete-btn .material-icons {
    font-size: 14px;
}

/* 空状態 */
.markers-empty {
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary, #888);
}

/* ============================================
   カラーパレット対応色
   変数は variables.css の --highlight-* を参照
   ============================================ */

.highlight-color-yellow { background: var(--highlight-yellow); }
.highlight-color-green { background: var(--highlight-green); }
.highlight-color-blue { background: var(--highlight-blue); }
.highlight-color-purple { background: var(--highlight-purple); }
.highlight-color-pink { background: var(--highlight-pink); }
.highlight-color-red { background: var(--highlight-red); }
.highlight-color-gray { background: var(--highlight-gray); }
/* 旧色（後方互換性） */
.highlight-color-brown { background: #a16207; }
.highlight-color-orange { background: #ea580c; }

/* ============================================
   マーカーピッカー（フローティングメニュー）
   ============================================ */

.inline-marker-picker {
    min-width: 260px;
    max-width: 300px;
}

/* ハイライトセクション */
.inline-marker-picker .marker-section {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.inline-marker-picker .marker-section:last-of-type {
    border-bottom: none;
}

.inline-marker-picker .marker-section-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-500, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* ハイライト色ボタン */
.inline-marker-picker .marker-highlight-colors {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.inline-marker-picker .marker-highlight-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border: 2px solid transparent !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: transform 0.15s ease, border-color 0.15s ease !important;
}

.inline-marker-picker .marker-highlight-btn:hover {
    transform: scale(1.1);
    border-color: rgba(0, 0, 0, 0.3) !important;
}

/* フラグオプション */
.inline-marker-picker .marker-flag-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.inline-marker-picker .flag-type-btn {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    height: auto !important;
    padding: 8px 10px !important;
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    color: var(--text-primary, #333) !important;
    text-align: left !important;
    white-space: nowrap !important;
    transition: all 0.15s ease !important;
}

.inline-marker-picker .flag-type-btn:hover {
    background: rgba(0, 122, 255, 0.1) !important;
    border-color: rgba(0, 122, 255, 0.2) !important;
}

.inline-marker-picker .flag-type-btn .material-icons {
    font-size: 16px !important;
    flex-shrink: 0 !important;
}

/* 共有メモ入力 */
.inline-marker-picker .marker-memo-section {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.inline-marker-picker .marker-memo-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-primary, #333);
    font-size: 13px;
    box-sizing: border-box;
}

.inline-marker-picker .marker-memo-input:focus {
    outline: none;
    border-color: var(--ios-blue, #007aff);
    background: #fff;
}

.inline-marker-picker .marker-memo-input::placeholder {
    color: var(--text-secondary, #888);
}

/* マーカー一覧セクション */
.inline-marker-picker .marker-list-section {
    padding: 8px 0 0 0;
}

.inline-marker-picker .marker-list-toggle {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: auto !important;
    padding: 8px 0 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 11px !important;
    color: var(--gray-500, #888) !important;
    transition: color 0.15s ease !important;
}

.inline-marker-picker .marker-list-toggle:hover {
    color: var(--text-primary, #333) !important;
    background: transparent !important;
}

.inline-marker-picker .marker-list-count {
    font-size: 10px;
    color: var(--text-secondary, #666);
    background: var(--bg-tertiary, #f0f0f0);
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: auto;
    margin-right: 4px;
}

body.dark-mode .inline-marker-picker .marker-list-count {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #888);
}

.inline-marker-picker .marker-list-icon {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.inline-marker-picker .marker-list-content {
    margin-top: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.inline-marker-picker .marker-list-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: auto !important;
}

.inline-marker-picker .marker-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    pointer-events: auto !important;
}

.inline-marker-picker .marker-list-item:hover {
    background: rgba(0, 0, 0, 0.08);
}

.inline-marker-picker .marker-item-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.inline-marker-picker .marker-item-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.inline-marker-picker .marker-item-label {
    flex: 1;
    font-size: 12px;
    color: var(--text-primary, #333);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.inline-marker-picker .marker-item-memo {
    display: block;
    font-size: 11px;
    color: var(--text-secondary, #888);
    margin-top: 2px;
}

.inline-marker-picker .marker-item-actions {
    display: flex !important;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
    pointer-events: auto !important;
    z-index: 100 !important;
}

.inline-marker-picker .marker-item-edit,
.inline-marker-picker .marker-item-delete {
    width: auto !important;
    height: auto !important;
    padding: 4px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    color: var(--text-secondary, #888) !important;
    transition: color 0.15s ease, background 0.15s ease;
    pointer-events: auto !important;
    z-index: 100 !important;
    position: relative !important;
}

.inline-marker-picker .marker-item-edit:hover {
    color: var(--ios-blue, #007aff) !important;
    background: rgba(0, 122, 255, 0.1) !important;
}

.inline-marker-picker .marker-item-delete:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.inline-marker-picker .marker-item-edit .material-icons,
.inline-marker-picker .marker-item-delete .material-icons {
    font-size: 14px !important;
}

.inline-marker-picker .marker-list-empty {
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary, #888);
}

/* インラインメモエディタ */
.inline-memo-editor {
    padding: 8px;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 6px;
    margin-top: 8px;
}

.inline-memo-editor .memo-input {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 4px;
    font-size: 12px;
    resize: vertical;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #333);
}

.inline-memo-editor .memo-input:focus {
    outline: none;
    border-color: var(--ios-blue, #007aff);
}

.inline-memo-editor .memo-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 8px;
}

.inline-memo-editor .memo-save,
.inline-memo-editor .memo-cancel {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.inline-memo-editor .memo-save {
    background: var(--ios-blue, #007aff);
    color: white;
}

.inline-memo-editor .memo-save:hover {
    background: #0056b3;
}

.inline-memo-editor .memo-cancel {
    background: var(--bg-tertiary, #e0e0e0);
    color: var(--text-secondary, #666);
}

.inline-memo-editor .memo-cancel:hover {
    background: #ccc;
}

.inline-memo-editor .memo-save .material-icons,
.inline-memo-editor .memo-cancel .material-icons {
    font-size: 16px;
}

/* ダークモード */
body.dark-mode .inline-marker-picker .marker-section {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .inline-marker-picker .marker-section-title {
    color: #666;
}

body.dark-mode .inline-marker-picker .marker-highlight-btn:hover {
    border-color: rgba(255, 255, 255, 0.4) !important;
}

body.dark-mode .inline-marker-picker .flag-type-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-muted, #aaa) !important;
}

body.dark-mode .inline-marker-picker .flag-type-btn:hover {
    background: rgba(0, 122, 255, 0.2) !important;
    border-color: rgba(0, 122, 255, 0.3) !important;
}

body.dark-mode .inline-marker-picker .marker-memo-section {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .inline-marker-picker .marker-memo-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary, #fff);
}

body.dark-mode .inline-marker-picker .marker-memo-input:focus {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .inline-marker-picker .marker-list-toggle {
    color: #666 !important;
}

body.dark-mode .inline-marker-picker .marker-list-toggle:hover {
    color: var(--text-muted, #aaa) !important;
}

body.dark-mode .inline-marker-picker .marker-list-item {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .inline-marker-picker .marker-list-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .inline-marker-picker .marker-item-label {
    color: var(--text-muted, #aaa);
}

body.dark-mode .inline-memo-editor {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .inline-memo-editor .memo-input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary, #fff);
}

body.dark-mode .inline-memo-editor .memo-input:focus {
    border-color: var(--ios-blue, #007aff);
}

body.dark-mode .inline-memo-editor .memo-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted, #aaa);
}

body.dark-mode .inline-memo-editor .memo-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}
