
/* ─── Task input: plain text, no form chrome ─────────────────────── */

.task-input {
    -webkit-appearance: none;
    appearance: none;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    min-height: 0 !important;
    font-size: 0.925rem;
    font-weight: 500;
    color: #1a1f36 !important;
    padding-top: 0.18rem !important;
    padding-bottom: 0.18rem !important;
    padding-left: 0 !important;
    line-height: 1.4;
    cursor: pointer;
    transition: color 0.25s ease;
}

.task-input:focus {
    background: transparent !important;
    box-shadow: none !important;
}

.task-view-row .input-group-text {
    background: transparent !important;
    border: none !important;
    padding: 0 0 0 0.5rem !important;
}

.task-view-row .task-complete-wrapper {
    padding: 0 0.5rem 0 0 !important;
}

.task-view-row .routine-marker {
    padding: 0 0.3rem 0 0 !important;
    color: rgba(64, 81, 137, 0.28);
    font-size: 0.58rem;
    line-height: 1;
    flex-shrink: 0;
}

.list-group-item:hover .routine-marker {
    color: rgba(64, 81, 137, 0.4);
}

.task-view-row .pending-start-badge {
    padding: 0 0.4rem 0 0 !important;
    color: rgba(64, 81, 137, 0.55);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    flex-shrink: 0;
}

.list-group-item:hover .pending-start-badge {
    color: rgba(64, 81, 137, 0.75);
}


/* ─── Completed state ─────────────────────────────────────────────── */

.list-group-item {
    opacity: 1;
    padding: 0.3rem 0.875rem !important;
    border: none !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    transition: opacity 0.25s ease, background-color 0.12s ease;
}

.list-group-item:first-child {
    border-top: none !important;
}

.list-group-item:hover:not(:has(.task-input.text-decoration-line-through)) {
    background-color: rgba(64, 81, 137, 0.025);
}

.list-group-item:has(.task-input.text-decoration-line-through) {
    opacity: 0.65;
}

.task-input.text-decoration-line-through {
    font-style: italic !important;
    color: #747b8a !important;
    text-decoration: line-through !important;
    text-decoration-thickness: 1px !important;
    text-decoration-color: rgba(116, 123, 138, 0.5) !important;
    background: transparent !important;
    cursor: default !important;
}

/* ─── Ended state: visually distinct from "completed" so the two aren't confused ─── */

.list-group-item:has(.task-input.is-ended) {
    opacity: 0.55;
    background-color: rgba(154, 59, 59, 0.03);
}

.task-input.is-ended {
    font-style: italic !important;
    color: #9a3b3b !important;
    text-decoration: line-through !important;
    text-decoration-style: dashed !important;
    text-decoration-thickness: 1px !important;
    text-decoration-color: rgba(154, 59, 59, 0.5) !important;
    background: transparent !important;
    cursor: default !important;
}

/* Completed day — not today: faded letter, dark strikethrough */
.day-button.text-decoration-line-through {
    text-decoration: line-through !important;
    text-decoration-thickness: 1px !important;
    text-decoration-color: rgba(64, 81, 137, 0.6) !important;
    background-color: transparent !important;
    color: rgba(64, 81, 137, 0.25) !important;
    border-color: transparent !important;
}

/* Completed today: keep filled emphasis so today still reads */
.day-button.text-decoration-line-through.is-today {
    background-color: rgba(64, 81, 137, 0.38) !important;
    color: #fff !important;
    text-decoration-color: rgba(255, 255, 255, 0.65) !important;
}


/* ─── Day chips ──────────────────────────────────────────────────── */

.day-button {
    -webkit-appearance: none;
    appearance: none;
    min-width: 20px !important;
    padding: 0.1rem 0.22rem !important;
    font-size: 0.58rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    line-height: 1.25 !important;
    border-radius: 3px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: rgba(64, 81, 137, 0.42) !important;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.day-button + .day-button {
    margin-left: 1px !important;
}

/* Task-view chip row: unified container so 7 chips read as one schedule */
.task-view-row .input-group-text .btn-group {
    background: rgba(64, 81, 137, 0.045);
    border-radius: 4px;
    padding: 1px;
    gap: 0;
}

.task-view-row .day-button + .day-button {
    margin-left: 0 !important;
}

/* Scheduled: full solid fill — white on #405189 is 7:1 contrast, reads instantly */
.day-button.active {
    color: #fff !important;
    font-weight: 600 !important;
    background: #405189 !important;
    border-color: transparent !important;
}

/* Today + scheduled: slightly deeper shade so today reads as "most important" */
.day-button.active.is-today {
    background: #354474 !important;
}

/* Completed + scheduled: light grey chip, blue struck-through letter — overrides the solid "active" fill (today included) */
.day-button.active.text-decoration-line-through {
    background-color: rgba(0, 0, 0, 0.06) !important;
    color: #405189 !important;
    font-weight: 600 !important;
    border-color: transparent !important;
    text-decoration: line-through !important;
    text-decoration-thickness: 1px !important;
    text-decoration-color: #405189 !important;
}

/* Today + unscheduled: barely more visible than regular unselected */
.day-button.is-today:not(.active) {
    font-weight: 600 !important;
    color: rgba(64, 81, 137, 0.55) !important;
}

.day-button:not(:disabled):not(.active):hover {
    color: rgba(64, 81, 137, 0.7) !important;
    background: rgba(64, 81, 137, 0.07) !important;
}

/* ─── Edit panel: repeat day picker ─────────────────────────────── */

.repeat-day-group .day-button {
    min-width: 28px !important;
    padding: 0.22rem 0.4rem !important;
    font-size: 0.65rem !important;
    color: rgba(64, 81, 137, 0.45) !important;
    border: 1.5px solid rgba(64, 81, 137, 0.18) !important;
}

.repeat-day-group .day-button + .day-button {
    margin-left: 3px !important;
}

.repeat-day-group .day-button.active {
    color: #fff !important;
    background: #405189 !important;
    border-color: transparent !important;
}

.repeat-day-group .day-button.active.is-today {
    background: #354474 !important;
    border-color: transparent !important;
}

.repeat-day-group .day-button.is-today:not(.active) {
    border-color: rgba(64, 81, 137, 0.32) !important;
    color: rgba(64, 81, 137, 0.58) !important;
    font-weight: 600 !important;
}


/* ─── Circle completion button ───────────────────────────────────── */

.task-complete-btn {
    -webkit-appearance: none;
    appearance: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 0 !important;
    border-radius: 50% !important;
    border: 1.5px solid rgba(64, 81, 137, 0.4) !important;
    background: transparent !important;
    cursor: pointer;
    padding: 0 !important;
    flex-shrink: 0;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.list-group-item:hover .task-complete-btn:not(.is-complete) {
    border-color: rgba(64, 81, 137, 0.65) !important;
}

.task-complete-btn.is-complete {
    background: #405189 !important;
    border-color: #405189 !important;
}

.task-complete-btn.is-complete::after {
    content: '';
    display: block;
    width: 4px;
    height: 7px;
    border: 1.5px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

.task-complete-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.175rem rgba(64, 81, 137, 0.2);
}

.task-complete-btn:disabled {
    opacity: 0.4;
    cursor: default;
}


/* ─── Push icon: faded at rest, full on hover ────────────────────── */

.task-push-icon,
.task-push-target-icon {
    font-size: 1.25rem !important;
    color: #405189;
    opacity: 0.45;
    cursor: pointer;
    transition: opacity 0.15s ease;
    line-height: 1;
}

.task-push-target-icon {
    margin-left: 0.35rem;
}

.task-push-icon:hover,
.task-push-target-icon:hover {
    opacity: 1 !important;
}

.task-view-row:has(.task-complete-btn.is-complete) .task-push-icon,
.task-view-row:has(.task-complete-btn.is-complete) .task-push-target-icon,
.task-view-row:has(.task-complete-btn.is-complete) .task-end-icon {
    opacity: 0 !important;
    pointer-events: none;
}

/* End icon: same faded-at-rest treatment, but reads as a caution color on hover */
.task-end-icon {
    font-size: 1.25rem !important;
    color: #405189;
    opacity: 0.45;
    cursor: pointer;
    transition: opacity 0.15s ease, color 0.15s ease;
    line-height: 1;
    margin-left: 0.35rem;
}

.task-end-icon:hover {
    opacity: 1 !important;
    color: #dc3545;
}

/* Restore icon: replaces the end icon for a task that's already ended */
.task-restore-icon {
    font-size: 1.25rem !important;
    color: #405189;
    opacity: 0.45;
    cursor: pointer;
    transition: opacity 0.15s ease;
    line-height: 1;
    margin-left: 0.35rem;
}

.task-restore-icon:hover {
    opacity: 1 !important;
}

/* Reserve space for the skip icon so task name width stays stable */
.task-view-row .d-flex.justify-content-end.flex-shrink-0 {
    min-width: 1.5rem;
}


/* ─── Follow button ──────────────────────────────────────────────── */

.follow-btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem !important;
    border-radius: 999px !important;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1.5px solid transparent !important;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.2s ease;
}

.follow-btn.not-following {
    background: #405189 !important;
    border-color: #405189 !important;
    color: #fff !important;
}

.follow-btn.not-following:hover {
    background: #334269 !important;
    border-color: #334269 !important;
}

.follow-btn.following {
    background: transparent !important;
    border-color: rgba(108, 117, 125, 0.4) !important;
    color: #6c757d !important;
}

.follow-btn.following:hover {
    border-color: rgba(220, 53, 69, 0.5) !important;
    color: #dc3545 !important;
}

.follow-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.follow-btn-animate {
    animation: follow-btn-pop 0.3s ease;
}

@keyframes follow-btn-pop {
    0% { transform: scale(1); }
    40% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}


/* ─── Edit and new-task panels ───────────────────────────────────── */

.task-edit-row {
    background-color: rgba(64, 81, 137, 0.035) !important;
    border: 1px solid rgba(64, 81, 137, 0.1) !important;
    border-radius: 6px !important;
    padding: 0.6rem 0.7rem !important;
}

.edit-task-input:focus,
.new-task-input:focus {
    border-color: rgba(64, 81, 137, 0.45) !important;
    box-shadow: 0 0 0 0.175rem rgba(64, 81, 137, 0.12) !important;
}

/* iOS Safari auto-zooms on focus for inputs under 16px; keep these at 16px so it never triggers */
.edit-task-input,
.new-task-input {
    font-size: 16px !important;
}

.save-edit-btn,
.save-task-btn {
    background-color: #405189 !important;
    border-color: #405189 !important;
    color: #fff !important;
}

.save-edit-btn:hover,
.save-task-btn:hover {
    background-color: #354474 !important;
    border-color: #354474 !important;
    color: #fff !important;
}

.cancel-edit-btn,
.cancel-task-btn {
    background-color: transparent !important;
    border-color: rgba(64, 81, 137, 0.2) !important;
    color: #6b7a99 !important;
}

.cancel-edit-btn:hover,
.cancel-task-btn:hover {
    background-color: rgba(64, 81, 137, 0.07) !important;
    border-color: rgba(64, 81, 137, 0.35) !important;
    color: #405189 !important;
}

/* New-task row needs more vertical room than compact task rows */
.list-group-item.new-task-line {
    padding: 0.5rem 0.875rem !important;
}

.new-task-line .input-group-text {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem !important;
    background-color: rgba(64, 81, 137, 0.03) !important;
    border-color: rgba(64, 81, 137, 0.2) !important;
}


/* ─── Focus area cards: flat, compact stack, left accent ─────────── */

.card {
    border-color: rgba(0, 0, 0, 0.07) !important;
}

.focus-area-card {
    box-shadow: none !important;
    margin-bottom: 0.375rem !important;
    border-left-width: 3px !important;
    border-left-color: #405189 !important;
}

.card-header.bg-primary-subtle {
    background: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    padding: 0.45rem 0.875rem !important;
}

.card-header.bg-primary-subtle h5 {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.09em !important;
    text-transform: uppercase !important;
    color: #405189 !important;
    line-height: 1 !important;
}

.add-task-icon {
    font-size: 0.875rem !important;
    color: #405189;
    opacity: 0.35;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.card-header:hover .add-task-icon,
.add-task-icon:hover {
    opacity: 1;
}

@media (max-width: 767.98px) {
    .add-task-icon {
        opacity: 0.65;
    }
}


/* ─── Misc ───────────────────────────────────────────────────────── */

#page-content {
    padding-top: 0px !important;
}

body {
    background-color: #F3F6F9 !important;
}


/* ─── Horizon navigation: segmented control ─────────────────────── */

.horizon-nav {
    display: inline-flex;
    background: rgba(64, 81, 137, 0.08);
    border-radius: 8px;
    padding: 2px;
    gap: 1px;
}

.horizon-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.3rem 0.875rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: rgba(64, 81, 137, 0.68);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.horizon-tab.active {
    background: #fff;
    color: #405189;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(64, 81, 137, 0.10);
}

.horizon-tab:not(.active):hover {
    color: #405189;
}

/* On narrow screens, stretch the segmented control full width so it never overflows */
@media (max-width: 575.98px) {
    .horizon-nav {
        display: flex;
        width: 100%;
    }

    .horizon-tab {
        flex: 1;
    }
}


/* ─── Timeframe heading: Today/Tomorrow/This Week/Next Week ──────── */

.period-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    row-gap: 0.15rem;
    column-gap: 1rem;
}

.period-heading-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: #1a1f36;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.period-heading-subtitle {
    font-size: 0.67rem;
    font-weight: 600;
    color: rgba(64, 81, 137, 0.5);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 0.15rem;
}

/* Historical-snapshot quote: small, muted, sits beside the heading and never forces layout to grow */
.period-heading-quote {
    font-size: 0.7rem;
    font-style: italic;
    font-weight: 400;
    color: rgba(64, 81, 137, 0.45);
    max-width: 360px;
    line-height: 1.3;
}

@media (max-width: 575.98px) {
    .period-heading-quote {
        font-size: 0.62rem;
        max-width: 100%;
        flex-basis: 100%;
    }
}


/* ─── Organize Focus Areas modal ─────────────────────────────────── */

.fa-modal-dialog {
    max-width: 420px;
}

.fa-modal-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.fa-modal-title {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #405189 !important;
    margin: 0;
}

.fa-modal-body {
    padding: 0.5rem 0.75rem;
    min-height: 120px;
}

.fa-modal-footer {
    padding: 0.625rem 0.875rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
}

.fa-sort-list {
    margin: 0;
    padding: 0;
}

.fa-sort-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.375rem;
    min-height: 44px;
    border-radius: 6px;
    transition: background-color 0.1s ease;
    cursor: default;
}

.fa-sort-item + .fa-sort-item {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.fa-sort-item.fa-dragging {
    opacity: 0.35;
}

.fa-sort-item.fa-drag-over {
    background: rgba(64, 81, 137, 0.05);
}

.fa-drag-handle {
    color: rgba(64, 81, 137, 0.3);
    font-size: 1rem;
    cursor: grab;
    flex-shrink: 0;
    line-height: 1;
}

.fa-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1a1f36;
}

.fa-name-input {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1a1f36;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    padding: 0.2rem 0.375rem;
    border-radius: 4px;
    outline: none;
    width: 100%;
}

.fa-name-input:focus {
    border-color: rgba(64, 81, 137, 0.4);
    box-shadow: 0 0 0 0.175rem rgba(64, 81, 137, 0.12);
    background: #fff;
}

/* The onboarding "Add a focus area" input shares .fa-name-input with the rename-in-place
   fields in the Organize Focus Areas modal, which are meant to look like plain text until
   clicked - but a brand new user has no cue that this one is even a text box, since there's
   nothing on the page yet to click "into". Give it a visible resting background instead, on
   top of the class' existing focus border/ring, without touching the shared rename fields. */
#focusAreaOnboardingCustomInput {
    background: #eef0f5;
    border-color: rgba(64, 81, 137, 0.15);
}

#focusAreaOnboardingCustomInput:focus {
    background: #dfe3ec;
}

.fa-row-controls {
    display: flex;
    gap: 1px;
    flex-shrink: 0;
}

.fa-move-btn {
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: rgba(64, 81, 137, 0.38);
    border-radius: 5px;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.fa-move-btn:hover {
    background: rgba(64, 81, 137, 0.08);
    color: #405189;
}

.fa-loading-row {
    font-size: 0.8rem;
    color: rgba(64, 81, 137, 0.45);
    text-align: center;
    padding: 1.5rem 0;
    list-style: none;
}

.fa-add-btn {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #405189 !important;
    border: 1px solid rgba(64, 81, 137, 0.2) !important;
    background: transparent !important;
    padding: 0.25rem 0.625rem !important;
}

.fa-add-btn:hover {
    background: rgba(64, 81, 137, 0.06) !important;
    border-color: rgba(64, 81, 137, 0.35) !important;
}


/* ─── Focus area onboarding modal ─────────────────────────────────── */

.fa-onboarding-text {
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 0.75rem;
}

.fa-suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Unselected: stays outlined and quiet */
.fa-suggestion-chip {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #405189 !important;
    border: 1px solid rgba(64, 81, 137, 0.25) !important;
    background: rgba(64, 81, 137, 0.04) !important;
    border-radius: 999px !important;
    padding: 0.3rem 0.85rem !important;
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.fa-suggestion-chip:hover:not(.fa-suggestion-selected) {
    background: rgba(64, 81, 137, 0.1) !important;
    border-color: rgba(64, 81, 137, 0.4) !important;
}

/* Selected: filled, checked, a touch bolder - meant to stand out without being loud */
.fa-suggestion-chip.fa-suggestion-selected {
    font-weight: 600 !important;
    color: #1f7a45 !important;
    border-color: rgba(47, 158, 90, 0.4) !important;
    background: #e3f6ea !important;
}

.fa-your-areas-section {
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.fa-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(64, 81, 137, 0.55);
    margin-bottom: 0.5rem;
}

.fa-onboarding-added-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    min-height: 1.75rem;
}

.fa-onboarding-empty-hint {
    font-size: 0.8rem;
    font-style: italic;
    color: rgba(64, 81, 137, 0.4);
}

.fa-onboarding-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1f7a45;
    background: #e3f6ea;
    border-radius: 999px;
    padding: 0.2rem 0.5rem 0.2rem 0.7rem;
}

.fa-onboarding-pill-remove {
    display: flex;
    align-items: center;
    border: none;
    background: transparent;
    color: rgba(31, 122, 69, 0.6);
    padding: 0;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}

.fa-onboarding-pill-remove:hover {
    color: #1f7a45;
}

#focusAreaOnboardingDoneBtn:disabled {
    opacity: 0.45;
    cursor: default;
}

.fa-onboarding-reassurance {
    font-size: 0.72rem;
    font-style: italic;
    color: rgba(64, 81, 137, 0.4);
    margin: 1rem 0 0;
}
