/* Loan settings (01Shared/Setup.aspx) and My account (01Shared/Account.aspx).
   Builds on CS/Calculator.css and CS/Settings.css. */
.settings2 [hidden] { display: none !important; }
.settings2 { padding-bottom: 96px; }   /* room for the save bar */

/* Header */
.s2-head { align-items: center; display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; }
.s2-head h1 { font-size: 1.4rem; margin: 0 0 2px; }
.s2-head .hint { margin: 0; }
.s2-head-links { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.s2-link { color: var(--brand-dark); cursor: pointer; font-weight: 600; text-decoration: none; }
.s2-link:hover { text-decoration: underline; }

/* Menu beside the sections */
.s2-layout { align-items: flex-start; display: grid; gap: 16px; grid-template-columns: 220px minmax(0, 1fr); }
.s2-nav { display: flex; flex-direction: column; gap: 1px; position: sticky; top: 12px; }
/* group headings: navy bars like the home page cards' headings, so they stand out from the links under them */
.s2-group { background: #1f3c6b; border-radius: 5px; color: #fff; font-size: .82rem; font-weight: 700; margin: 14px 0 4px; padding: 4px 10px; }
html.dark .s2-group { background: #2d538f; }
.s2-nav a { border-radius: 8px; color: var(--ink); padding: 7px 10px; text-decoration: none; }
.s2-nav a:hover { background: var(--card); }
.s2-nav a.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.s2-nav a.per-area::after { color: var(--muted); content: "per area"; font-size: .68rem; font-weight: 400; margin-left: 6px; }
.s2-nav a.dirty::before { background: #e08a00; border-radius: 50%; content: ""; display: inline-block; height: 7px; margin: 0 6px 1px 0; vertical-align: middle; width: 7px; }

/* Find a setting */
.s2-find { position: relative; }
.s2-find input { background: var(--field); border: 1px solid var(--field-line); border-radius: 8px; box-sizing: border-box; color: var(--ink); font: inherit; padding: 8px 10px; width: 100%; }
.s2-results { background: var(--field); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); left: 0; margin-top: 4px; min-width: 100%; padding: 4px; position: absolute; width: 300px; z-index: 20; }
.s2-results button { background: none; border: 0; border-radius: 6px; color: var(--ink); cursor: pointer; display: block; font: inherit; padding: 6px 8px; text-align: left; width: 100%; }
.s2-results button:hover, .s2-results button:focus { background: var(--brand-soft); outline: none; }
.s2-results small { color: var(--muted); display: block; font-size: .75rem; }
.s2-results p { color: var(--muted); margin: 6px 8px; }
@keyframes s2flash { from { background: var(--brand-soft); } to { background: transparent; } }
.s2-flash { animation: s2flash 1.6s ease-out; }

/* The area bar above the per-area sections */
.s2-areabar-top { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 12px; }
.s2-areabar-label { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.s2-areabar .hint { margin: 10px 0 0; }
.s2-areabar .area-picks { margin: 0; }
.settings2 .s2-small { padding: 5px 12px; }
.settings2 input.s2-rename { background: var(--brand-soft); border: 1px solid var(--brand); color: var(--brand-dark); font-weight: 600; padding: 6px 14px; }   /* blue, so it reads as a button */
.settings2 input.s2-rename:hover { background: var(--brand); color: #fff; }
.s2-areabar .sub-box { margin-top: 10px; }

/* Cards in a section */
.settings2 .card .card { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; margin: 18px 0 0; padding: 14px 0 0; }
.s2-h2-gap { margin-top: 24px !important; }
.settings2 input.bad-number { border-color: var(--alert) !important; box-shadow: 0 0 0 2px var(--alert-soft); }
.settings2 .actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.settings2 .actions button, .s2-savebar button[type=button] {
    background: var(--field); border: 1px solid var(--field-line); border-radius: 8px; color: var(--ink); cursor: pointer; font: inherit; padding: 7px 14px;
}
.settings2 .actions button:hover, .s2-savebar button[type=button]:hover { border-color: var(--brand); }
.settings2 .s2-add::before { content: "+ "; font-weight: 700; }
.s2-count { color: var(--muted); font-size: .78rem; margin-top: 4px; text-align: right; }
.s2-count.over { color: var(--alert); font-weight: 600; }
.settings2 textarea { box-sizing: border-box; width: 100%; }

/* MI: one set of columns at a time */
.s2-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 10px; padding: 2px; }
.s2-toggle button { background: none; border: 0; border-radius: 999px; color: var(--muted); cursor: pointer; font: inherit; font-size: .88rem; padding: 5px 14px; }
.s2-toggle button.on { background: var(--brand); color: #fff; font-weight: 600; }
.mi-table.show-monthly tr > :nth-child(n+10) { display: none; }
.mi-table.show-single tr > :nth-child(n+2):nth-child(-n+9) { display: none; }
.settings2 .mi-table input[type=text] { width: 64px; }

/* The save bar */
.s2-savebar { bottom: 0; left: 0; pointer-events: none; position: fixed; right: 0; transform: translateY(110%); transition: transform .2s ease; z-index: 30; }
.s2-savebar.show { pointer-events: auto; transform: none; }
.s2-savebar-in {
    align-items: center; background: var(--field); border: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 -6px 24px rgba(0, 0, 0, .14);
    display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 auto; max-width: 1068px; padding: 12px 16px;
}
.s2-changed { flex: 1 1 260px; font-weight: 600; }
.s2-changed:empty { display: none; }
.s2-savebar .save-status { flex: 1 1 260px; font-weight: 600; }
.s2-savebar .save-status:empty { display: none; }
.save-status.good { color: #1a7f45; }
.save-status.good::before { content: "\2713  "; }
.save-status.bad { color: var(--alert); }
html.dark .save-status.good { color: #6fdc9b; }
.s2-savebar-btns { display: flex; gap: 8px; margin-left: auto; }
.s2-savebar:not(.dirty) .s2-savebar-btns { display: none; }

/* Phones and narrow windows: the menu becomes a row of chips above the sections */
@media (max-width: 820px) {
    .s2-layout { grid-template-columns: minmax(0, 1fr); }
    .s2-nav { flex-direction: row; gap: 6px; overflow-x: auto; padding-bottom: 4px; position: static; scrollbar-width: thin; flex-wrap: nowrap; }
    .s2-find { flex: 0 0 170px; }
    .s2-group { display: none; }
    .s2-nav a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; flex: 0 0 auto; padding: 6px 12px; white-space: nowrap; }
    .s2-nav a.per-area::after { content: none; }
    .s2-results { position: fixed; left: 16px; right: 16px; top: auto; width: auto; }
    .s2-savebar-btns { margin-left: 0; width: 100%; }
    .s2-savebar-btns > * { flex: 1 1 0; }
}

/* My account */
.acct-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.acct-grid > .card { margin: 0; }
/* Choosing a file uploads it straight away, so the Upload buttons stay hidden (they are still what gets clicked). */
.account .photo .btn-primary { display: none; }
.acct-who { align-items: center; display: flex; gap: 14px; }
.acct-who img { border-radius: 50%; height: 56px; object-fit: cover; width: 56px; }
.acct-who .initials { align-items: center; background: var(--brand-soft); border-radius: 50%; color: var(--brand-dark); display: flex; font-weight: 700; height: 56px; justify-content: center; width: 56px; }
.acct-who h1 { font-size: 1.3rem; margin: 0; }
.acct-who p { color: var(--muted); margin: 2px 0 0; }
/* My account: a company name or address the member's team has locked (QQTeams.Locks) */
.account input.locked { background: transparent; border-style: dashed; color: var(--muted); cursor: default; }
.account .lock-note { margin-top: -4px; }
.acct-msg { display: block; font-weight: 600; margin-top: 10px; }
.acct-msg:empty { display: none; }
.acct-msg.good { color: #1a7f45; }
.acct-msg.bad { color: var(--alert); }
html.dark .acct-msg.good { color: #6fdc9b; }
.acct-list { list-style: none; margin: 0; padding: 0; }
.acct-list li { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: space-between; padding: 10px 0; }
.acct-list li:first-child { border-top: 0; }
.acct-list small { color: var(--muted); display: block; }
.settings2 .row .grow { flex: 1 1 0; min-width: 0; }
/* Loan settings' +/- buttons are 24px, so the gap on rows without them (Closing cost credit) is two buttons and a gap */
.settings2 .row button.btn-step { flex: 0 0 24px; width: 24px; }
.settings2 .row .steps-gap { display: block; flex: 0 0 54px; width: 54px; }   /* phones too: the buttons stay there */

/* My account: email signature */
.acct-grid > .sig-card { grid-column: 1 / -1; }
.sig-card h3 { font-size: 1rem; margin: 18px 0 8px; }
.sig-status { margin: 0 0 8px; }
/* Signatures are shown as clients see them: on white, whatever the page's look. */
.sig-preview { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: #222; font-family: Arial, Helvetica, sans-serif; font-size: 14px; max-width: 680px; overflow: auto; padding: 12px 16px; }
.sig-preview img { max-width: 100%; height: auto; }
.sig-gap { border: 2px dashed var(--alert); border-radius: 6px; color: var(--alert); display: inline-block; font-size: 12px; padding: 14px 18px; }
.sig-apps { display: flex; flex-wrap: wrap; gap: 8px; }
.sig-apps button { background: var(--field); border: 1px solid var(--field-line); border-radius: 999px; color: var(--ink); cursor: pointer; font: inherit; padding: 6px 14px; }
.sig-apps button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.sig-howto { background: var(--brand-soft); border-radius: 8px; margin-top: 10px; padding: 4px 16px; }
.sig-howto ol { margin: 10px 0; padding-left: 20px; }
.sig-howto li { margin: 4px 0; }
.sig-paste { align-items: center; background: var(--field); border: 2px dashed var(--field-line); border-radius: 10px; color: var(--muted); cursor: text; display: flex; justify-content: center; min-height: 90px; padding: 12px; text-align: center; }
.sig-paste:focus { border-color: var(--brand); outline: none; }
.sig-paste.busy { color: var(--brand-dark); }
.sig-hidden { display: none; }
.sig-code { margin-top: 10px; }
.sig-code summary { color: var(--brand-dark); cursor: pointer; }
.sig-code textarea { background: var(--field); border: 1px solid var(--field-line); border-radius: 8px; box-sizing: border-box; color: var(--ink); font-family: Consolas, monospace; font-size: 12px; margin: 8px 0; width: 100%; }
.sig-upload { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.sig-upload > span { flex-basis: 100%; }
.sig-warn { border-left: 4px solid var(--alert); margin-top: 12px; }
.sig-warn ul { margin: 4px 0 10px; }

/* My account's My PDFs card: the saved look in a line, with a dot of its color */
.pdfs-now { align-items: center; display: flex; font-weight: 600; gap: 8px; margin: 4px 0 10px; }
.pdfs-now i { border-radius: 50%; display: inline-block; flex: none; height: 14px; width: 14px; }
