﻿/* Using bootstrap 5 - overrides across all forms */
html {
    font-size: 14px !important;
}

body {
    padding-top: 3.5em;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
a {
    text-decoration: none;
}

h1, h2, h3, h4 {
    margin-bottom: 0;
    line-height: inherit;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;   
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1rem;
    padding: 0;
}

.validation-summary-valid.alert-danger {
    display: none;
}

.btn.collapsed .bi-chevron-down {
    transform: rotate(0);
}

.btn:not(.collapsed) .bi-chevron-down {
    transform: rotate(180deg);
}

/* Hide the spinner (up/down arrows) for number inputs in Chrome, Safari, Edge, Opera */
.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Hide the spinner (up/down arrows) for number inputs in Firefox */
.no-spinner[type=number] {
    -moz-appearance: textfield;
}


/* bootstrap overrides / theme changes */
:root {
    --cwp-colour-bg: #337ab7;
    --cwp-font-color: white;
    --bs-navbar-color: rgba(255, 255, 255, 0.85);
    --bs-navbar-hover-color: rgba(255, 255, 255);
    --border-color: #ccc;
    --warning-color: #664d03;
}

.btn {
    background-color: var(--cwp-colour-bg);
    color: var(--cwp-font-color);
    border: none;
}
.cwp-accent {
    background-color: var(--cwp-colour-bg);
    color: var(--cwp-font-color);
    padding: 1rem;
}

.card-header {
    margin-top: 0;
    margin-bottom: 0;
    background-color: var(--cwp-colour-bg);
    color: var(--cwp-font-color);
}

.card-header h1 {
    margin-bottom: 0;
    font-size: 1.5rem;
}

.card-title {
    margin-bottom: 0;
}

.dropdown-menu li a,
.dropdown-item-text {
    text-decoration: none;
    color: inherit;
    padding: 0.2rem 0.4rem;
    width: 100%;
    display: block;
    font-size: 0.9rem;
}

th {
    background: var(--cwp-colour-bg) !important;
    color: var(--cwp-font-color) !important;
}

tfoot {
    display: none;
}

.alert {
    padding: 1rem 1rem 0 1rem;
}

.datepicker-days {
    padding: 1rem;
}

.datepicker-days th {
    color: unset!important;
    background: white!important;
}

/* dataTables overrides */
.dt-length,
.dt-info {
    padding: 1rem 0;
}

.dataTable tbody tr:last-child td {
    border-bottom: 1px solid #ddd;
}

/* to ensure tables are rendered responsive */
table {
    width: 100%!important;
}

label{
    font-weight: bold;
}

.dataTables_length {
    margin-right: 1rem;
}

.form-select {
    max-width: 100%;
}

.bootstrap-select .dropdown-menu li a {
    white-space: normal;
}

.bootstrap-select > .dropdown-toggle.bs-placeholder {
    color: white;
}

#loader, #modalSpinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-weight: bold;
    font-size: 1.4rem;
}

legend {
    font-size: 1rem;
    font-weight: 600;
}

/* Log in Form */
#loginForm, #change-password-form {
    max-width: 25em;
    padding: 1em;
    margin: 0 auto;
}

#versionInfo{
    margin-top: 3em;
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 0.5em;
}


/* Home Page */
.home-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.home-page-option {
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.home-page-option > a,
.home-page-option > .btn-group > .btn {
    width: 100%;
    white-space: normal; 
    overflow-wrap: break-word;
    font-size: 1.2rem;
}

.home-page-option > p {
    text-align: center;
    white-space: normal;
    padding-top: 0.6rem;
}

/* Asset Search */
@media (min-width: 992px) {
    .responsive-border {
        border-right: 1px solid var(--border-color);
    }
}

.custom-top-search {
    border-top: none;
    margin-top: 0;
    padding-left: 0;
}

@media (max-width: 991px) {
    .custom-top-search {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
}

#searchResults_wrapper {
    margin-bottom: 1em;
}

/* Asset Details */
#assetWarningsPanel,
#contactWarningsPanel,
#asbestosWarningsPanel {
    
}

/* Order Search */
#searchResultsHeader {
    padding: 1rem 0;
}

.colourSlice {
    color: red;
    border-left: 5px solid red!important; /* Datatable override */
}

/* Attribute Search */
.redFlag {
    color: red !important;
    cursor: default !important;
}

.grayFlag {
    color: gray;
}

.actions .btn {
    background-color: rgb(221, 221, 221);
    color: var(--cwp-colour-bg);
    font-weight: bold;
}

/* Batch Completions */
@media (min-width: 576px) {
    .modal-dialog {
        max-width: 700px;
    }
}

/* Vary Order */
tr.editedOrderLine td {
    background-color: powderblue;
}

tr.editedOrderLine td:nth-child(3):before {
    content: "** Edits Pending **";
    font-weight: bold;
    display: block;
}

tr.deletedOrderLine td {
    background-color: pink;
}

tr.deletedOrderLine td:nth-child(3):before {
    content: "** Flagged For Deletion **";
    font-weight: bold;
    display: block;
}
