/* === ОТЛОЖЕННЫЕ СООБЩЕНИЯ: chip v shapke + bottom-sheet planirovshchika i spiska === */

/* Chip «🕒 N» v shapke chata (ryadom s poiskom) */
.sched-chip {
    display: inline-flex; align-items: center; gap: 3px;
    border: none; cursor: pointer;
    background: var(--soft, #eef2f6); color: var(--text-secondary, #5a6b78);
    border-radius: 999px; padding: 4px 9px; margin-right: 2px;
    font-size: 13px; line-height: 1; -webkit-tap-highlight-color: transparent;
    flex: 0 0 auto;
}
.sched-chip-n { font-weight: 700; font-size: 12.5px; }
body.dark-theme .sched-chip { background: #26303b; color: #aab6c2; }

/* Overlay + sheet (v stile attach-menu-sheet) */
.sched-ov {
    position: fixed; inset: 0; z-index: 100300;
    background: rgba(0, 12, 24, .35);
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    animation: schedFade .16s ease;
}
@keyframes schedFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes schedUp { from { transform: translateY(36px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.sched-sheet {
    width: calc(100% - 16px); max-width: 480px;
    margin: 0 8px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--panel, #fff); border-radius: 22px;
    padding: 4px 14px 14px; box-shadow: 0 12px 44px rgba(0, 16, 34, .30);
    animation: schedUp .26s cubic-bezier(.22, 1, .36, 1);
    max-height: 74vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.sched-grabber {
    width: 46px; height: 5px; border-radius: 999px;
    background: var(--text-tertiary, #6E7177); opacity: .4;
    margin: 0 auto; box-sizing: content-box;
    padding: 9px 40px; background-clip: content-box; cursor: pointer;
}
.sched-title {
    font-size: 16px; font-weight: 700; letter-spacing: -.01em;
    color: var(--text, #14232f); text-align: center; padding: 2px 0 8px;
}
.sched-preview {
    font-size: 13.5px; color: var(--text-secondary, #5a6b78);
    background: var(--soft, #eef2f6); border-radius: 12px;
    padding: 8px 12px; margin-bottom: 10px;
    max-height: 62px; overflow: hidden; word-break: break-word;
}
.sched-dim { opacity: .65; }

/* Ryad «prikrepit fajl» (label s nativnym input type=file — nadyozhno na iOS) */
.sched-attach-row {
    display: block; position: relative; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--brand, #005f6d);
    padding: 9px 12px; border-radius: 12px;
    background: var(--soft, #eef2f6); margin-bottom: 10px;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sched-attach-row input[type="file"] {
    position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
    left: 50%; bottom: 0; pointer-events: none; border: 0; padding: 0; margin: 0;
}

/* Presety vremeni */
.sched-presets { display: flex; flex-direction: column; gap: 7px; }
.sched-preset {
    border: none; cursor: pointer; text-align: left;
    background: var(--soft, #eef2f6); color: var(--text, #14232f);
    border-radius: 13px; padding: 12px 14px;
    font-size: 15px; font-weight: 600; letter-spacing: -.01em;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s ease;
}
.sched-preset:active { background: #dfe7ee; }
.sched-preset:disabled { opacity: .5; }
.sched-preset-custom { color: var(--brand, #005f6d); }

/* Svoj vybor daty-vremeni */
.sched-custom { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.sched-dt {
    flex: 1 1 auto; min-width: 0;
    border: 1px solid rgba(0, 20, 40, .14); border-radius: 12px;
    padding: 10px 10px; font-size: 15px;
    background: var(--panel, #fff); color: var(--text, #14232f);
    font-family: inherit;
}
.sched-go {
    flex: 0 0 auto; border: none; cursor: pointer;
    background: var(--brand, #005f6d); color: #fff;
    border-radius: 12px; padding: 11px 14px;
    font-size: 14.5px; font-weight: 700;
    -webkit-tap-highlight-color: transparent;
}
.sched-go:disabled { opacity: .6; }

/* Spisok otlozhennyh */
.sched-list { display: flex; flex-direction: column; gap: 9px; }
.sched-empty {
    text-align: center; color: var(--text-secondary, #5a6b78);
    font-size: 14px; padding: 18px 0 10px;
}
.sched-item {
    background: var(--soft, #eef2f6); border-radius: 14px;
    padding: 10px 12px;
}
.sched-item-time { font-size: 13px; font-weight: 700; color: var(--brand, #005f6d); margin-bottom: 3px; }
.sched-item-prev {
    font-size: 14px; color: var(--text, #14232f);
    word-break: break-word; margin-bottom: 8px;
    max-height: 60px; overflow: hidden;
}
.sched-file-tag { font-size: 13px; color: var(--text-secondary, #5a6b78); margin-right: 6px; }
.sched-item-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sched-act {
    border: none; cursor: pointer;
    background: var(--panel, #fff); color: var(--text, #14232f);
    border-radius: 999px; padding: 6px 11px;
    font-size: 12.5px; font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 3px rgba(0, 16, 34, .10);
}
.sched-act-del { color: #c23b3b; }
.sched-item-edit { margin-top: 9px; }
.sched-edit-ta {
    width: 100%; box-sizing: border-box; resize: vertical;
    border: 1px solid rgba(0, 20, 40, .14); border-radius: 12px;
    padding: 9px 11px; font-size: 14.5px; font-family: inherit;
    background: var(--panel, #fff); color: var(--text, #14232f);
}
.sched-edit-btns { display: flex; gap: 8px; margin-top: 7px; }
.sched-edit-cancel {
    border: none; cursor: pointer; background: transparent;
    color: var(--text-secondary, #5a6b78); font-size: 14px; font-weight: 600;
    padding: 10px 8px; -webkit-tap-highlight-color: transparent;
}
.sched-edit-dt { width: 100%; box-sizing: border-box; }

/* Tyomnaya tema */
body.dark-theme .sched-sheet { background: #1c232b; }
body.dark-theme .sched-title { color: #e7edf3; }
body.dark-theme .sched-preview,
body.dark-theme .sched-attach-row,
body.dark-theme .sched-preset,
body.dark-theme .sched-item { background: #26303b; }
body.dark-theme .sched-preset { color: #e7edf3; }
body.dark-theme .sched-preset:active { background: #303c49; }
body.dark-theme .sched-preset-custom,
body.dark-theme .sched-attach-row { color: #4fc3d4; }
body.dark-theme .sched-preview { color: #aab6c2; }
body.dark-theme .sched-item-time { color: #4fc3d4; }
body.dark-theme .sched-item-prev { color: #e7edf3; }
body.dark-theme .sched-act { background: #1c232b; color: #e7edf3; box-shadow: none; }
body.dark-theme .sched-act-del { color: #ff7b7b; }
body.dark-theme .sched-dt,
body.dark-theme .sched-edit-ta { background: #1c232b; color: #e7edf3; border-color: rgba(255, 255, 255, .14); }
