/*
 * LOTUS DESIGN SYSTEM
 * Reusable visual components
 *
 * No database-specific selectors.
 * Grid layouts remain the responsibility of each component.
 */

/* Shared search-panel appearance */
html body .lotus-db-search {
    background: var(--lotus-surface);
    color: var(--lotus-text);
    border: 1px solid var(--lotus-surface-border);
    border-radius: var(--lotus-radius);
    box-shadow: none;
    box-sizing: border-box;
}

/* Shared search buttons */
html body .lotus-db-search :is(button.btn, a.btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: var(--lotus-button-bg) !important;
    background-image: none !important;
    color: var(--lotus-button-text) !important;

    border: 1px solid var(--lotus-button-border) !important;
    border-radius: var(--lotus-control-radius) !important;
    box-shadow: none !important;

    font-family: "hypatia-sans-pro", sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;

    text-decoration: none !important;
    cursor: pointer;

    transition:
        background-color var(--lotus-transition),
        color var(--lotus-transition),
        border-color var(--lotus-transition);
}

/* Shared search-button rollover */
html body .lotus-db-search
:is(button.btn, a.btn):is(:hover, :focus-visible) {
    background: var(--lotus-button-hover-bg) !important;
    color: var(--lotus-button-hover-text) !important;
    border-color: var(--lotus-button-hover-bg) !important;
    text-decoration: none !important;
}

/* Shared keyboard focus */
html body .lotus-db-search
:is(input, select, button.btn, a.btn):focus-visible {
    outline: 2px solid var(--lotus-accent);
    outline-offset: 3px;
}


/* BEGIN Lotus shared form controls 20261107 */

/* Shared text inputs */
html body .lotus-db-search
:is(input[type="text"], input[type="search"], input[type="number"]) {
    box-sizing: border-box !important;
    padding: 0 12px !important;
    background: var(--lotus-control-bg) !important;
    color: var(--lotus-control-text) !important;
    border: 1px solid var(--lotus-control-border) !important;
    border-radius: var(--lotus-control-radius) !important;
    box-shadow: none !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
}

/* Shared dropdowns, retaining the original chevron */
html body .lotus-db-search select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding: 0 38px 0 12px !important;

    background:
        linear-gradient(45deg, transparent 50%, #343a40 50%)
            no-repeat calc(100% - 18px) 50% / 6px 6px,
        linear-gradient(135deg, #343a40 50%, transparent 50%)
            no-repeat calc(100% - 12px) 50% / 6px 6px,
        var(--lotus-control-bg) !important;

    color: var(--lotus-control-text) !important;
    border: 1px solid var(--lotus-control-border) !important;
    border-radius: var(--lotus-control-radius) !important;
    box-shadow: none !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: normal !important;
    cursor: pointer !important;
}

/* Shared search typography */
html body .lotus-db-search
:is(input, select, option, button, .btn, label) {
    font-family: "hypatia-sans-pro", sans-serif !important;
    font-style: normal !important;
}

html body .lotus-db-search
:is(input, select, option, button, .btn) {
    font-weight: 400 !important;
}

html body .lotus-db-search label {
    color: var(--lotus-text) !important;
    font-weight: 600 !important;
}

/* END Lotus shared form controls 20261107 */


/* BEGIN Lotus shared pagination component Phase 2 */

/* Inactive pagination buttons */
html body ul.pagination > li:not(.active):not(.disabled) > a.page-link {
    background: var(--lotus-page-button-bg) !important;
    color: var(--lotus-page-button-text) !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transition:
        background-color 150ms ease,
        color 150ms ease !important;
}

/* Rollover */
html body ul.pagination > li:not(.active):not(.disabled)
> a.page-link:is(:hover, :focus-visible) {
    background: var(--lotus-page-button-hover-bg) !important;
    color: var(--lotus-page-button-hover-text) !important;
    border-color: transparent !important;
    text-decoration: none !important;
}

/* Navigation arrows inherit the button color */
html body ul.pagination > li:not(.active):not(.disabled)
> a.page-link:is(:hover, :focus-visible) [class*="icon-"] {
    color: var(--lotus-page-button-hover-text) !important;
}

/* Current page */
html body ul.pagination > li.active > .page-link {
    background: var(--lotus-page-button-hover-bg) !important;
    color: var(--lotus-page-button-hover-text) !important;
    border-color: transparent !important;
    cursor: default !important;
}

/* Disabled buttons */
html body ul.pagination > li.disabled > .page-link {
    background: var(--lotus-page-button-disabled-bg) !important;
    color: var(--lotus-page-button-disabled-text) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* Keyboard focus */
html body ul.pagination > li:not(.active):not(.disabled)
> a.page-link:focus-visible {
    outline: 2px solid var(--lotus-accent, #d894cc) !important;
    outline-offset: 2px !important;
}

/* Pagination icons use the same colors as their buttons */
html body ul.pagination > li > .page-link [class*="icon-"] {
    color: inherit !important;
}

/* END Lotus shared pagination component Phase 2 */


/* BEGIN Lotus shared table component Phase 2 */

/* Standard Lotus table */
html body .lotus-table {
    background: var(--lotus-table-bg);
    border: 1px solid var(--lotus-table-border);
    border-radius: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: none !important;
    line-height: 1.5;
}

/* Column headings */
html body .lotus-table thead th {
    background: var(--lotus-table-header-bg);
    color: var(--lotus-table-header-text);
    padding: 13px 17px;
    border: 0;
    font-weight: 500;
}

/* Body cells */
html body .lotus-table tbody :is(td, th) {
    padding: 14px 17px;
    border-top: 1px solid var(--lotus-table-row-border);
    vertical-align: top;
}

/* Alternating rows */
html body .lotus-table tbody tr:nth-child(even) {
    background: var(--lotus-table-row-alt);
}

/* Row rollover */
html body .lotus-table tbody tr:hover {
    background: var(--lotus-table-row-hover);
}

/* Prevent double border at the bottom */
html body .lotus-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Table footer */
html body .lotus-table tfoot td {
    background: var(--lotus-table-row-alt);
    border-top: 1px solid var(--lotus-table-row-border);
}

/* Preserve responsive cell spacing */
@media (max-width: 768px) {
    html body .lotus-table thead th,
    html body .lotus-table tbody :is(td, th) {
        padding: 10px;
    }
}

/* END Lotus shared table component Phase 2 */


/* BEGIN Lotus shared box components Phase 2 */

/* Dark editorial information box */
html body .shadow-box {
    margin: 24px auto;
    padding: 28px 34px;
    background: var(--lotus-info-bg) !important;
    background-image: none !important;
    color: var(--lotus-info-text);
    border: 0;
    border-top: 3px solid var(--lotus-info-accent);
    border-radius: 3px;
    box-shadow: none !important;
    line-height: 1.65;
}

/* Information-box heading */
html body .shadow-box .boxhead {
    font-family: Oswald, sans-serif;
    font-size: 28px !important;
    font-weight: normal;
    color: var(--lotus-info-heading);
    line-height: 1.25;
}

html body .shadow-box blockquote {
    line-height: 1.65;
}

/* Scientific illustration box */
html body div.outer {
    margin: 30px auto;
    padding: 28px 34px;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--lotus-illustration-bg);
    border: 1px solid var(--lotus-illustration-border);
    border-radius: 5px;
    box-shadow: none !important;
    overflow: hidden;
}

html body div.outer img {
    max-width: 100%;
    height: auto;
}

/* Responsive box spacing */
@media (max-width: 768px) {
    html body .shadow-box {
        padding: 22px;
    }

    html body div.outer {
        padding: 22px;
        margin: 24px auto;
    }
}

/* END Lotus shared box components Phase 2 */
