/* MultiEasyLink additions on top of the SmartAdmin theme (assets/css/main.css). Keep this file small. */

.mel-languages a { margin: 0 0.35rem; text-decoration: none; }
.mel-languages a.current { font-weight: 700; }

.mel-qr svg { width: 12rem; height: 12rem; display: block; margin: 0 auto; background: #fff; }
.mel-key { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.mel-codes { columns: 2; font-family: ui-monospace, Consolas, monospace; list-style: none; padding: 0; }

.mel-once {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.05rem;
  user-select: all;
}

/* Sales screens */
.mel-done .mel-activity-subject, a.mel-done { text-decoration: line-through !important; opacity: .6; }
.mel-details dt { font-weight: 500; color: var(--bs-secondary-color); }
.mel-month td { width: 14.28%; height: 6.5rem; vertical-align: top; padding: .25rem .35rem; }
.mel-month .mel-daynumber { color: var(--bs-secondary-color); }
.mel-other-month { background: var(--bs-tertiary-bg); }
.mel-today { box-shadow: inset 0 0 0 2px var(--bs-primary); }

/* Step bar: a lead's statuses or an opportunity's stages */
.mel-steps { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.mel-steps-track { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: .25rem; min-width: 0; }
.mel-steps-ends { display: flex; gap: .35rem; flex-wrap: wrap; }
.mel-step { flex: 1 1 7rem; min-width: 0; margin: 0; }
.mel-step button {
  width: 100%; border: 0; padding: .45rem .6rem; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--bs-secondary-bg); color: var(--bs-secondary-color);
  clip-path: polygon(0 0, calc(100% - .6rem) 0, 100% 50%, calc(100% - .6rem) 100%, 0 100%, .6rem 50%);
  padding-left: 1.1rem; padding-right: 1.1rem;
}
.mel-step:first-child button { clip-path: polygon(0 0, calc(100% - .6rem) 0, 100% 50%, calc(100% - .6rem) 100%, 0 100%); padding-left: .7rem; border-radius: .3rem 0 0 .3rem; }
.mel-step button:hover:not(:disabled) { filter: brightness(.95); cursor: pointer; }
.mel-step-done button { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.mel-step-current button { background: var(--bs-primary); color: #fff; font-weight: 600; opacity: 1; }
.mel-step-passed button { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }

/* Change history */
.mel-timeline { border-left: 2px solid var(--bs-border-color); margin-left: .35rem; }
.mel-timeline li { position: relative; padding: 0 0 .9rem 1rem; }
.mel-timeline li::before {
  content: ""; position: absolute; left: -.42rem; top: .35rem; width: .7rem; height: .7rem; border-radius: 50%;
  background: var(--bs-primary); border: 2px solid var(--bs-body-bg);
}
.mel-timeline li:last-child { padding-bottom: 0; }

/* The representative pick list on the user form: scrolls inside itself when the MIS has many */
.mel-rep-list { max-height: 22rem; overflow-y: auto; }
.mel-rep-list thead th { position: sticky; top: 0; background: var(--bs-body-bg); z-index: 1; }

/* "Linked to" search on a form */
.mel-link-results { max-height: 18rem; overflow-y: auto; }
.mel-link-results:empty { display: none; }
.mel-link-chips:empty { display: none; }

/* Help pages: text written by the host admin */
.mel-help h2 { font-size: 1.15rem; margin-top: 1.25rem; }
.mel-help h3 { font-size: 1rem; margin-top: 1rem; }
.mel-help h2:first-child, .mel-help p:first-child { margin-top: 0; }
.mel-help ul, .mel-help ol { padding-left: 1.25rem; }
.mel-help li { margin-bottom: .25rem; }

/* Integrations: the instruction the assistant gets; the assistant's answer on the dashboard */
.mel-instructions { white-space: pre-wrap; max-height: 28rem; overflow-y: auto; background: var(--bs-tertiary-bg); padding: .75rem; border-radius: .375rem; }
.mel-assistant-answer { max-height: 24rem; overflow-y: auto; border-top: 1px solid var(--bs-border-color); padding-top: .75rem; }

/* The search box in the header: what it finds drops down under it */
.mel-search-results { position: absolute; top: 46px; left: 0; right: 0; max-height: 70vh; overflow-y: auto; z-index: 1100; background: var(--bs-body-bg); border-radius: .375rem; }
.mel-search-results:empty { display: none; }
.mel-search-results .list-group-item { padding: .4rem .75rem; }
.mel-search-results .mel-search-kind { width: 1.25rem; flex: 0 0 auto; color: var(--bs-secondary-color); }

/* The small map on an account's page */
.mel-account-map { width: 100%; height: 15rem; border: 0; border-radius: .375rem; background: var(--bs-secondary-bg); display: block; }

/* Back to top, on every screen; a jump inside a page stops below the fixed header */
.mel-to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1040; width: 2.75rem; height: 2.75rem; border-radius: 50%; padding: 0; box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .25); }
html { scroll-behavior: smooth; }
#account-transactions, [id^="account-"] { scroll-margin-top: calc(var(--header-height, 60px) + 1rem); }

/* The lines of an invoice, opened under it */
.mel-invoice-lines-body { padding: .5rem .75rem .75rem 2rem; background: var(--bs-tertiary-bg); }
.mel-invoice-lines-body .table { --bs-table-bg: transparent; }
.mel-lines-toggle .bi { transition: transform .15s; display: inline-block; }
.mel-lines-toggle:not(.collapsed) .bi { transform: rotate(180deg); }
.mel-invoice-lines-body tr.text-muted > td { color: var(--bs-secondary-color); }

/* The password rules under a new-password box: grey until met, green when met, red when the form was sent too early */
.mel-password-rules li { color: var(--bs-secondary-color); }
.mel-password-rules li.met { color: var(--bs-success); }
.mel-password-rules.warn li:not(.met) { color: var(--bs-danger); }
