/* Additions to Tabler (assets/vendor/tabler). Tabler provides the layout and
   components; this file only covers what it doesn't have. */

/* ---------------------------------------------------------------------------
   Brand
   ------------------------------------------------------------------------- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: inherit;
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--tblr-border-radius);
    color: #fff;
    background: linear-gradient(135deg, var(--tblr-primary), var(--tblr-indigo));
}

.brand-mark .icon {
    margin: 0;
}

.brand-name {
    font-weight: var(--tblr-font-weight-bold);
    font-size: 1rem;
    letter-spacing: -0.01em;
}

/* Login and error pages: the theme switch sits in the corner. */
.floating-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

/* The sidebar's user block: keep long addresses on one line. */
.navbar-footer .nav-link-title {
    min-width: 0;
}

.user-email {
    max-width: 11rem;
}

/* ---------------------------------------------------------------------------
   Small helpers
   ------------------------------------------------------------------------- */

.address-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* A select and its Save/Move button side by side in a table cell. */
.role-form {
    display: flex;
    gap: 0.375rem;
    align-items: center;
    max-width: 18rem;
}

.notes {
    white-space: pre-line;
}

.issue-detail {
    padding-left: 1.1rem;
    margin-top: 0.25rem;
}

.session-agent {
    max-width: 22rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Logs
   ------------------------------------------------------------------------- */

.log-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.log-tabs .nav-link {
    white-space: nowrap;
}

.log-view {
    max-height: 70vh;
    overflow: auto;
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    background-color: var(--tblr-bg-surface-secondary);
    border: var(--tblr-border-width) solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
}

.log-error {
    color: var(--tblr-red);
}

.log-warning {
    color: var(--tblr-orange);
}

/* ---------------------------------------------------------------------------
   Mail
   ------------------------------------------------------------------------- */

.mail-card {
    overflow: hidden;
}

.mail-folder .badge {
    flex-shrink: 0;
}

.mail-search {
    width: 100%;
    max-width: 18rem;
}

.mail-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.mail-select-all {
    display: inline-flex;
    align-items: center;
    padding: 0 0.5rem 0 0.1rem;
}

.mail-move {
    width: auto;
    flex-wrap: nowrap;
}

.mail-move .form-select {
    max-width: 11rem;
}

/* Rows: the subject link covers the row (stretched-link), so the checkbox
   is lifted above it. */
.mail-row .mail-select {
    position: relative;
    z-index: 2;
}

.mail-row .icon {
    width: 1.1rem;
    height: 1.1rem;
}

.mail-noflag {
    color: var(--tblr-secondary);
    opacity: 0.35;
}

.mail-row:not(.unread) .mail-from,
.mail-row:not(.unread) .mail-subject {
    color: var(--tblr-secondary);
}

.mail-row.unread {
    box-shadow: inset 3px 0 0 var(--tblr-primary);
}

.mail-row.unread .mail-from,
.mail-row.unread .mail-subject {
    font-weight: var(--tblr-font-weight-bold);
    color: var(--tblr-body-color);
}

.mail-date {
    white-space: nowrap;
}

.mail-headers {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.2rem 1rem;
}

.mail-headers dt {
    font-weight: normal;
    color: var(--tblr-secondary);
}

.mail-headers dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.mail-header-text {
    min-width: 0;
}

/* Email HTML assumes a white page, in dark mode too. */
.mail-frame {
    display: block;
    width: 100%;
    min-height: 12rem;
    border: 0;
    background: #fff;
}

.mail-text {
    margin: 0;
    padding: 1.25rem;
    font-family: inherit;
    font-size: 0.9375rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: transparent;
    border: 0;
    color: inherit;
}

.compose {
    max-width: 56rem;
}

.compose-body {
    font-family: inherit;
    min-height: 16rem;
}

@media (max-width: 991.98px) {
    /* Folders become a horizontal strip above the list. */
    .mail-side {
        border-right: 0 !important;
        border-bottom: var(--tblr-border-width) solid var(--tblr-border-color);
    }

    .mail-folders {
        flex-direction: row !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 0.25rem;
    }

    .mail-folders .nav-link {
        white-space: nowrap;
        width: auto;
    }

    .mail-search {
        max-width: none;
    }
}

@media (max-width: 575.98px) {
    .mail-row .mail-star {
        display: none;
    }
}

/* ---------------------------------------------------------------------------
   Websites
   ------------------------------------------------------------------------- */

/* A small picture of each theme's colours on the Appearance tab. */
.theme-swatch {
    display: flex;
    width: 7rem;
    height: 2.5rem;
    border-radius: var(--tblr-border-radius);
    overflow: hidden;
    border: var(--tblr-border-width) solid var(--tblr-border-color);
}

.theme-swatch span { flex: 1; }
.theme-swatch-clean span:nth-child(1) { background: #ffffff; }
.theme-swatch-clean span:nth-child(2) { background: #f5f7f6; }
.theme-swatch-clean span:nth-child(3) { background: #2f6f5e; }
.theme-swatch-bold span:nth-child(1) { background: #16132b; }
.theme-swatch-bold span:nth-child(2) { background: #ff5a5f; }
.theme-swatch-bold span:nth-child(3) { background: #7c3aed; }

.markdown-editor {
    font-family: var(--tblr-font-monospace);
    font-size: 0.875rem;
    line-height: 1.6;
}

.image-preview {
    width: 4.5rem;
    height: 3rem;
    object-fit: cover;
    border-radius: var(--tblr-border-radius);
    border: var(--tblr-border-width) solid var(--tblr-border-color);
    flex-shrink: 0;
}

/* Billing */
.multiline { white-space: pre-line; }

/* Printing an invoice: just the invoice. */
@media print {
    .navbar-vertical, .page-header, .footer, .skip-link { display: none !important; }
    .navbar-vertical ~ .page-wrapper, .page-wrapper { margin: 0 !important; padding: 0 !important; }
    .page-body { margin: 0 !important; }
    .invoice { border: 0 !important; box-shadow: none !important; }
    .alert { display: none !important; }
}

/* Ticket boards: columns side by side, scrolling sideways when there are many. */
.ticket-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: .5rem;
}
.board-column {
  flex: 0 0 18rem;
  background: var(--tblr-bg-surface-secondary);
  border-radius: var(--tblr-border-radius-lg);
  padding: .75rem;
}
.board-column-head {
  display: flex;
  align-items: center;
  margin-bottom: .5rem;
}
.board-cards {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-height: 4rem;
}
.board-card {
  color: inherit;
  text-decoration: none;
  cursor: grab;
}
.board-card:hover { text-decoration: none; border-color: var(--tblr-primary); }
.board-card.dragging { opacity: .5; }
.board-card-title { font-weight: 500; overflow-wrap: anywhere; }
.ticket-excerpt { max-height: 10rem; overflow: hidden; }
.ticket-activity > li + li { margin-top: .75rem; }
.ticket-comment-body { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------------------
   The marketing website (view/marketing.rs), on its own domain.
   ------------------------------------------------------------------------- */
.mk { background: var(--tblr-body-bg); }
.mk-preview-bar {
  background: var(--tblr-yellow-lt);
  color: var(--tblr-body-color);
  text-align: center;
  padding: .4rem 1rem;
  font-size: .875rem;
}
.mk-nav {
  border-bottom: 1px solid var(--tblr-border-color);
  background: var(--tblr-bg-surface);
  padding: .5rem 0;
}
.mk-nav .nav-link.active { color: var(--tblr-primary); font-weight: 600; }
.mk-hero {
  padding: 5rem 0 4rem;
  background:
    radial-gradient(60rem 30rem at 50% -10rem, color-mix(in srgb, var(--tblr-primary) 14%, transparent), transparent),
    var(--tblr-bg-surface);
  border-bottom: 1px solid var(--tblr-border-color);
}
.mk-hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  font-weight: 700;
  max-width: 48rem;
  margin: 0 auto 1rem;
}
.mk-hero-text {
  font-size: 1.2rem;
  color: var(--tblr-secondary);
  max-width: 40rem;
  margin: 0 auto;
}
.mk-section { padding: 4rem 0; }
.mk-section-alt {
  background: var(--tblr-bg-surface);
  border-top: 1px solid var(--tblr-border-color);
  border-bottom: 1px solid var(--tblr-border-color);
}
.mk-section-title { text-align: center; font-size: 1.75rem; margin-bottom: 2rem; }
.mk-closing h2 { font-size: 1.75rem; }
.mk-plan-featured { border-color: var(--tblr-primary); box-shadow: 0 0 0 1px var(--tblr-primary); }
.mk-limits li { padding: .2rem 0; }
.mk-addons { max-width: 44rem; }
.mk-faq summary { cursor: pointer; list-style: none; }
.mk-faq summary::-webkit-details-marker { display: none; }
.mk-faq summary::after { content: "+"; float: right; color: var(--tblr-secondary); }
.mk-faq details[open] summary::after { content: "−"; }
.mk-footer {
  border-top: 1px solid var(--tblr-border-color);
  background: var(--tblr-bg-surface);
  padding: 2rem 0;
}
.mk-pre { white-space: pre-line; }
.mk-qty { width: 6rem; }
/* The signup form's field for bots: off screen, not display:none (some bots
   skip hidden fields). */
.mk-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Rows of repeated fields on the Marketing page (features, questions). */
.mk-row { border-left: 3px solid var(--tblr-border-color); padding-left: .75rem; }
.mk-price { font-size: 2rem; line-height: 1.2; white-space: nowrap; }
