/*
 * Mobile app (Capacitor) — task detail modal simplification.
 * Scoped to body.mobile-app-mode so the website modal is unaffected.
 * Pairs with assets/js/mobile_app_modal.js (which builds the "More details" collapse).
 */

/* comfortable body spacing */
body.mobile-app-mode .task-view-modal-body {
    font-size: 14px;
    padding: 4px 4px 10px;
}

/* turn the "Label: value" rows into clean key/value rows */
body.mobile-app-mode .task-view-modal-body .col-md-12.mb15 {
    margin-bottom: 0 !important;
    padding: 10px 2px;
    border-bottom: 0.5px solid #f1f1f3;
}
body.mobile-app-mode .task-view-modal-body .col-md-12.mb15 strong {
    color: #8c8c8c;
    font-weight: 500;
}

/* assignee + status header — give it a little breathing room */
body.mobile-app-mode .task-view-modal-body .d-flex.m0 {
    padding: 6px 2px 12px;
}
body.mobile-app-mode .task-view-modal-body .badge {
    font-size: 11.5px;
    padding: 4px 10px;
    border-radius: 20px;
}

/* the "More details" toggle button (created by JS) */
body.mobile-app-mode .m-more-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: #f5f5f7;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: #555;
    margin: 12px 0 8px;
}
body.mobile-app-mode .m-more-toggle .m-more-chev {
    transition: transform 0.2s ease;
    display: inline-flex;
}
body.mobile-app-mode .m-more-toggle.open .m-more-chev {
    transform: rotate(180deg);
}
body.mobile-app-mode .m-more-wrap.m-hide {
    display: none;
}

/* section headings inside the modal (checklist, sub tasks, dependency, activity) */
body.mobile-app-mode .task-view-modal-body .b-t > .pb10.pt10 > strong,
body.mobile-app-mode .box-title > span {
    font-size: 14px;
    font-weight: 600;
    color: #2b2b2b;
}

/* comment box + buttons: bigger touch targets */
body.mobile-app-mode .task-view-modal-body .comment-text,
body.mobile-app-mode .task-view-modal-body textarea.form-control {
    border-radius: 10px;
}
body.mobile-app-mode .task-view-modal-body .btn {
    border-radius: 9px;
}

/* tidy the activity log spacing */
body.mobile-app-mode .project-activity-logs-container {
    font-size: 13px;
}

/* ---- turn ajax modals into full-screen app screens ---- */
body.mobile-app-mode #ajaxModal .modal-dialog {
    max-width: 100%;
    width: 100%;
    margin: 0;
    min-height: 100%;
}
body.mobile-app-mode #ajaxModal .modal-content {
    min-height: 100vh;
    border: none;
    border-radius: 0;
}

/* sticky top app-bar */
body.mobile-app-mode #ajaxModal .modal-header {
    position: sticky;
    top: 0;
    z-index: 6;
    background: #fff;
    border-bottom: 0.5px solid #ececf1;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
body.mobile-app-mode #ajaxModal .modal-title,
body.mobile-app-mode #ajaxModal #ajaxModalTitle {
    font-size: 16px;
    font-weight: 500;
}

/* back arrow (added by JS) */
body.mobile-app-mode .m-modal-back {
    background: none;
    border: none;
    padding: 2px 6px 2px 0;
    color: #333;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

/* body: leave room for the sticky footer */
body.mobile-app-mode #ajaxModal .modal-body {
    padding: 14px 14px 96px;
}

/* sticky bottom action bar */
body.mobile-app-mode #ajaxModal .modal-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    background: #fff;
    border-top: 0.5px solid #ececf1;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 6;
}
body.mobile-app-mode #ajaxModal .modal-footer .btn {
    flex: 1 1 auto;
}

/* slide-in feel */
body.mobile-app-mode #ajaxModal.show .modal-dialog {
    animation: mAppSlideIn 0.22s ease;
}
@keyframes mAppSlideIn {
    from { transform: translateX(24px); opacity: 0.6; }
    to { transform: translateX(0); opacity: 1; }
}
