/* =========================================================================
   deckManager/MTG/deckNotes.css — ★2026-09-27 (NEW)
   The deck editor's NOTES section (deckNotes.js builds it right below
   #deckStats) and its Add / Edit Note popup (a LIGHT .account-overlay /
   .account-dialog like the other editor popups). Loads after deck.mtg.
   ========================================================================= */

.deck-notes {
    width: 100%;
    box-sizing: border-box;
    margin: 14px 0 12px;
    padding: 12px 14px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
}

.deck-notes-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.deck-notes-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
}

button.deck-notes-add {
    appearance: none;
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
    border-radius: 7px;
    padding: 6px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    width: auto;
    margin: 0;
    transition: background 0.15s ease, transform 0.1s ease;
}
button.deck-notes-add:hover { background: #1d4ed8; }
button.deck-notes-add:active { transform: scale(0.97); }
button.deck-notes-add:disabled {
    background: #cbd5e1;
    border-color: #cbd5e1;
    cursor: default;
    transform: none;
}

.deck-notes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.deck-note-bubble {
    position: relative;
    max-width: 340px;
    min-width: 140px;
    padding: 10px 13px 8px;
    border-radius: 14px 14px 14px 4px;
    background: #eef4ff;
    border: 1px solid #c7d7fb;
    color: #1f2937;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.deck-note-bubble:hover {
    background: #e0ebff;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.16);
}
.deck-note-bubble:active { transform: scale(0.99); }
.deck-note-bubble:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.deck-note-body {
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.deck-note-date {
    margin-top: 5px;
    font-size: 11px;
    color: #6b7280;
    text-align: right;
}

.deck-notes-hint {
    font-size: 13px;
    color: #6b7280;
    padding: 2px 2px 0;
}
.deck-notes-hint.hidden { display: none; }
.deck-notes-error { color: #b91c1c; }

/* ---------- the popup ---------- */
.deck-note-dialog {
    width: 560px;
    max-width: 94vw;
    max-height: 90vh;
    overflow-y: auto;
}
.deck-note-dialog .dialog-title { margin-bottom: 12px; }

#deckNoteDialog textarea.deck-note-text {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 240px;
    padding: 11px 13px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font: inherit;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
}
#deckNoteDialog textarea.deck-note-text:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.deck-note-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    min-height: 18px;
    margin-top: 5px;
    font-size: 12px;
}
.deck-note-err { color: #b91c1c; }
.deck-note-count { color: #9ca3af; margin-left: auto; }

.deck-note-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.deck-note-foot .spacer { flex: 1 1 auto; }

button.deck-note-delete {
    appearance: none;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff5f5;
    color: #dc2626;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
button.deck-note-delete:hover { background: #fee2e2; border-color: #f87171; }
button.deck-note-delete.hidden { display: none; }

@media (max-width: 768px) {
    .deck-note-bubble { max-width: 100%; }
    .deck-note-dialog { width: 94vw; padding: 20px 16px; }
}
