/* PanaROXY mobile feature panes — planner, budget, saved, messages.
   Loaded after panama-chat.css. Append-only dark-mode overrides at end. */

/* ── Tab bar scroll (8 tabs interim layout) ── */
#panama-mobile-tabs-wrap {
    position: relative;
    flex-shrink: 0;
}
#panama-mobile-tabs.visible {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
}
#panama-mobile-tabs.visible::-webkit-scrollbar {
    display: none;
}
#panama-mobile-tabs-wrap.pmobile-tabs-scrollable::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 32px;
    pointer-events: none;
    background: linear-gradient(to right, transparent, #f5f5f5 70%);
}
#panama-mobile-tabs-wrap.pmobile-tabs-scrollable .pmobile-tabs-swipe-hint {
    display: block;
}
#panama-mobile-tabs-wrap.pmobile-tabs-hint-dismissed .pmobile-tabs-swipe-hint,
#panama-mobile-tabs-wrap.pmobile-tabs-hint-dismissed.pmobile-tabs-scrollable::after {
    display: none;
}
.pmobile-tabs-swipe-hint {
    display: none;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #888;
    pointer-events: none;
    z-index: 1;
    padding: 2px 6px;
    background: rgba(245, 245, 245, 0.9);
    border-radius: 8px;
}
#panama-mobile-tabs .pmobile-tab {
    flex: 0 0 auto;
    min-width: 70px;
    font-size: 14px;
    padding: 10px 8px;
    white-space: nowrap;
}

/* ── Shared pane chrome ── */
.pmobile-extra-pane {
    display: none;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px 20px;
    background: #fafafa;
}
.pmobile-extra-pane.active {
    display: block;
}
.pmobile-loading,
.pmobile-error,
.pmobile-empty {
    text-align: center;
    color: #666;
    font-size: 17px;
    line-height: 1.5;
    padding: 24px 12px;
}
.pmobile-error { color: #c0392b; }
.pmobile-pane-header { margin-bottom: 12px; }
.pmobile-progress {
    font-size: 17px;
    font-weight: 600;
    color: #0F6E56;
}

/* ── Planner choice / confirm (reuses desktop pplan-* inside mobile pane) ── */
.pmobile-planner-choice-host .pplan-choice-screen {
    padding: 8px 4px 16px;
}
.pmobile-planner-choice-host .pplan-choice-cards {
    flex-direction: column;
}
.pmobile-planner-choice-host .pplan-choice-card {
    max-width: none;
}
.pmobile-planner-choice-host .pplan-choice-btn,
.pmobile-planner-choice-host .pplan-confirm-go,
.pmobile-planner-choice-host .pplan-confirm-skip {
    min-height: 44px;
    font-size: 17px;
}
.pmobile-planner-choice-host .pplan-confirm-screen {
    padding: 8px 4px 20px;
}
.pmobile-planner-choice-host .pplan-confirm-input,
.pmobile-planner-choice-host .pplan-chip-input,
.pmobile-planner-choice-host .pplan-confirm-textarea {
    font-size: 17px;
}
.pmobile-planner-choice-host .pplan-choice-title { font-size: 1.15rem; }
.pmobile-planner-choice-host .pplan-choice-intro,
.pmobile-planner-choice-host .pplan-choice-card-desc,
.pmobile-planner-choice-host .pplan-confirm-intro,
.pmobile-planner-choice-host .pplan-confirm-hint,
.pmobile-planner-choice-host .pplan-generate-note { font-size: 0.92rem; }
.pmobile-planner-choice-host .pplan-choice-card-title,
.pmobile-planner-choice-host .pplan-confirm-title { font-size: 1.05rem; }
.pmobile-planner-choice-host .pplan-confirm-label { font-size: 0.95rem; }
.pmobile-planner-choice-host .pplan-chip,
.pmobile-planner-choice-host .pplan-chip-empty { font-size: 0.92rem; }

/* ── Planner ── */
.pmobile-phase-section {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.pmobile-phase-summary {
    padding: 12px 14px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.pmobile-phase-summary::-webkit-details-marker { display: none; }
.pmobile-phase-count {
    font-size: 14px;
    color: #888;
    font-weight: 500;
}
.pmobile-phase-body { padding: 0 8px 8px; }
.pmobile-task-row {
    border-top: 1px solid #f0f0f0;
    padding: 8px 4px;
    border-left: 3px solid transparent;
    border-radius: 8px;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.pmobile-task-row.pmobile-task-expanded {
    background: #f6f9f7;
    border-left-color: #0F6E56;
    padding-left: 9px;
    margin: 2px 0;
}
.pmobile-task-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}
.pmobile-task-check {
    width: 26px;
    height: 26px;
    min-width: 26px;
    padding: 0;
    border: 2px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pmobile-sub-check {
    width: 22px;
    height: 22px;
    min-width: 22px;
    padding: 0;
    border: 2px solid #ccc;
    border-radius: 5px;
    background: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pmobile-task-check-on {
    background: #0F6E56;
    border-color: #0F6E56;
    color: #fff;
}
.pmobile-task-title-btn {
    flex: 1;
    text-align: left;
    border: none;
    background: none;
    font-size: 17px;
    padding: 8px 0;
    cursor: pointer;
    color: #222;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}
.pmobile-task-title-btn:focus,
.pmobile-task-title-btn:active {
    outline: none;
    background: transparent;
    box-shadow: none;
}
.pmobile-task-row.pmobile-task-expanded .pmobile-task-title-btn {
    font-weight: 600;
    color: #1a4d3e;
}
.pmobile-task-done .pmobile-task-title-btn {
    text-decoration: line-through;
    color: #888;
}
.pmobile-task-due,
.pmobile-sub-count {
    font-size: 14px;
    color: #666;
}
.pmobile-priority {
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: capitalize;
}
.pmobile-priority-high { background: #fde8e8; color: #c0392b; }
.pmobile-priority-medium { background: #fff3cd; color: #856404; }
.pmobile-priority-low { background: #e8f5e9; color: #2e7d32; }
.pmobile-task-detail {
    padding: 4px 4px 10px 34px;
    font-size: 16px;
    color: #444;
    border-top: 1px solid rgba(15, 110, 86, 0.12);
    margin-top: 4px;
}
.pmobile-subtask-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}
.pmobile-subtask-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-size: 16px;
}

/* ── Budget ── */
.pmobile-budget-summary {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 17px;
}
.pmobile-budget-summary strong { display: block; font-size: 18px; }
.pmobile-budget-label { font-size: 13px; color: #888; }
.pmobile-budget-cat {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.pmobile-budget-cat-summary {
    padding: 12px 14px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    list-style: none;
}
.pmobile-budget-cat-summary::-webkit-details-marker { display: none; }
.pmobile-cat-totals { font-size: 13px; color: #666; font-weight: 500; }
.pmobile-budget-items { padding: 0 12px 10px; }
.pmobile-budget-item {
    border-top: 1px solid #f0f0f0;
    padding: 10px 0;
    font-size: 17px;
}
.pmobile-budget-item-label { font-weight: 500; margin-bottom: 6px; }
.pmobile-budget-item-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.pmobile-budget-actual-btn,
.pmobile-budget-notes-btn {
    border: none;
    background: #f0f7f4;
    color: #0F6E56;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 17px;
    min-height: 44px;
    cursor: pointer;
    text-align: left;
}
.pmobile-budget-notes-add { color: #888; background: #f5f5f5; }
.pmobile-budget-edit {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}
.pmobile-budget-input,
.pmobile-budget-notes-input {
    font-size: 17px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    min-height: 44px;
    flex: 1;
    min-width: 120px;
}
.pmobile-budget-notes-input { min-height: 80px; width: 100%; }
.pmobile-edit-save,
.pmobile-edit-cancel {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 14px;
    font-size: 17px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}
.pmobile-edit-save { background: #0F6E56; color: #fff; }
.pmobile-edit-cancel { background: #eee; color: #333; }
.pmobile-budget-date { font-size: 13px; color: #888; margin-top: 4px; }

/* ── Saved ── */
.pmobile-saved-section { margin-bottom: 20px; }
.pmobile-saved-heading {
    font-size: 17px;
    margin: 0 0 10px;
    color: #333;
}
.pmobile-saved-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 8px;
    min-height: 44px;
}
.pmobile-saved-title { font-size: 17px; font-weight: 500; }
.pmobile-saved-sub { font-size: 15px; color: #666; margin-top: 2px; }
.pmobile-saved-del {
    min-width: 44px;
    min-height: 44px;
    border: none;
    background: none;
    font-size: 21px;
    cursor: pointer;
}
.pmobile-del-confirm { font-size: 15px; color: #c0392b; }
.pmobile-del-yes {
    min-height: 44px;
    padding: 8px 12px;
    border: none;
    background: #c0392b;
    color: #fff;
    border-radius: 8px;
    font-size: 17px;
    cursor: pointer;
}

/* ── Messages ── */
.pmobile-msgs-back {
    border: none;
    background: none;
    color: #0F6E56;
    font-size: 17px;
    min-height: 44px;
    padding: 8px 0;
    cursor: pointer;
}
.pmobile-msgs-thread-title {
    font-size: 19px;
    margin: 0 0 6px;
}
.pmobile-msgs-list { display: flex; flex-direction: column; gap: 8px; }
.pmobile-msgs-card {
    text-align: left;
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    padding: 14px;
    min-height: 44px;
    cursor: pointer;
}
.pmobile-msgs-card-label { font-size: 17px; font-weight: 600; }
.pmobile-msgs-card-meta { font-size: 15px; color: #666; margin-top: 4px; }
.pmobile-role-pill {
    display: inline-block;
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e8f0ed;
    color: #0F6E56;
    text-transform: capitalize;
}
.pmobile-msgs-thread { margin-top: 12px; }
.pmobile-msg {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 10px;
    font-size: 17px;
}
.pmobile-msg-inbound,
.pmobile-msg-inbound_bound { background: #fff; border: 1px solid #e0e0e0; }
.pmobile-msg-outbound,
.pmobile-msg-my-reply,
.pmobile-msg-my_reply { background: #e8f5f0; border: 1px solid #c5e6d8; }
.pmobile-msg-meta { font-size: 13px; color: #888; margin-bottom: 6px; }
.pmobile-msg-trans { font-size: 15px; color: #555; margin-top: 8px; font-style: italic; }
.pmobile-msgs-hint {
    font-size: 15px;
    color: #888;
    margin-top: 16px;
    line-height: 1.4;
}

/* ── Toast + update cards (chat bubble) ── */
.pmobile-toast {
    position: fixed;
    bottom: 88px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a2e28;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 16px;
    z-index: 10050;
    max-width: 90vw;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.pmobile-toast-err { background: #922b21; }
.pmobile-update-card {
    margin-top: 10px;
    padding: 12px 14px;
    background: #e8f5f0;
    border: 1px solid #b8dcc8;
    border-radius: 10px;
    font-size: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.pmobile-update-undo {
    border: none;
    background: none;
    color: #0F6E56;
    text-decoration: underline;
    font-size: 16px;
    cursor: pointer;
    min-height: 44px;
    padding: 4px 8px;
}
.pmobile-sync-footer {
    margin-top: 16px;
    font-size: 14px;
    color: #888;
    text-align: center;
}
.pmobile-sync-footer a { color: #0F6E56; }

/* === Dark mode (body.panama-dark) — mobile panes === */
body.panama-dark .pmobile-extra-pane { background: #0f1a17; }
body.panama-dark .pmobile-phase-section,
body.panama-dark .pmobile-budget-cat,
body.panama-dark .pmobile-budget-summary,
body.panama-dark .pmobile-saved-card,
body.panama-dark .pmobile-msgs-card,
body.panama-dark .pmobile-msg-inbound { background: #13201c; border-color: #2a3d36; }
body.panama-dark .pmobile-task-row.pmobile-task-expanded {
    background: #152420;
    border-left-color: #37c19e;
}
body.panama-dark .pmobile-task-row.pmobile-task-expanded .pmobile-task-title-btn {
    color: #b8e6d4;
}
body.panama-dark .pmobile-task-detail {
    border-top-color: rgba(55, 193, 158, 0.2);
    color: #c5d5ce;
}
body.panama-dark .pmobile-task-title-btn,
body.panama-dark .pmobile-saved-title,
body.panama-dark .pmobile-msgs-card-label,
body.panama-dark .pmobile-msgs-thread-title { color: #e8f0ed; }
body.panama-dark .pmobile-task-check,
body.panama-dark .pmobile-sub-check { background: #1a2e28; border-color: #3a5248; }
body.panama-dark .pmobile-budget-actual-btn,
body.panama-dark .pmobile-budget-notes-btn { background: #1a2e28; color: #7dcea0; }
body.panama-dark .pmobile-msg-outbound,
body.panama-dark .pmobile-msg-my-reply { background: #1a3d30; border-color: #2a5c48; }
body.panama-dark .pmobile-update-card { background: #1a3d30; border-color: #2a5c48; color: #e8f0ed; }
body.panama-dark #panama-mobile-tabs-wrap.pmobile-tabs-scrollable::after {
    background: linear-gradient(to right, transparent, #1a2e28 70%);
}
body.panama-dark .pmobile-tabs-swipe-hint {
    color: #a8b9b2;
    background: rgba(26, 46, 40, 0.92);
}

/* === END panama-mobile.css === */
