/* Shared modern confirm/prompt/toast styling — pairs with
   confirm_modal.js's lsConfirm/lsPrompt/lsToast. Extracted verbatim
   from app/static/landscape/landscape.css (same class names, same
   dark-mode rules via body.dark-mode, kept as the single canonical
   copy the two share so a future fix to one applies to both without
   drifting apart — see CLAUDE.md's UX Consistency rule). */

.ls-toast-stack {
    position: fixed;
    right: 24px; bottom: 24px;
    display: flex; flex-direction: column-reverse;
    gap: 10px;
    z-index: 10000;
    pointer-events: none;
}
.ls-toast {
    pointer-events: auto;
    display: flex; align-items: flex-start; gap: 10px;
    min-width: 280px; max-width: 460px;
    padding: 12px 14px;
    background: #1e293b;
    color: #f1f5f9;
    border-radius: 10px;
    border-left: 4px solid #60a5fa;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    transform: translateY(8px);
    opacity: 0;
    transition: opacity 180ms ease, transform 180ms ease;
    font-size: 13px;
    line-height: 1.45;
}
.ls-toast.ls-toast-in {
    opacity: 1;
    transform: translateY(0);
}
.ls-toast.ls-toast-out {
    opacity: 0;
    transform: translateY(8px);
}
.ls-toast-icon {
    font-size: 18px;
    flex: 0 0 auto;
    margin-top: 1px;
    color: #93c5fd;
}
.ls-toast-body {
    flex: 1 1 auto;
    word-break: break-word;
    white-space: pre-wrap;
}
.ls-toast-close {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    font-size: 13px;
}
.ls-toast-close:hover { color: #f1f5f9; }
.ls-toast-info    { border-left-color: #60a5fa; }
.ls-toast-info    .ls-toast-icon { color: #93c5fd; }
.ls-toast-warning { border-left-color: #f59e0b; background: #1f2937; }
.ls-toast-warning .ls-toast-icon { color: #fbbf24; }
.ls-toast-error   { border-left-color: #ef4444; background: #1f1416; }
.ls-toast-error   .ls-toast-icon { color: #fca5a5; }
.ls-toast-success { border-left-color: #10b981; }
.ls-toast-success .ls-toast-icon { color: #6ee7b7; }

/* Modern confirm modal. Replaces window.confirm() with a centered
   card on a translucent overlay, supports a list of destruction
   details, optional checkboxes, and a red Action button for
   destructive ops. */
.ls-confirm-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 160ms ease;
}
.ls-confirm-overlay.ls-confirm-in  { opacity: 1; }
.ls-confirm-overlay.ls-confirm-out { opacity: 0; }
.ls-confirm-modal {
    background: #ffffff;
    color: #0f172a;
    width: min(540px, 92vw);
    max-height: 80vh;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    display: flex; flex-direction: column;
    transform: translateY(8px) scale(0.985);
    transition: transform 200ms cubic-bezier(.2,.85,.3,1);
}
.ls-confirm-overlay.ls-confirm-in .ls-confirm-modal {
    transform: translateY(0) scale(1);
}
.ls-confirm-title {
    padding: 18px 22px 8px;
    font-size: 16px; font-weight: 700;
    color: #0f172a;
}
.ls-confirm-danger .ls-confirm-title {
    color: #b91c1c;
}
.ls-confirm-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 4px 22px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #334155;
}
.ls-confirm-para  { margin: 6px 0; }
.ls-confirm-list  {
    margin: 6px 0 6px 0;
    padding-left: 22px;
}
.ls-confirm-list li {
    margin: 2px 0;
}
.ls-confirm-input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-top: 8px;
    box-sizing: border-box;
}
.ls-confirm-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
body.dark-mode .ls-confirm-input {
    background: #0f172a; color: #e2e8f0; border-color: #475569;
}
.ls-confirm-options {
    padding: 12px 22px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex; flex-direction: column; gap: 8px;
}
.ls-confirm-option {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px;
    color: #0f172a;
    cursor: pointer;
}
.ls-confirm-option input[type="checkbox"] {
    width: 16px; height: 16px;
    cursor: pointer;
}
.ls-confirm-btn-row {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 12px 16px;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}
.ls-confirm-btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: filter 120ms ease, transform 120ms ease;
}
.ls-confirm-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}
.ls-confirm-btn-cancel {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}
.ls-confirm-btn-confirm {
    background: #2563eb;
    color: #ffffff;
}
.ls-confirm-btn-confirm.ls-confirm-btn-danger {
    background: #dc2626;
}
/* Dark mode tints for the modal — keep the card LIGHT so the body is
   legible, just darken the chrome a touch. */
body.dark-mode .ls-confirm-modal {
    background: #1e293b;
    color: #e2e8f0;
}
body.dark-mode .ls-confirm-title { color: #f1f5f9; }
body.dark-mode .ls-confirm-danger .ls-confirm-title { color: #fca5a5; }
body.dark-mode .ls-confirm-body { color: #cbd5e1; }
body.dark-mode .ls-confirm-options {
    background: #0f172a; border-top-color: #334155;
}
body.dark-mode .ls-confirm-option { color: #e2e8f0; }
body.dark-mode .ls-confirm-btn-row {
    background: #0f172a; border-top-color: #334155;
}
body.dark-mode .ls-confirm-btn-cancel {
    background: #1e293b; color: #e2e8f0; border-color: #475569;
}
