/* STYLE.CSS
----------------------------------------------- */

/* Static
----------------------------------------------- */

body.static-page {
    background: white;
}

.static-page main {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px 64px;
}

.static-page main .hero {
    position: relative;
    text-align: center;
    padding: 64px 0;
}

.static-page main .hero h1 {
    font-size: 44px;
    line-height: 1.1;
    font-weight: 500;
}

.static-page main .hero h4 {
    font-size: 16px;
    font-weight: normal;
    line-height: 1.5;
    color: var(--secondary-text-color);
}

.static-page main .hero h1 + h4 {
    margin-top: 16px;
}

.static-page section {
    padding-bottom: 44px;
}

.static-page section h2 {
    line-height: 1.6;
    font-size: 24px;
    font-weight: normal;
}

.static-page section p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--secondary-text-color);
}

.static-page section ul {
    padding-left: 32px;
}

.static-page section ul li {
    font-size: 16px;
    line-height: 1.6;
    color: var(--secondary-text-color);
}

.static-page section p a { text-decoration: underline; }

.static-page section h2 + p, .static-page section h2 + ul { margin-top: 16px; }
.static-page section p + p, .static-page section p + ul, .static-page section ul + p { margin-top: 16px; }

.static-page footer {
    text-align: center;
    background: white;
    padding: 10px 32px;
    color: var(--placeholder-color);
}

.static-page footer a { 
    color: inherit;
    text-decoration: none;
}

.static-page footer ul li {
    display: inline-block;
    font-size: 12px;
}

.static-page footer ul li:not(:last-of-type) {
    padding-right: 8px;
    margin-right: 8px;
    border-right: 1px solid var(--regular-border-color);
}

/* Home Page
----------------------------------------------- */

body.home-page {
    display: flex;
    min-height: var(--height-full-screen);
    flex-direction: column;
    background: white;
}

.home-page main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: url('https://firebasestorage.googleapis.com/v0/b/billways-production.appspot.com/o/images%2Fbackgrounds%2FTYOyB6sLl5fUmEpzRAw02zntGkB2-background.jpg?alt=media&t=1678789090');
    background-position: center;
    background-size: cover;
}

.home-page main:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0,0,0,0.24);
    z-index: 0;
}

.home-page main .hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px;
    border-radius: 4px;
    background: #eef3f8;
    background: linear-gradient(0deg,white 0%,#eef3f8 80%);
}

.home-page main .hero h1 {
    font-size: 44px;
    line-height: 1.1;
    font-weight: 500;
    padding-bottom: 4px;
    border-bottom: 6px solid white;
}

.home-page main .hero h4 {
    font-size: 16px;
    font-weight: normal;
    line-height: 1.5;
    color: var(--primary-text-color);
}

.home-page main .hero h1 + h4 {
    margin-top: 32px;
}

.home-page main .hero ul {
    font-size: 13px;
    line-height: 2.1;
    list-style: disc;
    color: var(--secondary-text-color);
    text-transform: uppercase;
    font-weight: bold;
    text-align: left;
}

.home-page main .hero .button.primary,
.home-page main .hero .button.secondary {
    /* max-width: 240px; */
}

.home-page footer {
    text-align: center;
    background: white;
    padding: 10px 32px;
    color: var(--placeholder-color);
}

.home-page footer a { 
    color: inherit;
    text-decoration: none;
}

.home-page footer ul li {
    display: inline-block;
    font-size: 12px;
}

.home-page footer ul li:not(:last-of-type) {
    padding-right: 8px;
    margin-right: 8px;
    border-right: 1px solid var(--regular-border-color);
}


/* Account
----------------------------------------------- */

.account-page-body {
    background-color: white;
}

.account-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    background-color: var(--light-shade-surface);
    min-height: var(--height-full-screen);
}

.account-page header {
    width: 100%;
    background-color: white;
    border-bottom: 1px solid var(--regular-border-color);
    justify-content: center;
    padding: 0;
    box-shadow: var(--card-box-shadow);
}

.account-page header .header-inner {
    display: flex;
    width: 100%;
    max-width: 720px;
    justify-content: space-between;
    height: 60px;
    padding: 0 var(--horizontal-padding);
}

/* The native select stays in the DOM as the functional switcher
   (organization-switcher.js), but the account menu is its visible UI. */
.account-page header .organization-switcher {
    display: none;
}

.account-page header .header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.account-page header .account-menu {
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 8px;
    border-left: 1px solid var(--light-border-color);
}

.account-page header .account-menu-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    border: none;
    border-radius: var(--default-border-radius);
    background: none;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-text-color);
    cursor: pointer;
}

.account-page header .account-menu-trigger:hover {
    background-color: var(--light-shade-color);
}

.account-page header .account-menu-chevron {
    flex-shrink: 0;
    position: relative;
    top: 1px;
    color: var(--secondary-text-color);
}

.account-page header .account-menu-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: 240px;
    background-color: white;
    border: 1px solid var(--regular-border-color);
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-box-shadow);
    overflow: hidden;
}

.account-page header .account-menu-dropdown.dn {
    display: none;
}

.account-page header .account-menu-section {
    display: flex;
    flex-direction: column;
    padding: 6px;
}

/* Divider only below a *visible* section: the organizations section stays
   in the DOM with .dn when there's nothing to switch between, so
   :not(:first-child) would always draw the border. */
.account-page header .account-menu-section:not(.dn) + .account-menu-section {
    border-top: 1px solid var(--light-border-color);
}

.account-page header .account-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 15px;
    color: var(--primary-text-color);
    text-decoration: none;
    cursor: pointer;
}

.account-page header .account-menu-item:hover {
    background-color: var(--light-shade-color);
}

.account-page header .account-menu-organization-name {
    flex-grow: 1;
}

.account-page header .account-menu-organization[aria-checked="true"] {
    font-weight: 500;
}

.account-page header .account-menu-check {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: var(--special-background-color);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-page header .header-balance {
    position: relative; /* anchors the loading spinner while the amount loads */
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 90px;
    min-height: 24px;
    justify-content: flex-end;
}

.account-page header .header-balance-label {
    font-size: 13px;
    color: var(--secondary-text-color);
}

.account-page header .header-balance #account-balance-amount {
    font-size: 15px;
    font-weight: 600;
}

.account-page header .header-balance-info {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-left: -3px; /* the icon's ring reads closer to the amount than the 7px gap */
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    color: var(--secondary-text-color);
    cursor: pointer;
}

.account-page header .header-balance-info:hover {
    background-color: var(--light-shade-color);
    color: var(--primary-text-color);
}

.account-page.setup-active #stripe-notification-banner,
.account-page.setup-active .header-balance {
    /* Setup owns the status message, and an account still onboarding has
       no balance to show: the label would sit beside an empty amount. */
    display: none;
}

.account, .setup {
    padding-bottom: 64px;
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.account-cell {
    padding: 32px;
    background-color: white;
    border: 1px solid var(--regular-border-color);
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: var(--card-box-shadow);
}

/* .account-cell:not(:first-of-type) {
    margin-top: 16px;
} */

.account-cell .header {
    text-align: center;
    padding: 57px 20px 40px;
    border-bottom: 1px solid var(--light-border-color);
}

.account-cell .header .account-logo-box {
    display: inline-block;
    max-width: 392px;
    position: relative;
}

.account-cell .header .account-logo {
    max-width: 80%;
    max-height: 140px;
}

.account-cell .header .account-logo-box + h1 {
    margin-top: 24px;
}

.account-cell .header h1 {
    /* font-size: 32px; */
    letter-spacing: -0.04rem;
    font-weight: 500;
    line-height: 1.1;
}

.account-cell .header p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--secondary-text-color);
    font-weight: normal;
}
.account-cell .row {
    /* padding: 32px; */
    position: relative;
}

.account-cell .row:empty {
    display: none;
}

.account-cell .row:not(:first-of-type) {
    border-top: 1px solid rgba(0,0,0,0.08);
}

.account-cell .row:empty { display: none; }
.account-cell .row:last-of-type {
    /* margin-bottom: 44px; */
}

.account-cell h2 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 16px;
}

.account-cell .row h2 + p {
    margin-top: 2px;
}

.account-cell .row h4 {
    font-size: 13px;
    line-height: 1;
    text-transform: uppercase;
    color: var(--secondary-text-color);
}

.account-cell .row p,
.account-cell > h2 + p {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 8px;
    color: var(--secondary-text-color);
}

.account-cell a {
    text-decoration: underline;
    /* box-shadow:
    0 1px 0 0 rgba(255,255,255,0.6),
    0 1px 0 0 currentColor; */
}


/* Pill */

.pill {
    display: inline-block;
    font-size: 12px;
    height: 18px;
    line-height: 18px;
    border-radius: 4px;
    font-weight: 600;
    padding: 3px 8px;
}

.pill.void {
    color: var(--secondary-text-color);
    background-color: var(--regular-shade-color);
}

.pill.success {
    color: var(--dark-success-color);
    background-color: var(--light-success-color);
}

.pill.neutral {
    color: var(--dark-neutral-color);
    background-color: var(--light-neutral-color);
}

.pill.success-to-neutral {
    color: var(--dark-success-color);
    background-image: linear-gradient(to right, var(--light-success-color), var(--light-neutral-color));
}

.pill[class*="icon"]:before {
    content: '';
    opacity: 0.66;
    width: 8px;
    height: 8px;
    display: inline-block;
    margin-right: 4px;
    -webkit-mask-size: contain;
    mask-size: contain; 
 }

.pill.icon-card:before {     
    -webkit-mask: url('/static/images/minicon-card.svg') no-repeat 0 0;
    mask: url('/static/images/minicon-card.svg') no-repeat 0 0; 
}

.pill.icon-bank:before {     
    -webkit-mask: url('/static/images/minicon-bank.svg') no-repeat 0 0;
    mask: url('/static/images/minicon-bank.svg') no-repeat 0 0; 
}

.pill.void:before    { background-color: var(--secondary-text-color); }
.pill.success:before { background-color: var(--dark-success-color); }
.pill.neutral:before { background-color: var(--dark-neutral-color); }
.pill.success-to-neutral:before { background-color: var(--dark-success-color); }


/* Links table
   Flexbox lanes: one flexible cell per row, constant-width right lanes shared
   between link rows and payment rows via the --col-* variables, so the two
   row types align without a real table. */

.links-cell {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.links-cell h2 { margin-bottom: 0; }

.links-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid var(--regular-border-color);
}

.links {
    --col-status: 80px;
    --col-amount: 104px;
    --col-actions: 118px;
    --links-indent: 34px;  /* chip 24px + chip-title gap 10px */
    list-style: none;
}

.link-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 0;
    border-bottom: 1px solid var(--light-border-color);
}

.link-block:last-of-type { border-bottom: none; }

/* The link row opens the payment page and lights the whole block — but
   payment rows are plain, selectable data: no highlight, no navigation. */
.link-block { transition: background-color .15s ease-out; }
.link-row { cursor: pointer; }
.link-block:has(.link-row:hover):not(:has(.cell-actions:hover)) {
    background-color: var(--light-shade-color);
}

.link-row,
.payment-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.link-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background-color: var(--regular-shade-color);
    color: var(--secondary-text-color);
}

.cell-main {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.link-title {
    display: flex;
    align-items: center;
    gap: 10px;   /* chip ↔ title, tighter than the 16px row gap */
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-text-color);
    text-decoration: none;
    cursor: pointer;
}

.link-title-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* .link-title:hover { text-decoration: underline; } */

.cell-status { display: flex; align-items: center; gap: 3px; width: var(--col-status); flex: none; }

.cell-amount {
    width: var(--col-amount);
    flex: none;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.link-row .cell-amount { font-size: 16px; font-weight: 600; }

.cell-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    width: var(--col-actions);
    flex: none;
}

.row-break { display: none; }

.link-payments {
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
}

.payment-row {
    padding-left: var(--links-indent);
    font-size: 14px;
    color: var(--secondary-text-color);
    height: 20px;
}

/* Every icon in the status lane renders at one size, whatever its source
   dimensions — method glyphs and the refund action alike. */
.payment-row .cell-status svg {
    flex: none;
    width: 13px;
    height: 13px;
}

.payment-row::after { content: ''; width: var(--col-actions); flex: none; }

.status-pill {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-pill.success { background-color: var(--light-success-color); color: var(--dark-success-color); }
.status-pill.neutral { background-color: var(--light-neutral-color); color: var(--dark-neutral-color); }
.status-pill.danger  { background-color: var(--color-danger-background); color: var(--color-danger); }

.payment-refund {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    color: var(--secondary-text-color);
    cursor: pointer;
}

.payment-refund:hover { background-color: var(--light-shade-color); color: var(--primary-text-color); }

.link-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 24px;
    height: 28px;
    border: 0;
    border-radius: var(--default-border-radius);
    background: transparent;
    color: var(--secondary-text-color);
    cursor: pointer;
}

.link-menu-button:hover,
.link-menu-button[aria-expanded="true"] { background-color: var(--light-shade-color); color: var(--primary-text-color); }

.link-menu-anchor { position: relative; display: flex; }

.link-menu {
    z-index: 20;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 216px;
    padding: 4px;
    border: 1px solid var(--regular-border-color);
    border-radius: 8px;
    background-color: white;
    box-shadow: var(--card-box-shadow);
}

.link-menu-item {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    font-family: var(--font-family);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.link-menu-item.danger { color: var(--color-danger); }
.link-menu-item.danger:hover { background-color: var(--color-danger-background); }

.link-menu-item:disabled {
    color: rgba(22, 30, 46, .35);
    cursor: default;
}

.link-menu-item:disabled:hover { background: transparent; }

.link-menu-caption {
    padding: 0 10px 8px;
    font-size: 12px;
    line-height: 16px;
    color: var(--secondary-text-color);
}

.show-older { width: 100%; }

@media screen and (max-width: 512px) {

    .link-row { flex-wrap: wrap; row-gap: 8px; }

    .cell-main   { order: 1; }
    .link-row .cell-amount { order: 2; }
    .row-break   { order: 3; display: block; flex-basis: 100%; height: 0; }
    .cell-status { order: 4; width: auto; margin-left: var(--links-indent); }
    .cell-actions{ order: 5; width: auto; margin-left: auto; }

    .payment-row::after { display: none; }
}


/* Settings collapse */

.account-settings-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.account-settings-heading h2 {
    margin-bottom: 0;
}

.account-settings-heading.collapsed {
    margin-bottom: 0;
}

.account-settings-collapse {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--default-border-radius);
    background: none;
    color: var(--secondary-text-color);
    cursor: pointer;
}

.account-settings-collapse:hover {
    background-color: var(--light-shade-color);
    color: var(--primary-text-color);
}

.account-settings-collapse svg {
    transition: transform .15s ease;
}

.account-settings-heading.collapsed .account-settings-collapse svg {
    transform: rotate(-90deg);
}


/* Settings Tabs */

.account-settings-tabs {
    position: relative;
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--regular-border-color);
    scrollbar-width: none;
}

.account-settings-tabs::-webkit-scrollbar { display: none; }

.account-settings-slider {
    z-index: 2;
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 2px;
    background-color: var(--special-background-color);
    pointer-events: none;
    transition: width .24s ease-out, transform .24s ease-out;
}

.account-settings-tab {
    z-index: 1;
    flex: 0 0 auto;
    width: auto;
    height: 40px;
    padding: 0 var(--horizontal-padding);
    border: 0;
    border-radius: 0;
    color: var(--secondary-text-color);
    background: transparent;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s ease-out, background-color .15s ease-out, box-shadow .15s ease-out;
}

.account-settings-tab:hover {
    color: var(--primary-text-color);
    background-color: var(--light-shade-color);
}

.account-settings-tab.selected {
    color: var(--primary-text-color);
    background-color: transparent;
    cursor: default;
}

.settings-tab-hidden { display: none !important; }


.account-settings-content a.disabled { text-decoration: none; pointer-events: none; }
/* Preview Iframe */

.preview-iframe-cell {
    height: var(--preview-cell-height);
    background: var(--light-shade-surface);
    font-size: 0;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--regular-border-color);
    user-select: none !important;
    -moz-user-select: none !important;
    -khtml-user-select: none !important;
    -webkit-user-select: none !important;
    -o-user-select: none !important;

    pointer-events: none;
}

/* Desktop and mobile share one geometry: the iframe is always centred in the cell
   (translate(-50%, -50%)) and scaled down by --preview-scale. Only its width, height,
   corner radius, border and shadow differ between the two states, and all of those
   interpolate, so toggling the .mobile class plays as one morph: the rounded phone
   grows into the full-bleed rectangle (or shrinks back), reflowing the page as it
   goes, exactly like dragging a browser window wider or narrower. */

.preview-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    box-sizing: border-box;
    width: calc(100% / var(--preview-scale));
    height: calc(var(--preview-cell-height) / var(--preview-scale));
    border: 0 solid var(--regular-border-color);
    border-radius: 0;
    box-shadow: 0 2px 6px rgb(22 30 46 / 0%);
    overflow: hidden;
    transform: translate(-50%, -50%) scale(var(--preview-scale));
    transform-origin: center;
    transition-property: width, height, border-radius, border-width, box-shadow;
    transition-duration: 0s; /* DISABLED ANIMATION */
    /* transition-timing-function: cubic-bezier(0.000, 0.000, 0.000, 1.00); */
    /* transition-timing-function: linear; */
    /* transition-timing-function: cubic-bezier(.4, 0, .2, 1); */
}

.preview-iframe-cell.mobile .preview-iframe {
    width: calc(var(--preview-mobile-width) / var(--preview-scale));
    height: calc((var(--preview-cell-height) - 75px) / var(--preview-scale)); /* 75 is arbitrary inner vertical padding */
    border-width: calc(1px / var(--preview-scale));
    border-radius: 56px;
    box-shadow: var(--card-box-shadow);
}

@media (prefers-reduced-motion: reduce) {
    .preview-iframe { transition-duration: 0s; }
}



/* Team settings: invite form */

.organization-invitation-list-title {
    font-size: 14px;
    font-weight: 600;
}

.organization-invitation-issuer-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px auto;
    gap: 8px;
}

.organization-invitation-issuer-controls input,
.organization-invitation-issuer-controls select {
    min-width: 0;
    border: 1px solid var(--regular-border-color);
    background-color: var(--light-shade-surface);
    color: var(--primary-text-color);
    font-size: 14px;
    border-radius: var(--default-border-radius);
    padding: calc(var(--button-padding-pixel) + 12px) var(--horizontal-padding) calc(12px - var(--button-padding-pixel));
}

.organization-invitation-issuer-controls select {
    padding-right: 28px;
    background-position: right 8px center;
    background-size: auto 14px !important;
}

.organization-invitation-issuer-controls .button {
    min-height: 40px;
    padding: 0 14px;
    white-space: nowrap;
}

.organization-invitation-issuer-controls :disabled,
#account-team-invitation-copy:disabled,
#account-team-invitation-reissue-copy:disabled {
    cursor: wait;
    opacity: .6;
}

/* The Invite button spins while its request is in flight; keep the spinner
   at full strength rather than dimmed like the neighbouring inputs. */
.organization-invitation-issuer-controls .spin:disabled { opacity: 1; }

.organization-team-roles-note {
    color: var(--secondary-text-color);
    font-size: 13px;
    line-height: 1.5;
}

.organization-invitation-issuer-status {
    min-height: 16px;
    color: var(--placeholder-color);
    font-size: 12px;
}

.organization-invitation-link {
    display: block;
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--regular-border-color);
    border-radius: 6px;
    font-size: 12px;
}


/* Team settings: sortable people list */

.organization-people-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px 6px 8px;
}

.organization-people-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border: 0;
    border-radius: 5px;
    color: var(--secondary-text-color);
    background: transparent;
    font-family: var(--font-family);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}

.organization-people-sort-member { flex: 1; min-width: 0; justify-content: flex-start; }
.organization-people-sort-role { flex: none; width: 88px; justify-content: flex-start; }

.organization-people-head:after {
    content: "";
    flex: none;
    width: 32px;
}

.organization-people-sort:hover {
    color: var(--primary-text-color);
    background-color: var(--light-shade-surface);
}

.organization-people-sort[aria-pressed="true"] { color: var(--primary-text-color); }

/* Drawn with borders rather than a glyph: the Unicode triangles render at
   wildly different sizes across fonts, and small ones read as a speck. */
.organization-people-sort:after {
    content: "";
    flex: none;
    width: 0;
    height: 0;
    border-right: 3.5px solid transparent;
    border-bottom: 4px solid currentColor;
    border-left: 3.5px solid transparent;
    opacity: .3;
}

.organization-people-sort:hover:after { opacity: .55; }

.organization-people-sort[aria-pressed="true"]:after { opacity: 1; }

.organization-people-sort[aria-pressed="true"][data-direction="desc"]:after {
    border-top: 4px solid currentColor;
    border-bottom: 0;
}

.organization-people-list {
    list-style: none;
    border-top: 1px solid var(--regular-border-color);
}

.organization-people-list .organization-member {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 10px 10px 10px 14px;
    border-top: 1px solid var(--light-border-color);
    background-color: var(--light-shade-surface);
    font-size: 16px;
}

/* The list draws the line under the header itself, so the first row must not
   stack a second border on top of it. */
.organization-people-list .organization-member:first-child { border-top: 0; }

.organization-people-list .organization-member.pending { background-color: white; }

.organization-people-list .organization-member.menu-open { z-index: 5; }

.organization-people-list .organization-member.busy { opacity: .6; }

.organization-member-name {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.organization-member-icon {
    display: flex;
    flex: none;
    margin-right: 4px;
    color: var(--secondary-text-color);
}

.organization-member-name strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
}

/* Member and invitation tags reuse the links-table .status-pill styles. */
.organization-member-name .status-pill { flex: none; }

.organization-member-role {
    flex: none;
    width: 88px;
    padding: 0 6px;
    color: var(--primary-text-color);
    font-size: 13px;
}

.organization-member-menu {
    flex: none;
    position: relative;
    width: 32px;
}

.organization-member-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--secondary-text-color);
    background: transparent;
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.organization-member-menu-button:hover {
    border-color: var(--regular-border-color);
    color: var(--primary-text-color);
}

.organization-member-menu-button[aria-expanded="true"] {
    border-color: var(--regular-border-color);
    color: var(--primary-text-color);
    background-color: var(--light-shade-color);
}

.organization-member-menu-button:disabled { cursor: wait; opacity: .6; }

.organization-member-menu-list {
    z-index: 20;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 176px;
    padding: 4px;
    border: 1px solid var(--regular-border-color);
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 6px 20px rgba(22, 30, 46, .12);
}

.organization-member-menu-item {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 5px;
    color: var(--primary-text-color);
    background: transparent;
    font-family: var(--font-family);
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

.organization-member-menu-item:hover { background-color: var(--light-shade-color); }

.organization-member-menu-item.danger { color: var(--color-danger); }
.organization-member-menu-item.danger:hover { background-color: var(--color-danger-background); }

.organization-member-menu-separator {
    height: 1px;
    margin: 4px 0;
    background-color: var(--light-border-color);
}



/* Auth Pages (Log In, Sign Up, Join)
----------------------------------------------- */

.auth-page {
    min-height: var(--height-full-screen);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box {
    max-width: 448px;
    padding: 48px 32px;
    flex: 1; /* child fills horiz. space like non-flex */
    background-color: white;
    border: 1px solid var(--regular-border-color);
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-box-shadow);
}

.auth-box h1 {
    display: flex;
    align-items:center;
    justify-content: center;
}

.auth-box p {
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
}

.auth-box h2 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    color: var(--primary-text-color);
}

.auth-box .auth-loading {
    min-height: 44px;
    position: relative;
}

.auth-box .chip {
    display: inline-block;
    background-color: var(--light-success-color);
    color: var(--dark-success-color);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
}

.auth-box .chip.neutral {
    background-color: var(--light-neutral-color);
    color: var(--dark-neutral-color);
}

.auth-box .chip .chip-check {
    font-weight: 700;
    padding-right: 2px;
}

.auth-box .error-badge {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border-radius: 50%;
    background-color: var(--color-danger-background);
    color: var(--color-danger);
    font-size: 22px;
    font-weight: 700;
    line-height: 48px;
    text-align: center;
}

.auth-box form .text-divider-box {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box form .text-divider-box .divider-line {
    background: rgb(210, 214, 220); /* #d2d6dc */
    flex-grow: 1; /* child fills leading/trailing space */
    height: 1px;
}

.auth-box form .text-divider-box .divider-text {
    font-size: 14px;
    padding: 2px 8px;
    color: var(--secondary-text-color);
}


/* Media: Mobile
--------------------------------------------------------------------------------------------------------------------- */

@media screen and (max-width: 512px) {

    .auth-box {
        padding: 48px 16px;
    }

    .home-page header {
        background-color: #eef3f8;
    }

    .home-page main {
        background: linear-gradient(0deg,white 0%,#eef3f8 80%);
    }
    
    .home-page main:before {
        display: none;
    }

    .home-page main .hero {
        padding: 24px;
        background: none;
    }

    .home-page main .hero, .account-cell {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 32px 12px;
    }

    .organization-invitation-issuer-controls {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .organization-invitation-issuer-controls input {
        grid-column: 1 / -1;
    }

    .organization-people-head { padding-left: 6px; }

    .organization-people-list .organization-member {
        gap: 8px;
        padding-left: 12px;
    }

    .organization-people-sort-role,
    .organization-member-role {
        width: 64px;
    }

    .organization-member-role {
        padding: 0 2px;
        font-size: 12px;
    }

    .organization-invitation-issuer-controls {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .organization-invitation-issuer-controls input {
        grid-column: 1 / -1;
    }
}