/* ==============================================================
Bootstrap tweaks
===============================================================*/

html {
    position: relative;
    min-height: 100%;
}

h1,
h2,
h3,
h4 {
    font-weight: 400;
}

body {
    font-size: .875rem;
}

a {
    color: #533f03;
    font-weight: bold;
}

button.btn.btn-link {
    color: #533f03;
    font-weight: bold;
}

a:hover,
a:active {
    color: #4ca928;
}

button.btn.btn-link:hover,
button.btn.btn-link:active {
    color: #4ca928;
    text-decoration: underline;
}

a.pointer {
    cursor: pointer;
}


/* ==========================================================================
Browser Upgrade Prompt
========================================================================== */
.browserupgrade {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}


/* ==========================================================================
Overrding ng-select styles
========================================================================== */
.ng-select.small-container {
    border-radius: .2rem;
}

.ng-select.small-container .ng-select-container {
    height: calc(1.8125rem + 2px) !important;
    min-height: inherit;
}

/* ==========================================================================
Generic styles
========================================================================== */

/* Error highlight on input fields */

ng-select.ng-invalid[required] {
    border-color: inherit;
    box-shadow: inherit;
}

ng-select.ng-valid[required] {
    border-color: inherit;
    box-shadow: inherit;
}

.ng-valid[required],
.ng-valid.required,
ng-select.ng-valid[required] .ng-select-container {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, .25) !important;
}

.ng-invalid[required],
.ng-invalid.required,
ng-select.ng-invalid .ng-select-container,
ng-select.ng-invalid .ng-select-container:hover,
.ng-select.ng-invalid.ng-select-focused.ng-select-opened .ng-select-container,
.ng-select.ng-invalid.ng-select-focused:not(.ng-select-opened) > .ng-select-container {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, .25);
}

.ng-select.ng-select-focused.ng-select-opened .ng-select-container,
.ng-select.ng-select-focused:not(.ng-select-opened) > .ng-select-container {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

.ng-select .ng-select-container {
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.required {
    color: red;
}

/* other generic styles */
.jh-card {
    padding: 1.5%;
    margin-top: 20px;
    border: none;
}

.error {
    color: white;
    background-color: red;
}

.pad {
    padding: 10px;
}

.w-40 {
    width: 40% !important;
}

.w-60 {
    width: 60% !important;
}

.break {
    white-space: normal;
    word-break: break-all;
}

.readonly {
    background-color: #eee;
    opacity: 1;
}

.footer {
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

.hand,
[jhisortby] {
    cursor: pointer;
}

/* ==========================================================================
Custom alerts for notification
========================================================================== */
.alerts .alert {
    text-overflow: ellipsis;
}

.alert pre {
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    padding: 0;
    margin: 0;
}

.alert .popover pre {
    font-size: 10px;
}

.alerts .toast {
    position: fixed;
    width: 100%;
}

.alerts .toast.left {
    left: 5px;
}

.alerts .toast.right {
    right: 5px;
}

.alerts .toast.top {
    top: 55px;
}

.alerts .toast.bottom {
    bottom: 55px;
}

@media screen and (min-width: 480px) {
    .alerts .toast {
        width: 50%;
    }
}

/* ==========================================================================
entity tables helpers
========================================================================== */
/* Remove Bootstrap padding from the element
http://stackoverflow.com/questions/19562903/remove-padding-from-columns-in-bootstrap-3 */
.no-padding-left {
    padding-left: 0 !important;
}

.no-padding-right {
    padding-right: 0 !important;
}

.no-padding-top {
    padding-top: 0 !important;
}

.no-padding-bottom {
    padding-bottom: 0 !important;
}

.no-padding {
    padding: 0 !important;
}

/* bootstrap 3 input-group 100% width
http://stackoverflow.com/questions/23436430/bootstrap-3-input-group-100-width */
.width-min {
    width: 1% !important;
}

/* Makes toolbar not wrap on smaller screens
http://www.sketchingwithcss.com/samplechapter/cheatsheet.html#right */
.flex-btn-group-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
}

/* ==========================================================================
entity detail page css
========================================================================== */
.row.jh-entity-details > dd {
    margin-bottom: 15px;
}

@media screen and (min-width: 768px) {
    .row.jh-entity-details > dt {
        margin-bottom: 15px;
    }

    .row.jh-entity-details > dd {
        border-bottom: 1px solid #eee;
        padding-left: 180px;
        margin-left: 0;
    }
}

/* ==========================================================================
ui bootstrap tweaks
========================================================================== */
.nav,
.pagination,
.carousel,
.card-title a {
    cursor: pointer;
}

.datetime-picker-dropdown > li.date-picker-menu div > table .btn-secondary,
.uib-datepicker-popup > li > div.uib-datepicker > table .btn-secondary {
    border: 0;
}

.datetime-picker-dropdown > li.date-picker-menu div > table:focus,
.uib-datepicker-popup > li > div.uib-datepicker > table:focus {
    outline: none;
}

.thread-dump-modal-lock {
    max-width: 450px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-content {
    margin-top: 5.5rem;
    margin-bottom: 6rem;
}

.main-content.accessible input.form-control:focus,
.main-content.accessible .col-form-label input:focus,
.main-content.accessible input.form-check-input:focus + label,
.main-content.accessible input.form-check-input:focus,
.main-content.accessible .ng-select.ng-select-focused .ng-select-container,
.main-content.accessible .btn.active.focus,
.main-content.accessible .btn.active:focus,
.main-content.accessible .btn.focus,
.main-content.accessible .btn:active.focus,
.main-content.accessible .btn:active:focus,
.main-content.accessible .btn:focus
{
    outline: medium dotted;
    outline-offset: -2px;
}

.main-content.accessible input.form-check-input:focus,
.main-content.accessible input.form-check-input:focus + label{
    outline-offset: 2px;
}

main h2.header {
    margin-bottom: 2.5rem;
}

