﻿/* ==========================================================================
   design.css
   نظام الشكل والمحاذاة المشترك: مقياس واحد للزوايا وإطار واحد لكل الصفحات.
   يُحمَّل قبل responsive.css و motion.css.

   Same convention as responsive.css: every selector starts with :root so it
   wins over style.css even when a view links it again inside <body>, and
   !important is used only against inline style="" or an existing !important.

   The two rules of the layer:
     1. Corners. A control (button, field, chip, tile, page number) uses
        --ui-r-ctl. A surface (card, panel, menu, dialog, page bar) uses
        --ui-r-box. A circle is only for an avatar, a flag or a round icon.
        The header and footer are square. No other radius is used anywhere.
     2. Frame. Header, page bar, content and footer share one column:
        --ui-page-max wide, --rsp-gutter from the screen edge, and the content
        starts --ui-gap under the header on every page.
   ========================================================================== */

:root {
    --ui-r-ctl: 6px;
    --ui-r-box: 10px;
    --ui-page-max: 1440px;
    --ui-gap: 32px;
    --ui-line: rgba(183, 135, 46, .45);
    --ui-hair: rgba(183, 135, 46, .22);
    --ui-field: #cdb98f;
    --ui-danger: #b3261e;
    /* the same inset on both sides once the screen is wider than the frame */
    --ui-inset: max(var(--rsp-gutter), calc((100% - var(--ui-page-max)) / 2 + var(--rsp-gutter)));
}

@media (max-width: 1199.98px) {
    :root {
        --ui-gap: 18px;
    }
}

/* CP and Committee: data tables need the width */
:root:has(body.ui-wide) {
    --ui-page-max: 1760px;
}


/* --------------------------------------------------------------------------
   1. Frame: header
   -------------------------------------------------------------------------- */

:root .header.landing_page {
    display: flex;
    align-items: center;
    height: var(--rsp-header-h);
    padding: 0;
    border-radius: 0;
    /* above everything in the page, under dialogs (1040+) */
    z-index: 1030;
}

    :root .header.landing_page > .container {
        max-width: var(--ui-page-max);
        padding: 0 var(--rsp-gutter) !important;
    }

    :root .header.landing_page .navbar-contaner {
        border-radius: 0;
    }

    /* the last button ends exactly on the frame edge */
    :root .header.landing_page .header_auth > .btn:last-child {
        margin-left: 0 !important;
    }

    /* header controls: the icon sits before the word, and sign-in is the only
       solid button; the language switch is a quiet outline beside it */
    :root .header.landing_page .header_auth .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

        :root .header.landing_page .header_auth .btn > i {
            font-size: 20px;
            line-height: 1;
        }

        /* right-to-left: "enter" points the way the text runs */
        :root .header.landing_page .header_auth .btn > .la-sign-in-alt {
            transform: scaleX(-1);
        }

    :root .header.landing_page .header_auth .btn.header-lang {
        min-width: 0;
        margin-left: 8px;
        padding-right: 12px;
        padding-left: 12px;
        color: var(--rsp-green);
        background: transparent;
        border: 1px solid var(--ui-line);
    }

        :root .header.landing_page .header_auth .btn.header-lang:hover,
        :root .header.landing_page .header_auth .btn.header-lang:focus {
            color: var(--rsp-green);
            background: var(--rsp-sand);
            border-color: var(--rsp-gold);
        }

        :root .header.landing_page .header_auth .btn.header-lang > i {
            color: var(--rsp-gold);
        }

    /* menu icons belong to the phone sheet (responsive.css); the desktop bar is text only */
    :root .header.landing_page .nav-link > .nav-ico {
        display: none;
    }

    /* member services (Areas/User/Views/Shared/_MemberNav.cshtml): groups that
       open under the bar. The current page carries .nav-on, set on the server,
       because the views strip .active from the menu in ChangeNav */
    :root .header.landing_page .navbar-nav .dropdown-toggle::after {
        /* the theme's triangle; .nav-caret stands in for it */
        margin: 0;
        border: 0;
    }

    :root .header.landing_page .nav-caret {
        display: inline-block;
        width: 7px;
        height: 7px;
        margin-right: 6px;
        border: solid currentColor;
        border-width: 0 0 2px 2px;
        opacity: .7;
        transform: translateY(-3px) rotate(-45deg);
        transition: transform .16s ease;
    }

    :root .header.landing_page [aria-expanded="true"] > .nav-caret {
        transform: translateY(1px) rotate(135deg);
    }

    :root .header.landing_page .navbar-nav .dropdown-menu {
        text-align: right;
    }

    :root .header.landing_page .navbar-nav .dropdown-item {
        color: var(--rsp-ink);
    }

        :root .header.landing_page .navbar-nav .dropdown-item:hover,
        :root .header.landing_page .navbar-nav .dropdown-item:focus,
        :root .header.landing_page .navbar-nav .dropdown-item:active,
        :root .header.landing_page .navbar-nav .dropdown-item.nav-on {
            color: var(--rsp-green);
            background: var(--rsp-sand);
        }

        :root .header.landing_page .navbar-nav .dropdown-item.nav-on {
            font-weight: 700;
            box-shadow: inset -3px 0 0 var(--rsp-gold);
        }

@media (max-width: 1199.98px) {
    /* in the phone sheet: same marker as .active (responsive.css) */
    :root .header.landing_page .navbar-nav .nav-item .nav-link.nav-on {
        color: var(--rsp-green);
        background: var(--rsp-sand);
        font-weight: 700;
        box-shadow: inset -3px 0 0 var(--rsp-gold);
    }

    /* the arrow sits on the far edge of the row */
    :root .header.landing_page .navbar-nav .nav-link > .nav-caret {
        margin-right: auto;
        margin-left: 6px;
    }

    /* the open group is a sand box, so its entries light up white */
    :root .header.landing_page .navbar-nav .dropdown-item:hover,
    :root .header.landing_page .navbar-nav .dropdown-item:focus,
    :root .header.landing_page .navbar-nav .dropdown-item:active,
    :root .header.landing_page .navbar-nav .dropdown-item.nav-on {
        background: #fff;
    }
}

@media (min-width: 1200px) {
    :root .header.landing_page .navbar-nav > .dropdown > .dropdown-menu {
        right: 0;
        left: auto;
        float: none;
        min-width: 210px;
        /* lands just under the bar */
        margin-top: 14px;
        padding: 6px;
        border: 1px solid var(--ui-line);
        box-shadow: 0 18px 40px rgba(35, 31, 26, .2);
    }

        :root .header.landing_page .navbar-nav > .dropdown > .dropdown-menu > .dropdown-item {
            padding: 8px 12px;
            font-size: 15px;
            line-height: 1.6;
            border-radius: var(--ui-r-ctl);
        }

    /* same gold rule under the word as .active (motion.css) */
    :root .header.landing_page .navbar-nav > .nav-item > .nav-link.nav-on::after {
        transform: scaleX(1);
    }

    /* many views carry their own ".row" rule; the header must not move with it */
    :root .header.landing_page > .container > .row {
        flex-wrap: nowrap;
        align-items: center;
        margin: 0;
    }

    :root .header.landing_page .hidden-sm {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        padding: 0;
        margin: 0 !important;
    }

        :root .header.landing_page .hidden-sm img {
            width: auto;
            height: 40px;
            max-width: none !important;
        }

    :root .header.landing_page .navbar-contaner {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
        padding: 0 28px 0 0;
        background: none;
    }

    :root .header.landing_page .navbar {
        flex-wrap: nowrap;
        align-items: center;
    }

    :root .header.landing_page .dashboard_log {
        position: static !important;
        flex: 0 0 auto;
        margin: 0 auto 0 0;
    }

    :root .header.landing_page .header_auth {
        display: flex;
        align-items: center;
    }

    /* spacing separates the entries; the thick gold bars between them are gone */
    :root .header.landing_page .navbar-nav {
        align-items: center;
    }

        :root .header.landing_page .navbar-nav > .nav-item {
            border-left: 0 !important;
        }

            :root .header.landing_page .navbar-nav > .nav-item > .nav-link {
                padding: 8px 12px;
                line-height: 24px;
                white-space: nowrap;
            }
}


/* --------------------------------------------------------------------------
   2. Frame: content, page bar, footer
   -------------------------------------------------------------------------- */

/* public pages */
:root .intro > .container {
    max-width: var(--ui-page-max);
    padding-right: var(--rsp-gutter);
    padding-left: var(--rsp-gutter);
}

    /* the theme clips #main-wrapper; it reaches into the gutters so a border or
       shadow that sits on the frame edge is not cut off */
    :root .intro > .container #main-wrapper {
        margin-right: calc(var(--rsp-gutter) * -1);
        margin-left: calc(var(--rsp-gutter) * -1);
        padding-right: var(--rsp-gutter);
        padding-left: var(--rsp-gutter);
    }

    /* nested containers would add a second gutter */
    :root .intro > .container .container {
        max-width: none;
        padding-right: 0;
        padding-left: 0;
    }

@media (min-width: 1200px) {
    /* content starts under the header instead of floating in the middle of the
       screen, so a long page can no longer slide up behind the header */
    :root .intro {
        align-items: flex-start;
        min-height: 0;
        padding: calc(var(--rsp-header-h) + var(--ui-gap)) 0 var(--ui-gap);
    }

        :root .intro .section-padding {
            padding: 0;
        }

    /* a sign-in page fills the screen so its illustration is not cropped, and
       the card sits on the frame edge, centred vertically */
    :root #main-wrapper.signin:has(.center-form) {
        display: flex;
        align-items: center;
        min-height: calc(100vh - var(--rsp-header-h) - var(--ui-gap) * 2 - 54px);
        background-position: center;
    }

        :root #main-wrapper.signin:has(.center-form) > .section-padding {
            flex: 1 1 auto;
            min-width: 0;
        }

    :root .row:has(> [class*="col-"] > .center-form) {
        justify-content: flex-start !important;
    }

        :root .row:has(> [class*="col-"] > .center-form) > .col-xl-1.hidden-xs {
            display: none;
        }
}

:root .signin .row[style*="padding-top"] {
    padding-top: 0 !important;
}

/* member, CP and committee pages; registration forms */
:root body > .page-title {
    margin: calc(var(--rsp-header-h) + var(--ui-gap)) var(--ui-inset) 0 !important;
    padding: 8px 16px !important;
    border-radius: var(--ui-r-box) !important;
}

    /* a page without a breadcrumb keeps the spacing but shows no bar */
    :root body > .page-title:not(:has(*)) {
        padding: 0 !important;
        background: none !important;
    }

    :root body > .page-title > .container {
        max-width: none;
        padding: 0;
    }

    :root body > .page-title h4 {
        margin: 0;
        line-height: 1.7;
    }

:root body > #main-wrapper > .section-padding,
:root body > form > #main-wrapper > .section-padding {
    padding: var(--ui-gap) 0 48px !important;
}

:root body > form > #main-wrapper > .section-padding {
    padding-top: calc(var(--rsp-header-h) + var(--ui-gap)) !important;
}

    :root body > #main-wrapper > .section-padding > .container,
    :root body > form > #main-wrapper > .section-padding > .container {
        max-width: var(--ui-page-max);
        padding-right: var(--rsp-gutter) !important;
        padding-left: var(--rsp-gutter) !important;
    }

        :root body > #main-wrapper > .section-padding > .container .container,
        :root body > form > #main-wrapper > .section-padding > .container .container {
            max-width: none;
            padding-right: 0;
            padding-left: 0;
        }

/* the member shell is a row: its columns, not the row, carry the 15px, so the
   profile card and the tiles end on the same edges as the page bar */
:root .rsp-user-shell {
    flex: 0 0 auto;
    width: calc(100% + 30px) !important;
    max-width: none;
    margin-right: -15px;
    margin-left: -15px;
}

/* footer: its padding is set in responsive.css with --ui-inset. The icon, not
   its 36px hit area, sits on the frame edge */
:root .firtpage-footer a:last-child {
    margin-left: -9px;
}


/* --------------------------------------------------------------------------
   3. Corners: controls
   -------------------------------------------------------------------------- */

:root .btn,
:root .login100-form-btn,
:root .BidValue-btn,
:root .sort-by-label,
:root .swal2-popup .swal2-styled,
:root button.navbar-toggler {
    border-radius: var(--ui-r-ctl) !important;
}

:root .form-control,
:root .input100,
:root .focus-input100,
:root textarea,
:root .custom-select,
:root .custom-file-label,
:root .select2-container--default .select2-selection--single,
:root .select2-container--default .select2-selection--multiple,
:root .bootstrap-select > .dropdown-toggle,
:root input.mazad-input,
:root textarea.mazad-input {
    border-radius: var(--ui-r-ctl);
}

/* joined fields keep square inner edges. The page is right-to-left, so the
   first child is the right-hand one (the theme's rules assume left-to-right) */
:root .input-group > .form-control:not(:last-child),
:root .input-group > .input-group-prepend > .input-group-text,
:root .input-group > .input-group-prepend > .btn {
    border-radius: 0 var(--ui-r-ctl) var(--ui-r-ctl) 0 !important;
}

:root .input-group > .form-control:not(:first-child),
:root .input-group > .input-group-append > .input-group-text,
:root .input-group > .input-group-append > .btn {
    border-radius: var(--ui-r-ctl) 0 0 var(--ui-r-ctl) !important;
}

:root .input-group > .form-control:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

:root .input-group-text {
    border-radius: var(--ui-r-ctl);
}

/* page numbers are separate cells: see section 10 */
:root .pagination .page-link,
:root .pagination .page-item:first-child .page-link,
:root .pagination .page-item:last-child .page-link {
    border-radius: var(--ui-r-ctl);
}

/* any element rounded by an inline style falls back to the control radius;
   circles and explicit zeros are left alone */
:root [style*="border-radius"]:not([style*="border-radius: 50%"]):not([style*="border-radius:50%"]):not([style*="border-radius: 100%"]):not([style*="border-radius: 0"]):not([style*="border-radius:0"]) {
    border-radius: var(--ui-r-ctl) !important;
}

:root [style*="border-top-right-radius"] {
    border-top-right-radius: var(--ui-r-ctl) !important;
}

:root [style*="border-bottom-right-radius"] {
    border-bottom-right-radius: var(--ui-r-ctl) !important;
}

:root [style*="border-top-left-radius"] {
    border-top-left-radius: var(--ui-r-ctl) !important;
}

:root [style*="border-bottom-left-radius"] {
    border-bottom-left-radius: var(--ui-r-ctl) !important;
}


/* --------------------------------------------------------------------------
   4. Corners: surfaces
   -------------------------------------------------------------------------- */

:root .card,
:root .alert,
:root .modal-content,
:root .dropdown-menu,
:root .swal2-popup,
:root .auth-form,
:root .signin .card-body,
:root .center-form .form-content,
:root .camel-image-container,
:root .camel-image-container .camel-image,
:root .custom-btn-bid,
:root .note-info,
:root .usericon {
    border-radius: var(--ui-r-box) !important;
}

/* header and body follow the card they sit in */
:root .card > .card-header:first-child {
    border-radius: var(--ui-r-box) var(--ui-r-box) 0 0 !important;
}

:root .card > .card-header + .card-body,
:root .card > .card-footer:last-child {
    border-radius: 0 0 var(--ui-r-box) var(--ui-r-box) !important;
}

:root .card > .card-body:only-child,
:root .card > .card-body:first-child:last-child {
    border-radius: var(--ui-r-box) !important;
}

:root .modal-header {
    border-radius: var(--ui-r-box) var(--ui-r-box) 0 0;
}

:root .modal-footer {
    border-radius: 0 0 var(--ui-r-box) var(--ui-r-box);
}


/* --------------------------------------------------------------------------
   5. Components
   -------------------------------------------------------------------------- */

/* sign-in card: the copyright line belongs to the flow of the card */
:root .center-form .form-content {
    min-height: 0 !important;
    padding: 36px 22px 20px;
}

    :root .center-form .form-content > p {
        position: static !important;
        width: auto !important;
        margin: 20px 0 0 !important;
        font-size: 13px;
        line-height: 1.6;
    }

/* section title on the landing page */
:root .top-Description {
    border-width: 1px;
    border-radius: var(--ui-r-ctl);
}

/* rank / owner chip: a round avatar on a plain name plate */
:root .top-contacts {
    display: block;
    width: 100%;
}

    /* member photos come in any shape: crop them to the circle, never squash */
    :root .top-contacts .top-contacts-image > .person-img:not(.nationality-Image) {
        display: block;
        object-fit: cover;
        object-position: center top;
    }

    :root .top-contacts .top-contacts-name {
        display: flex;
        align-items: center;
        justify-content: center;
        right: 27px;
        left: 0;
        width: auto;
        padding: 0 34px;
        border-radius: var(--ui-r-ctl) 0 0 var(--ui-r-ctl);
        line-height: 1.25;
    }

/* category box (auctions, market): caption under its chip, chips on one edge */
@media (min-width: 1200px) {
    :root .col-xl-2.col-md-4 > br {
        display: none;
    }

    :root .col-xl-2.col-md-4 > .card > .card-body {
        padding: 10px 12px !important;
    }

        :root .col-xl-2.col-md-4 > .card > .card-body > .row {
            margin: 0;
        }

            :root .col-xl-2.col-md-4 > .card > .card-body > .row > [class*="col-"] {
                padding: 4px 0;
                text-align: center;
            }

        :root .col-xl-2.col-md-4 > .card > .card-body [id^="nav"] {
            margin: 0 !important;
            border-width: 1px !important;
        }

        :root .col-xl-2.col-md-4 > .card > .card-body > .row > [class*="col-"] > span {
            position: static !important;
            display: block;
            margin-top: 2px;
            font-size: 12px !important;
            line-height: 1.3;
        }
}

/* registration type: picture and caption form one card */
:root .type_page a {
    display: inline-block;
    width: 200px;
    max-width: 100%;
}

:root .type_page .usericon {
    display: block;
    width: 100%;
    border: 1px solid var(--ui-line);
    border-bottom: 0;
    border-radius: var(--ui-r-box) var(--ui-r-box) 0 0 !important;
}

:root .type_page .blink_title {
    margin: 0;
    padding: 8px 0;
    border-radius: 0 0 var(--ui-r-box) var(--ui-r-box);
}

/* the empty-list message spans the list column */
:root .divBids > .alert {
    margin-left: 0 !important;
}

/* sign-in card ends on the frame edge, not 15px past it */
:root .row:has(> [class*="col-"] > .center-form) {
    margin-right: 0;
    margin-left: 0;
}

    :root .row:has(> [class*="col-"] > .center-form) > [class*="col-"] {
        padding-right: 0;
        padding-left: 0;
    }

/* auction list: the outer cards end on the frame edge */
:root .divBids {
    margin-right: -15px;
    margin-left: -15px;
}

@media (min-width: 1200px) {
    :root .row > .col-xl-9.col-md-8 {
        padding-left: 0;
    }
}

/* member shortcut tiles: one even row, no orphan on a second line */
@media (min-width: 992px) {
    :root .rsp-tiles {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
        gap: 12px;
        margin-bottom: 20px;
    }

        :root .rsp-tiles .custom-btn-bid {
            width: auto;
            min-width: 0;
            margin: 0;
        }
}

/* tables and badges */
:root .table th,
:root .table td {
    border-radius: 0 !important;
}

:root .badge:not(.rounded-pill):not(.badge-pill) {
    border-radius: var(--ui-r-ctl);
}


/* --------------------------------------------------------------------------
   9. About pages: /Home/AboutUs, /Home/Mission, /Home/Objectives
   (breakpoints are in responsive.css)
   -------------------------------------------------------------------------- */

:root .ab-page {
    padding-bottom: var(--ui-gap);
    color: var(--rsp-ink);
    font-size: 18px;
    line-height: 1.9;
    text-align: right;
}

    :root .ab-page p {
        margin: 0 0 16px;
        color: inherit;
        font-size: inherit;
        line-height: inherit;
    }

/* title and the three sibling pages on one side, the mark on the other */
:root .ab-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--ui-line);
}

:root .ab-title {
    margin: 0 0 16px;
    color: var(--rsp-green);
    font-size: 44px;
    font-weight: 700;
    line-height: 1.3;
}

:root .ab-logo {
    flex: 0 0 auto;
    width: auto;
    height: 132px;
}

:root .ab-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    :root .ab-tabs a {
        padding: 6px 20px;
        border: 1px solid var(--ui-line);
        border-radius: var(--ui-r-ctl);
        color: var(--rsp-green);
        font-size: 16px;
        line-height: 1.6;
        text-decoration: none;
    }

        :root .ab-tabs a:hover {
            border-color: var(--rsp-gold);
            background: var(--rsp-sand);
        }

        :root .ab-tabs a[aria-current] {
            border-color: var(--rsp-green);
            background: var(--rsp-green);
            color: #fff;
        }

        :root .ab-tabs a:focus-visible {
            outline: 3px solid var(--rsp-green);
            outline-offset: 2px;
        }

/* about */
:root .ab-page .ab-lead {
    max-width: 38em;
    margin: 32px 0 40px;
    font-size: 24px;
}

:root .ab-cols {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--ui-line);
}

:root .ab-sec-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

    :root .ab-sec-head img {
        flex: 0 0 auto;
        width: 56px;
        height: 56px;
    }

    :root .ab-sec-head h2 {
        margin: 0;
        color: var(--rsp-green);
        font-size: 26px;
        font-weight: 700;
        line-height: 1.4;
    }

:root .ab-rules {
    margin: 0;
    padding: 0;
    list-style: none;
}

    :root .ab-rules li {
        position: relative;
        padding: 14px 24px 14px 0;
        border-top: 1px solid var(--ui-line);
    }

        :root .ab-rules li::before {
            content: "";
            position: absolute;
            top: calc(14px + .95em - 4px);
            right: 0;
            width: 8px;
            height: 8px;
            background: var(--rsp-gold);
        }

/* notice above the rates: investment is still under study */
:root .ab-page .ab-note {
    margin: 0 0 20px;
    padding: 12px 18px;
    border-right: 4px solid var(--rsp-gold);
    border-radius: var(--ui-r-ctl);
    background: var(--rsp-sand);
    font-size: 16px;
    line-height: 1.8;
}

    :root .ab-note strong {
        color: var(--rsp-green);
    }

/* the two rates a name can be offered at */
:root .ab-rates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0 24px;
}

:root .ab-rate {
    display: flex;
    flex-direction: column;
    padding: 20px 24px 22px;
    border-radius: var(--ui-r-box);
    background: var(--rsp-green);
    color: #fff;
}

:root .ab-rate-pct {
    color: #e6cd98;
    font-size: 64px;
    font-weight: 700;
    line-height: 1.1;
}

:root .ab-rate-label {
    margin-top: 10px;
    color: rgba(255, 255, 255, .8);
    font-size: 15px;
    line-height: 1.6;
}

:root .ab-rate-open {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
}

/* mission */
:root .ab-page .ab-statement {
    max-width: 30em;
    margin: 48px 0 24px;
    padding-right: 28px;
    border-right: 4px solid var(--rsp-gold);
    color: var(--rsp-green);
    font-size: 32px;
    font-weight: 500;
}

/* objectives */
:root .ab-goals {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px 32px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}

    :root .ab-goals li {
        padding-top: 24px;
        border-top: 3px solid var(--rsp-gold);
    }

    :root .ab-goals img {
        display: block;
        width: 64px;
        height: 64px;
        margin-bottom: 16px;
    }

    :root .ab-goals p {
        margin: 0;
    }


/* --------------------------------------------------------------------------
   10. Pager (Shared/_pagination.cshtml in every area, and the lists that
       member.js pages in the browser)
       wide:   page x of y | previous 1 … 4 5 6 … 12 next | go to page
       phone:  previous | page x of y | next, the go-to field underneath
   -------------------------------------------------------------------------- */

:root .pager {
    margin-top: 16px;
}

:root .pg {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 16px;
    max-width: 100%;
}

:root .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 0;
}

    :root .pagination .page-link {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-width: 40px;
        height: 40px;
        margin: 0;
        padding: 0 10px;
        border: 1px solid var(--ui-line);
        background: #fff;
        color: var(--rsp-green);
        font-size: 15px;
        font-weight: 600;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
    }

        :root .pagination .page-link .fa {
            font-size: 12px;
        }

    :root .pagination .page-item.active .page-link {
        border-color: var(--rsp-green);
        background: var(--rsp-green);
        color: #fff;
    }

    :root .pagination .page-item.disabled .page-link {
        border-color: rgba(35, 31, 26, .1);
        background: #faf8f4;
        color: #a39a8c;
    }

    :root .pagination .pg-prev .page-link,
    :root .pagination .pg-next .page-link {
        padding: 0 14px;
    }

    :root .pagination .pg-gap .page-link {
        min-width: 20px;
        padding: 0;
        border-color: transparent;
        background: none;
        color: #6b6257;
    }

:root .pg-info {
    margin: 0 0 0 auto;
    color: #6b6257;
    font-size: 14px;
    line-height: 40px;
    white-space: nowrap;
}

    :root .pg-info b {
        color: var(--rsp-ink);
        font-weight: 700;
    }

:root .pg-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 0 0;
    color: #6b6257;
    font-size: 14px;
}

    :root .pg-jump label {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        white-space: nowrap;
    }

    :root .pg-jump input {
        width: 68px;
        height: 40px;
        padding: 0 6px;
        border: 1px solid var(--ui-line);
        border-radius: var(--ui-r-ctl);
        background: #fff;
        color: var(--rsp-ink);
        font-size: 15px;
        text-align: center;
    }

        :root .pg-jump input:focus {
            border-color: var(--rsp-gold);
            outline: 0;
            box-shadow: 0 0 0 3px rgba(183, 135, 46, .2);
        }

    :root .pg-jump button {
        min-width: 0;
        height: 40px;
        padding: 0 14px;
        border: 1px solid var(--rsp-green);
        border-radius: var(--ui-r-ctl) !important;
        background: #fff;
        color: var(--rsp-green);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

        :root .pg-jump button:hover {
            background: var(--rsp-green);
            color: #fff;
        }

/* a narrow column: the pager takes the middle line, the rest goes around it */
@media (max-width: 767.98px) {
    :root .pg-info,
    :root .pg-jump {
        margin: 0;
    }
}

/* phone: previous | page x of y | next. Numbers are too small to hit and do
   not fit; the go-to field covers a far page */
@media (max-width: 575.98px) {
    :root .pg {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 10px 8px;
    }

        :root .pg .pagination,
        :root .pg .page-item {
            display: contents;
        }

            :root .pg .page-item:not(.pg-prev):not(.pg-next) > .page-link {
                display: none;
            }

        :root .pg .pagination .page-link {
            height: 44px;
            padding: 0 16px;
        }

        :root .pg .pg-prev > .page-link {
            order: 1;
            justify-self: start;
        }

        :root .pg .pg-info {
            order: 2;
            line-height: 44px;
        }

        :root .pg .pg-next > .page-link {
            order: 3;
            justify-self: end;
        }

        :root .pg .pg-jump {
            order: 4;
            grid-column: 1 / -1;
            justify-content: center;
        }

            :root .pg .pg-jump input,
            :root .pg .pg-jump button {
                height: 44px;
            }
}

@media print {
    :root .pager {
        display: none;
    }
}


/* --------------------------------------------------------------------------
   11. Lists (.ui-page is the content column of the member, CP and committee
       layouts, and of a public page that shows a list)
   -------------------------------------------------------------------------- */

/* a list wrapper outside a row has no negative margin to make up for, so its
   column padding would push the list 15px inside the page edges */
:root .ui-page :not(.row) > .table-responsive[class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

/* public list page: its outer row would pull the page 15px past the frame */
:root .intro .ui-page > .row {
    margin-right: 0;
    margin-left: 0;
}

/* "عدد السجلات": a chip on the far edge above the list */
:root .ui-page div[style*="background-color:#09572d"][style*="float:left"] {
    float: none !important;
    display: inline-block;
    padding: 4px 12px !important;
    border-radius: var(--ui-r-ctl);
    background: var(--rsp-sand) !important;
    color: var(--rsp-green) !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
}

:root .ui-page div[style*="margin-left:15px"]:has(> div[style*="background-color:#09572d"]) {
    margin: 0 0 10px !important;
    text-align: left;
}

:root .ui-page .row > div[style*="margin-left:15px"]:has(> div[style*="background-color:#09572d"]) {
    padding: 0 15px;
}

:root .ui-page .table {
    margin-bottom: 16px;
    border: 1px solid var(--ui-line);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--ui-r-box);
    background: #fff;
    color: var(--rsp-ink);
}

    :root .ui-page .table th,
    :root .ui-page .table td {
        padding: 10px 8px;
        border: 0;
        vertical-align: middle;
        font-size: 14px;
        line-height: 1.6;
    }

    :root .ui-page .table thead th {
        border-bottom: 1px solid var(--ui-line);
        border-left: 0 !important;
        background: var(--rsp-sand) !important;
        color: var(--rsp-green);
        font-size: 13px;
        font-weight: 700;
    }

    :root .ui-page .table td {
        border-top: 1px solid var(--ui-hair);
        color: var(--rsp-ink);
        font-weight: 400;
    }

    :root .ui-page .table thead + tbody tr:first-child td,
    :root .ui-page .table thead + tr td {
        border-top: 0;
    }

    /* the rule between the rows is enough; stripes fight the status colours */
    :root .ui-page .table-striped tbody tr:nth-of-type(odd) {
        background-color: transparent;
    }

    :root .ui-page .table thead tr:first-child th:first-child {
        border-top-right-radius: calc(var(--ui-r-box) - 1px) !important;
    }

    :root .ui-page .table thead tr:first-child th:last-child {
        border-top-left-radius: calc(var(--ui-r-box) - 1px) !important;
    }

    :root .ui-page .table tr:last-child td:first-child {
        border-bottom-right-radius: calc(var(--ui-r-box) - 1px) !important;
    }

    :root .ui-page .table tr:last-child td:last-child {
        border-bottom-left-radius: calc(var(--ui-r-box) - 1px) !important;
    }

    :root .ui-page .table td hr {
        margin: 6px 0;
        border-top-color: var(--ui-hair);
    }

    :root .ui-page .table td h5 {
        margin: 0;
        color: var(--ui-danger) !important;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.6;
    }

    :root .ui-page .table .btn {
        min-width: 0;
        padding: 5px 12px;
        font-size: 13px;
        line-height: 1.6;
        white-space: nowrap;
    }

    /* a status is a label, not a button: thin outline, a tint of its own colour,
       and it does not react to the pointer */
    :root .ui-page .table .btn[style*="cursor:default"],
    :root .ui-page .table .btn[style*="cursor: default"] {
        margin: 0;
        padding: 3px 8px;
        border-width: 1px !important;
        background: color-mix(in srgb, currentColor 9%, #fff);
        box-shadow: none !important;
        transform: none !important;
        white-space: normal;
        pointer-events: none;
    }

/* nothing to list */
:root .ui-page > .alert-warning,
:root .ui-page .ui-empty {
    margin: 0 0 16px !important;
    padding: 28px 20px;
    border: 1px dashed var(--ui-line);
    background: #fff;
    color: var(--rsp-ink);
    text-align: center;
}

:root .ui-page .ui-empty {
    border-radius: var(--ui-r-box);
}

    :root .ui-page .ui-empty h5 {
        margin: 0 0 6px;
        color: var(--rsp-green);
        font-size: 18px;
        font-weight: 700;
    }

    :root .ui-page .ui-empty p {
        margin: 0 0 16px;
        color: var(--rsp-ink);
        font-size: 14px;
    }


/* --------------------------------------------------------------------------
   12. Forms and panels
   -------------------------------------------------------------------------- */

:root .ui-page .form-control {
    border-width: 1px !important;
    border-color: var(--ui-field) !important;
}

    :root .ui-page .form-control:focus {
        border-color: var(--rsp-gold) !important;
        box-shadow: 0 0 0 3px rgba(183, 135, 46, .2);
    }

/* search panel above a list */
:root .ui-page .auth-form.card {
    margin-bottom: 16px;
    border: 1px solid var(--ui-line);
    box-shadow: none;
}

/* a switch and its caption stay on one line; a long caption wraps beside
   the switch instead of under it */
:root .ui-page [class*="col-"]:has(> .switch) {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

    :root .ui-page [class*="col-"]:has(> .switch) > .switch {
        flex: 0 0 auto;
        margin: 0;
    }

    :root .ui-page [class*="col-"]:has(> .switch) > .mylable {
        min-width: 0;
        line-height: 1.6 !important;
    }

@media (max-width: 575.98px) {
    :root .ui-page [class*="col-"]:has(> .switch) > .mylable {
        font-size: 16px !important;
    }
}

/* notes with an inline grey outline (wallet, payment pages) */
:root .ui-page div[style*="solid 1px #dde0e2"] {
    border-color: var(--ui-line) !important;
    background: var(--rsp-sand) !important;
}

/* the grey search box of the CP and committee lists is the same white panel */
:root .ui-page .signin .auth-form.card,
:root .ui-page.signin .auth-form.card {
    background: #fff;
}

:root .ui-page .auth-form.card > .card-body {
    padding: 16px 20px 4px;
}

:root .ui-page .control-label,
:root .ui-page form [class*="col-"] > label,
:root .ui-page .form-group > label {
    margin-bottom: 4px;
    color: var(--rsp-ink) !important;
    font-size: 14px;
}


/* --------------------------------------------------------------------------
   13. Lists that do not fit: responsive.js adds .ui-stack when a table is wider
than its column, at any screen size. Each row becomes a card and each
      cell carries its column title (data-label), so nothing scrolls sideways.
   -------------------------------------------------------------------------- */

:root .ui-page .table.ui-stack,
:root .ui-page .table.ui-stack tbody {
    display: block;
}

:root .ui-page .table.ui-stack {
    border: 0;
    border-radius: 0;
    background: none;
}

    /* the titles stay available to a screen reader */
    :root .ui-page .table.ui-stack thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    :root .ui-page .table.ui-stack tr {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        column-gap: 24px;
        margin-bottom: 12px;
        padding: 6px 14px;
        border: 1px solid var(--ui-line);
        border-radius: var(--ui-r-box);
        background: #fff;
    }

    :root .ui-page .table.ui-stack td {
        display: grid;
        grid-template-columns: minmax(104px, 40%) minmax(0, 1fr);
        align-content: center;
        align-items: center;
        column-gap: 12px;
        min-height: 40px;
        padding: 6px 0;
        border: 0;
        text-align: right;
        overflow-wrap: anywhere;
    }

        :root .ui-page .table.ui-stack td::before {
            content: attr(data-label);
            grid-column: 1;
            grid-row: 1 / span 6;
            color: #6b6257;
            font-size: 13px;
            font-weight: 400;
        }

        :root .ui-page .table.ui-stack td > * {
            grid-column: 2;
        }

        :root .ui-page .table.ui-stack td.ui-cell-empty {
            display: none;
        }

        :root .ui-page .table.ui-stack td h5 {
            text-align: right;
        }

    /* a finger needs more than a 30px button */
    :root .ui-page .table.ui-stack .btn {
        min-width: 112px;
        min-height: 38px;
        padding: 7px 14px;
    }

    :root .ui-page .table.ui-stack .btn[style*="cursor:default"],
    :root .ui-page .table.ui-stack .btn[style*="cursor: default"] {
        width: auto !important;
        min-height: 0;
        padding: 3px 12px;
    }

@media (max-width: 575.98px) {
    :root .ui-page .table.ui-stack tbody tr td + td {
        border-top: 1px solid var(--ui-hair);
    }
}
