/* Theme */

:root{
    --primary-color:#d71920;
    --red-700: #c60910;
    --dark-grey-800:#2d2d2d;
    --dark-grey-600: #666666;
    --light-grey-800: #e1e1e1;
    --light-grey-700: #ececec;
    --light-grey-600: #f2f2f2;
}

.woocommerce table.my_account_invoices {
    font-size: .85em;
}

.woocommerce table.my_account_invoices td,
.woocommerce table.my_account_invoices th {
    padding: 4px 8px;
    vertical-align: middle;
}

.woocommerce table.my_account_invoices .button {
    white-space: nowrap;
}

.woocommerce table.my_account_invoices .order-actions {
    text-align: right;
}

.woocommerce table.my_account_invoices .order-actions .button {
    margin: .125em 0 .125em .25em;
}

.my_account_invoices.my_account_all_orders .button.view::after {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    line-height: 1;
    vertical-align: -.125em;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    line-height: inherit;
    vertical-align: baseline;
    content: "\f06e";
    margin-left: 0.5407911001em;
}

.my_account_all_orders_table td,
th {
    padding: 4px;
}

.my_account_invoices_search_table td,
th {
    padding: 4px;
}

.sapphire_orders_none {
    display: block;
    clear: both;
}

.my_account_all_orders .button.view::after {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    line-height: 1;
    vertical-align: -.125em;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    line-height: inherit;
    vertical-align: baseline;
    content: "\f06e";
    margin-left: 0.5407911001em;
}

/* Applies to all large popups */
.sapphire_large_popup {
    background-color: #ffffff;
    padding: 20px;
    height: auto;
    max-height: 500px;
    overflow:scroll;
    overflow-x: hidden;
    max-width: 700px;
    margin: 30px auto;
}

/* this name needs to be more generic and apply to all popups with the default width being small */
.sapphire_location_popup {
    background-color: #ffffff;
    padding: 20px !important;
    width: 300px;
    height: 180px;
    max-width: 300px;
    margin: 30px auto !important;
}

.sapphire_location_popup .fstToggleBtn {
    font-size: 1em;
    padding: 0.4em;
}

.sapphire_location_popup .fstResultItem {
    font-size: 1em;
    padding: 0.3em;
}

.sapphire_location_popup .sapphire_location_select_buttons {
    padding-top: 10px;
}

/* popup width override */
.sapphire_popup_medium{
	width: 380px;
	max-width: 380px;
	height: auto;
}

.sapphire_popup_medium .fstElement{
	width:100%;
}

.sapphire_order_decline_error {
    color: var(--red-700);
}

.sapphire_nowrap{
	white-space: nowrap;
}

.sapphire_text_center {
    text-align: center;
}

.sapphire_table_overflow {
    max-width: 100%;
    overflow: auto;
}

.sapphire_form_group {
    margin-bottom: 2em;
}

.sapphire_imported_results .sapphire_failed_import {
    color: var(--primary-color);
}

/* hide address on checkout */
.woocommerce-checkout input.readonly{
    background-color:#FFF !important; /* force it above focus */
    border:0 !important;
}

#billing_country_field,
#billing_address_1_field, #billing_address_2_field,
#billing_city_field,
#billing_state_field,
#billing_postcode_field,
#billing_phone_field{
    display:none !important; /* force it above form js change */
}

/* NO - azure needs to do this
#loginform{
	display:none;
}
*/

/* older versions of select css need some help */
ul#select2-select-stores-container{
	white-space: normal !important;
}
ul#select2-select-stores-container li{
	float:none !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    padding-bottom: 30px;
}

/* override height else cutoff placeholder */
.select2-container .select2-search--inline .select2-search__field{
	height:auto !important;
	max-height:2rem;
}

/* new defaults for front-end data tables */
.dataTables_wrapper .page-link{
	text-decoration: none !important;
}
.dataTables_wrapper .page-item.active .page-link{
	background-color: var(--dark-grey-600);
	border-color: var(--dark-grey-600);
}

button.overrides-loading span::after {
    content: '...';
}

/*** BUDGET & BRANCH WIDGET ***/

.sapphire_budget_header {
    display: flex;
    flex-wrap: wrap;
    min-height: 40px;
    font-size: 0.75rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--light-grey-700);
    border-top: 1px solid var(--light-grey-700);
}

.sapphire_budget_header>* {
    border: 1px solid var(--light-grey-800);
    border-radius: 4px;
    padding: 0.5rem;
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.sapphire_budget_header>.sapphire_budget_header_link {
    padding-block: 0;
}

#sapphire_budget_header div {
    min-height: 40px;
    padding: 0.5rem;
    background-color: var(--light-grey-600);
}

.sapphire_budget_links {
    display: flex;
    gap: 0.5rem;
}

.sapphire_budget_header_link {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    border-radius: 4px;
}

.sapphire_budget_header_link:hover {
    background: var(--red-700);
}

.sapphire_budget_header_link a {
    color: white;
    font-weight: bold;
    text-transform: capitalize;
    white-space: nowrap;
}

.sapphire_store_request_header_link {
    background: var(--dark-grey-800);
}

.sapphire_budget_header .sapphire_budget_amount {
    font-weight: bold;
}

.sapphire_budget_month {
    display: flex;
    gap: 0.5rem;
}

.sapphire_budget_amount {
    vertical-align: middle;
    margin-top: 0;
    white-space: nowrap;
    display: flex;
}

.sapp_budget_input_values {
    margin-left: 1rem;
}


@media(max-width:768px) {

    .sapphire_budget_header {
        width: 100%;
    }

    .sapphire_budget_wrapper {
        flex-direction: column;
    }

    .sapphire_budget_month,
    .sapphire_budget_wrapper,
    .sapphire_budget_header>.sapphire_budget_month,
    .sapphire_budget_location {
        width: 100%;
    }

    .sapphire_budget_month,
    .sapphire_budget_header>.sapphire_budget_month,
    .sapphire_budget_wrapper {
        justify-content: space-between;
    }

    .sapphire_budget_location {
        flex-wrap: wrap;
        justify-content: end;
    }

}

@media(min-width:769px) {
    .sapphire_budget_header {
        justify-content: center;
        margin-block: auto;
    }
}