/* SmartPay Branding Refresh */

/* Supreme Font - place font files in ~/fonts/ directory */
@font-face {
    font-family: 'Supreme';
    src: url('../fonts/Supreme-Regular.woff2') format('woff2'),
         url('../fonts/Supreme-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Supreme';
    src: url('../fonts/Supreme-Bold.woff2') format('woff2'),
         url('../fonts/Supreme-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

::selection { background: Highlight; color: HighlightText; }
::-moz-selection { background: Highlight; color: HighlightText; }

body {
    font-family: 'Supreme', helvetica, sans-serif;
    color: #323e48;
    background-color: #f4f4f4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body a { color: #323e48; }
body a:hover, body a:focus { color: #323e48; }
/* Links inside text blocks must be distinguishable without colour alone */
td a:not([class]), p a, .news a { text-decoration: underline; }

input[type=text], input[type=tel], input[type=password], input[type=number], select, textarea, div.richify, div.readonly_box {
    background-color: #f4f4f4;
    border: 1px solid #d3d3d3;
    color: #323e48;
    font-family: inherit;
    font-size: 10pt;
}
input[type=checkbox] {
    height: 13px;
    width: 13px;
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
    border: 1px solid #888888;
    cursor: pointer;
    vertical-align: middle;
    padding: 0;
    margin: 6px;
}
input[type=checkbox]:checked {
    background-color: #77b32a;
    border-color: #77b32a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpolyline points='2,7 6,11 12,4' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 100% 100%;
}
input[type=text]:disabled, input[type=password]:disabled, select:disabled, textarea:disabled {
    background-color: #dddddd;
    color: #323e48;
}

input[type=submit], input[type=button] {
    padding: 5px 15px;
    background-color: #ffffff;
    color: #323e48;
    border: 2px solid #77b32a;
    -webkit-border-radius: 50px;
    border-radius: 50px;
    width: 130px;
    -webkit-appearance: none;
    font-family: inherit;
}
td.grid_button { width: 130px; }
input[type=submit]:hover, input[type=button]:hover,
input[type=submit]:active, input[type=button]:active,
input[type=submit]:focus, input[type=button]:focus {
    cursor: pointer;
    background-color: #323e48;
    color: #77b32a;
    border-color: #323e48;
}
input[type=submit][disabled=disabled] {
    color: #ffffff;
    background: #ccc;
    border-color: #ccc;
    cursor: default;
}

.menu {
    font-size: large;
    font-family: 'Supreme', helvetica, sans-serif;
    color: #323e48;
    background-color: #f4f4f4;
    border-bottom: 2px solid #77b32a;
    border-top: 2px solid #77b32a;
    padding: 5px;
    margin: 5px;
    overflow: visible;
}
.menu::after {
    content: "";
    display: table;
    clear: both;
}
.menu_link {
    padding: 4px 6px;
    display: inline-block;
    line-height: 16px;
    min-height: 24px;
}
.menu > a { color: #323e48; }
.menu > span { color: #323e48; }
.menu > div > div:first-of-type { color: #323e48; }
.menu > a:hover, .menu > a:focus { background-color: #ddd; color: #323e48; }
.menu > div:hover > div:first-of-type,
.menu > div:focus-within > div:first-of-type { background-color: #ddd; color: #323e48; }
#divUserFunctions:hover > div,
#divUserFunctions:focus-within > div { background-color: transparent; cursor: default; }

/* Dropdown panel — always rendered, shown/hidden via opacity+visibility so CSS transitions work */
.menu > div > div:nth-of-type(1n+2) {
    display: block;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 150ms ease, transform 150ms ease, visibility 0ms linear 150ms;
    background-color: #f4f4f4;
    border: none;
    border-top: 3px solid #77b32a;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    z-index: 1000;
}
.menu > div:hover > div:nth-of-type(1n+2),
.menu > div:focus-within > div:nth-of-type(1n+2) {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 150ms ease, transform 150ms ease, visibility 0ms linear 0ms;
}

/* Dropdown items — dark blue fill + white text on hover, like Go2Pay */
.menu > div > div:nth-of-type(1n+2) a {
    color: #323e48;
    border-left: 3px solid transparent;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.menu > div > div:nth-of-type(1n+2) a:hover,
.menu > div > div:nth-of-type(1n+2) a:focus {
    background-color: #323e48;
    border-left-color: #77b32a;
    color: #f4f4f4;
}

/* Council/org name in header centre */
.app_council_name {
    font-family: 'Supreme', helvetica, sans-serif;
    font-size: 1.85em;
    color: #323e48;
    text-align: center;
    line-height: 1.2;
}

/* Links in text blocks — no underline by default, green on hover */
td a:not([class]), p a, .news a { text-decoration: none; }
td a:not([class]):hover, td a:not([class]):focus,
p a:hover, p a:focus,
.news a:hover, .news a:focus { color: #77b32a; text-decoration: none; }

.form_td_label { color: #323e48; }

.grid_table, .form_table, .mini_form, .midi_form {
    border: 3px solid #77b32a;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    border-radius: 15px;
    border-spacing: 5px;
    box-shadow: -1px 1px #FFFFFF;
    color: #323e48;
    background-color: #f4f4f4;
}
/* Remove white background on table headers */
th { background-color: #f4f4f4 !important; }

/* Filter/action dropdowns — brand background only */
select.action, select[id$="Filter"] {
    background-color: #f4f4f4;
}

.grid_data_tr td, .grid_data_tr td a { color: #323e48; }
.grid_data_tr:hover td, .grid_data_tr:hover td a { color: #323e48; }
.grid_th { color: #323e48; font-weight: bold; }
.grid_title, .form_title, .form_group_title {
    font-family: 'Supreme', helvetica, sans-serif;
    border-radius: 5px;
    padding-top: 5px;
    padding-bottom: 5px;
}
.grid_title, .form_title { background: #323e48; color: #f4f4f4; }
.form_group_title { background: #323e48; color: #f4f4f4; }
.form_group_collapse { color: #f4f4f4; }
.grid_rowcount, .grid_prev_next { color: #323e48; font-style: italic; }
.grid_prev_next_disabled { color: #636363; }
.grid_date_filter { font-size: xx-small; width: initial; margin-left: 2px; }
.app_title { color: #323e48; font-size: x-large; }
.app_welcome { font-family: 'Supreme', helvetica, sans-serif; color: #323e48; font-size: x-large; }
.invalid { background-color: #ff8888; }
.error_title { color: #323e48; }
.required { color: #c00000; }

div.select_list > div > div { background-color: #f4f4f4; }

/* jQuery UI dialog overrides */
.ui-widget-header {
    border: 1px solid #323e48;
    background: #323e48;
    color: #f4f4f4;
}
.ui-widget-header a { color: #f4f4f4; }
.ui-dialog .ui-dialog-titlebar-close,
.ui-dialog .ui-dialog-buttonpane button {
    background: #ffffff;
    border: 1px solid #cccccc;
    color: #323e48;
}
.ui-dialog .ui-dialog-titlebar-close:hover,
.ui-dialog .ui-dialog-buttonpane button:hover {
    background: #f4f4f4;
    border: 1px solid #5a8a20;
    color: #323e48;
}
.ui-dialog .ui-dialog-titlebar-close .ui-icon,
.ui-dialog .ui-dialog-titlebar-close:hover .ui-icon {
    background-image: url("images/ui-icons_222222_256x240.png");
}

@media (pointer:coarse) {
    #imgAppLogo, #divUserFunctions { display: none; }
    input[type=submit], input[type=button] {
        height: 44px;
        width: auto;
        margin: 1px;
        min-width: 66px;
    }
    .grid_table, .form_table, .mini_form, .midi_form {
        border: 1px solid #77b32a;
        background-color: #f4f4f4;
        width: 100%;
    }
    .menu { font-size: medium; }
}
