﻿/* Remove undeline on all hyper links */
a {
    text-decoration: none;
    background-color: transparent;
}

/* Revert margin of BTS4 to be -15px on each side of row */
.row {
    margin-left: -15px;
    margin-right: -15px;
}

/* Revert margin of BTS4 to be 15px on each side of column */
.row > [class^="col-"], .row > [class*=" col-"], [class^="col-"], [class*=" col-"] {
    padding-left: 15px;
    padding-right: 15px;
    position: relative;
}

/* Fix top menu "More..." dropdown location */
.navbar-static-top .dropdown-menu {
    right: auto;
}

/* Restore the bottom margin for form-group class */
.form-group {
    margin-bottom: 1rem;
}

/* Fixed position of help button on top right of pages */
.navbar-top-links li:last-child {
    margin-right: 20px;
    margin-left: 20px;
}

/* Bootstrap 5 .modal-header/.modal-body/.modal-footer take their padding, button gap and borders from --bs-modal-*
   variables that are declared on .modal only. jQuery UI dialogs using this markup (e.g. the map viewer modals) have no
   .modal ancestor, so e.g. the footer padding and the gap between its buttons collapsed to 0. The same applies to the
   map viewer confirmation alert (.lkv-confirm-alert, a plain overlay, not a jQuery UI dialog).
   Declare the Bootstrap 5 defaults there; a real .modal inside still declares its own values. */
.ui-dialog,
.lkv-confirm-alert {
    --bs-modal-padding: 1rem;
    --bs-modal-header-padding: 1rem 1rem;
    --bs-modal-header-border-width: var(--bs-border-width);
    --bs-modal-header-border-color: var(--bs-border-color);
    --bs-modal-footer-gap: 0.5rem;
    --bs-modal-footer-border-width: var(--bs-border-width);
    --bs-modal-footer-border-color: var(--bs-border-color);
}

/* Back compatibility with bootstrap 3 */
.radio-inline + .radio-inline {
    margin-top: 0;
    margin-left: 10px;
}

/* Back compatibility with bootstrap 3 */
.radio-inline {
    padding-left: 20px;
}

/* Avoid misplacement of elements */
.row > * {
    padding-right: 0px;
    padding-left: 0px;
}

/* Form select appearance to what we had previously */
@media (min-width: 576px) {
    .form-inline .form-control {
        display: inline-block;
        width: auto;
        vertical-align: middle;
    }
}

/* Form select appearance to what we had previously */
select.form-control, .form-select {
    border: 1px solid #e5e6e7;
    font-size: .9rem;
    color: inherit;
    height: 2.05rem;
    display: block;
    width: 100%;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    -moz-padding-start: calc(0.75rem - 3px);
    font-weight: 400;
    line-height: 1.5;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Fixed case when disabled box are under ellipses lookup and they do not align */
.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    margin-left: -1px;
}

/* Fixed button height on lookup field ellipses buttons */
.input-group > .input-group-btn > .btn {
    padding-top: 7px;
    padding-bottom: 7px;
}

/* Fix text color in detailed editor custom view buttons */
.ibox-tools .btn.btn-success {
    color: white !important;
}

/* Removed double caret for dropdowns */
.dropdown-toggle::after {
    display: none;
}

/* Added compatibility with close button */
.btn-close[data-bs-dismiss="modal"] {
    color: transparent;
}

/* Make default dialog of bootstrap 4 the same as bootstrap 3 */
@media (min-width: 768px) {
    .modal-dialog {
        width: 600px;
        margin: 30px auto;
    }
}

.modal-dialog {
    max-width: initial;
}

.modal-lg, .modal-xl {
    width: 800px;
}

/* Fix close button in editor modals */
.modal-header .close {
    padding: 1rem 1rem;
    margin: -1rem -1rem -1rem auto;
    float: right;
    height: 30px;
}

/* Keep same margin for <p> as bootstrap 3 */
p {
    margin-bottom: 10px;
}

/* Fixed align of switch to DMS in georeference panel */
#btnSwitchLatLonFormat {
    margin-top: -5px !important;
    margin-bottom: 0px !important;
}

/* Fix file input control buttons */
div.fileinput.input-group {
    display: inline-flex;
}

/* Fix file input control buttons */
div.fileinput.input-group span.input-group-addon.btn.btn-default.btn-file,
div.fileinput.input-group a.input-group-addon.btn.btn-default.fileinput-exists {
    margin-bottom: 0px;
}

/* Continue to support dropped .form-inline class in bts5 */
.form-inline {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-flow: row wrap;
    flex-flow: row wrap;
    -ms-flex-align: center;
    align-items: center;
}

/* fixed misalignment of label and controls on bts 5 */
    .form-inline .form-group {
    margin-bottom: 0;
}

/* fixed misalignment of label and controls on bts 5 */
.form-inline label {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
}

/* TEMPORARY: fix to hidden close button in jquery dialogs */
button.ui-dialog-titlebar-close {
    border: 1px solid rgb(197, 197, 197);
    background-color: rgb(246, 246, 246);
}

/* TEMPORARY: fix to hidden close button in jquery dialogs */
button.ui-dialog-titlebar-close::before {
    content: "x";
    position: absolute;
    top: 0px;
    left: 5px;
    line-height: 1rem;
    color: #9e9e9e;
    font-weight: 800;
}

/* Fixed style of jquery dialog buttons */
.ui-widget-content .ui-dialog-buttonset button {
    border: 1px solid #ccc;
    background: #ededed;
    font-weight: normal;
    color: #2b2b2b;
    padding: 5px 13px 5px 13px;
}

/* Fixed style of jquery dialog buttons */
.ui-widget-content .ui-dialog-buttonset button.SmartFilterClearIcon {
    margin-top: 10px;
}

/* Fixed style of table in monitoring stations dashboard */
.table > :not(:last-child) > :last-child > * {
    border-bottom-color: inherit;
}

/* Fixed style of table in monitoring stations dashboard */
tbody, td, tfoot, th, thead, tr {
    border-style: initial;
}

/* Fixed misplacement of cascading headers */
.input-group-prepend {
    display: -ms-flexbox;
    display: flex;
}

/* Fixed alignment of BOEM login top alert */
.alert {
    padding: 0.75rem 1.25rem !important;
}

/* Bootstrap 5.1+ introduced a .placeholder skeleton-loading component
   (background-color: currentcolor; opacity: .5), which collides with
   jquery-tag-editor's empty-state <li class="placeholder"> and renders the
   grid "Enter search tags" box as a solid grey block. Neutralize the BTS
   component within the tag-editor so the placeholder text shows normally.
   (.tag-editor .placeholder = specificity 0,2,0, beats Bootstrap's .placeholder 0,1,0.) */
.tag-editor .placeholder {
    background-color: transparent;
    opacity: 1;
    cursor: text;
    min-height: 0;
}

/* BS5 drives .btn-* state colors from --bs-btn-* vars, but the theme colors
   buttons with flat backgrounds (Inspinia swaps primary=green/success=blue).
   The flat rules only cover the resting/hover states, so active/dropdown-open
   fall back to BS5's default green/blue. Re-map the vars to the theme colors. */
.btn-primary {
    --bs-btn-bg: #1ab394;
    --bs-btn-border-color: #1ab394;
    --bs-btn-hover-bg: #18a689;
    --bs-btn-hover-border-color: #18a689;
    --bs-btn-active-bg: #18a689;
    --bs-btn-active-border-color: #18a689;
    --bs-btn-focus-shadow-rgb: 26, 179, 148;
    --bs-btn-disabled-bg: #1ab394;
    --bs-btn-disabled-border-color: #1ab394;
}

.btn-success {
    --bs-btn-bg: #237BC0;
    --bs-btn-border-color: #237BC0;
    --bs-btn-hover-bg: #1d6db0;
    --bs-btn-hover-border-color: #1d6db0;
    --bs-btn-active-bg: #1d6db0;
    --bs-btn-active-border-color: #1d6db0;
    --bs-btn-focus-shadow-rgb: 35, 123, 192;
    --bs-btn-disabled-bg: #237BC0;
    --bs-btn-disabled-border-color: #237BC0;
}