/* Overlay */
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    -webkit-transform: translate3d(0,0,0);
}

#loading {
    border:1px solid #2a67ac;
    padding: 10px 10px 10px 60px;
    width: 300px;
    height: 100px;
    background: rgb( 255, 255, 255) url('../images/FhHRx-Spinner.gif') 10px 50% no-repeat;
    position: fixed;
    display: none;
    z-index: 3000;
}

#loading h4 { margin: 3px 0 0 0; padding: 0; color: #d80; }

.pull-right {
    float: right;
}

.non-local-image {
    display: inline-block;
    border: 3px dashed #eee;
    border-radius: 5px;
}

.non-local-image:after {
    background: url(../logo.php) center center no-repeat;
    background-size: cover;
    content: "";
    z-index: -1;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.3;
}

div.section-break {
    margin-top: 1em;
    margin-bottom: 0.5em;
    padding-top: 0.8em !important;
    border-top: 1px solid #ccc;
}

input.dp {
    width: 10em;
}

/* Custom css for datepicker */
.ui-datepicker-trigger {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:0;
    padding:0;
    margin:0 0 0 6px;
    position:static;
    top:auto;
    width:16px;
    height:16px;
    background:inherit;
    vertical-align:middle;
    flex:0 0 auto;
}

input.dp,
input.hasDatepicker,
input[type="time"],
input[type="datetime-local"] {
    vertical-align:middle;
}

.ui-datepicker,
.ui-timepicker-div {
    z-index:4000 !important;
}

.ui-datepicker-trigger {
    border:1px solid #bfd0e4;
    border-radius:6px;
    padding:2px;
    width:24px;
    height:24px;
    background:linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
    box-shadow:0 1px 2px rgba(16, 37, 63, 0.08);
}

input.dp,
input.hasDatepicker,
input[type="time"],
input[type="datetime-local"] {
    min-height:28px;
}

.ui-datepicker,
.ui-timepicker-div,
.ui-datepicker.ui-widget {
    border: 1px solid #c9d7e6 !important;
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(16, 37, 63, 0.16);
    overflow: hidden;
}

.ui-datepicker .ui-datepicker-header {
    background: linear-gradient(180deg, #f7fafc 0%, #e8f0f8 100%);
    border: none;
    color: #153b63;
}

.ui-datepicker .ui-datepicker-title,
.ui-timepicker-div .ui-widget-header {
    color: #153b63;
    font-weight: 600;
}

.ui-datepicker th {
    color: #5f7185;
    font-weight: 600;
}

.ui-datepicker td a,
.ui-datepicker td span {
    border-radius: 8px;
}

.ui-datepicker td a.ui-state-default {
    background: #fff;
    border: 1px solid transparent;
    color: #1d3557;
}

.ui-datepicker td a.ui-state-hover,
.ui-datepicker td a.ui-state-active,
.ui-datepicker td a.ui-state-highlight {
    background: #184e81;
    border-color: #184e81;
    color: #fff;
}

.draft-saved {
    background-color: black;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px 6px;
    border-radius: 3px;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
    line-height: 14px;
    position: absolute;
    top: 3em;
    right: 0.5em;
}

.delete-draft:hover {
    background-color: #fc9f41 !important;
}

.notice_bar { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; border: 1px solid #0a0; background: url('../assets/default/images/icons/ok.png') 10px 50% no-repeat #e0ffe0; }

.warning_bar { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; border: 1px solid #f26522; background: url('../assets/default/images/icons/alert.png') 10px 50% no-repeat #ffffdd; }

.error_bar { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; border: 1px solid #a00; background: url('../assets/default/images/icons/error.png') 10px 50% no-repeat #fff0f0; }

/* client and open-ticket polish */
body {
    background: linear-gradient(180deg, #f4f7fb 0%, #edf2f7 100%);
    color: #20364d;
    font-family: "Lato", "Segoe UI", Arial, sans-serif;
}

a {
    color: #184e81;
}

table {
    max-width: 100%;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
textarea,
select {
    border: 1px solid #c7d4e2;
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: inset 0 1px 2px rgba(15, 35, 55, 0.04);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    border-color: #7aa7d6;
    box-shadow: 0 0 0 3px rgba(24, 78, 129, 0.12);
    outline: none;
}

input[type="submit"],
input[type="reset"],
input[type="button"],
.button {
    border-radius: 8px;
    border: 1px solid rgba(24, 78, 129, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #edf4fb 100%);
    color: #153b63;
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 8px 18px rgba(15, 35, 55, 0.08);
}

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
.button:hover {
    border-color: rgba(24, 78, 129, 0.34);
    background: linear-gradient(180deg, #ffffff 0%, #e7f0fa 100%);
}

.notice_bar,
.warning_bar,
.error_bar {
    border-radius: 10px;
}

@media (max-width: 820px) {
    body {
        font-size: 15px;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    input[type="search"],
    input[type="tel"],
    textarea,
    select {
        width: 100%;
        max-width: 100%;
    }

    .ui-datepicker {
        max-width: calc(100vw - 16px);
    }
}

/* final client polish */
#container {
    max-width: 1180px;
    margin: 0 auto;
    box-shadow: 0 24px 60px rgba(18, 41, 71, 0.09);
}

#header {
    background: linear-gradient(135deg, #f9fbfe 0%, #edf3f8 55%, #e8eef5 100%);
    border-bottom: 1px solid #d4deea;
    padding: 12px 18px;
}

#header #logo {
    max-width: 320px;
}

#header .pull-right {
    color: #4d647b;
    line-height: 1.7;
}

#nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid #dfe7ef;
}

#nav li {
    float: none;
    display: block;
}

#nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px 0 42px;
    border-radius: 999px;
    background-position: 14px 50%;
    background-repeat: no-repeat;
    white-space: nowrap;
}

#content {
    padding: 24px 26px 30px;
}

#content > h1:first-of-type,
#ticketInfo h1,
#content > p:first-of-type {
    color: #143a61;
}

.search.well,
#ticketInfo,
#reply,
#ticketThread,
form#ticketForm {
    border-radius: 16px;
}

.search.well,
form#ticketForm,
#reply {
    background: rgba(255,255,255,0.94);
    border: 1px solid #d8e3ed;
    box-shadow: 0 12px 28px rgba(16, 37, 63, 0.07);
}

form#ticketForm,
#reply {
    padding: 18px 18px 8px;
}

form#ticketForm > table,
#ticketInfo {
    width: 100% !important;
    max-width: 100%;
}

#ticketInfo .infoTable,
table.custom-data,
#ticketTable {
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #dae3ec;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(16, 37, 63, 0.06);
}

#ticketInfo .infoTable td,
#ticketInfo .infoTable th,
table.custom-data td,
table.custom-data th,
#ticketTable td,
#ticketTable th {
    padding: 11px 13px;
    border-bottom: 1px solid #e7eef5;
}

#ticketInfo .infoTable tr:last-child td,
#ticketInfo .infoTable tr:last-child th,
table.custom-data tr:last-child td,
table.custom-data tr:last-child th,
#ticketTable tr:last-child td {
    border-bottom: 0;
}

#ticketInfo .headline,
table.custom-data .headline,
#ticketTable caption {
    background: #f6f9fc;
    color: #143a61;
    font-weight: 700;
}

#ticketThread .thread-entry {
    margin-bottom: 18px;
}

#ticketThread .thread-entry .header {
    border-radius: 14px 14px 0 0;
    border-color: rgba(17, 52, 88, 0.16);
    box-shadow: 0 8px 22px rgba(18, 41, 71, 0.05);
}

#ticketThread .thread-entry .thread-body {
    background: #fff;
    border-color: #dbe4ed;
    border-bottom: 1px solid #dbe4ed;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 14px 26px rgba(16, 37, 63, 0.08);
}

.states {
    background: rgba(255,255,255,0.9);
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #dbe5ee;
}

.states .state.active {
    font-weight: 700;
    color: #143a61;
}

.captchaRow td {
    vertical-align: middle;
}

.captcha img {
    border-radius: 10px;
    border: 1px solid #d4deea;
    background: #fff;
    padding: 4px;
}

@media (max-width: 980px) {
    #content {
        padding: 18px 14px 24px;
    }

    #ticketInfo > tbody > tr > td {
        display: block;
        width: 100% !important;
    }

    #ticketInfo .pull-right,
    .states,
    .search.well .pull-right {
        float: none;
        display: block;
        margin-top: 10px;
    }
}

@media (max-width: 820px) {
    #container {
        box-shadow: none;
    }

    #header {
        padding: 14px 12px;
    }

    #header #logo,
    #header .pull-right {
        float: none;
        text-align: center;
    }

    #nav {
        padding: 10px 10px 12px;
    }

    #nav li,
    #nav a {
        width: 100%;
    }

    #nav a {
        justify-content: center;
    }

    form#ticketForm,
    #reply {
        padding: 14px 12px 6px;
    }

    form#ticketForm > table tbody,
    form#ticketForm > table tr,
    form#ticketForm > table td {
        display: block;
        width: 100% !important;
    }

    form#ticketForm > table td {
        padding: 6px 0;
    }

    #ticketInfo .infoTable th,
    #ticketInfo .infoTable td,
    table.custom-data th,
    table.custom-data td,
    #ticketTable th,
    #ticketTable td {
        display: block;
        width: auto !important;
    }

    #ticketTable thead {
        display: none;
    }

    #ticketTable tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #dbe4ed;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 10px 18px rgba(16, 37, 63, 0.06);
        overflow: hidden;
    }

    #ticketTable tbody td {
        border-bottom: 1px solid #edf2f7;
    }

    #ticketTable tbody td:last-child {
        border-bottom: 0;
    }

    #ticketThread .thread-entry .header .pull-right,
    #ticketThread .thread-entry .header .flush-right {
        float: none;
        display: block;
        text-align: left;
        margin-top: 8px;
    }

    #dynamic-form,
    #dynamic-form tbody,
    #dynamic-form tr,
    #dynamic-form td,
    .captchaRow,
    .captchaRow td {
        display: block;
        width: 100% !important;
    }

    form#ticketForm label,
    form#ticketForm label span,
    form#ticketForm .form-header,
    form#ticketForm .form-header h3,
    form#ticketForm .form-header div {
        display: block;
        width: 100%;
        white-space: normal;
    }

    form#ticketForm input[type="text"],
    form#ticketForm input[type="email"],
    form#ticketForm input[type="tel"],
    form#ticketForm input[type="number"],
    form#ticketForm input[type="search"],
    form#ticketForm input[type="password"],
    form#ticketForm select,
    form#ticketForm textarea,
    #reply input[type="text"],
    #reply input[type="email"],
    #reply input[type="tel"],
    #reply input[type="number"],
    #reply select,
    #reply textarea {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        box-sizing: border-box;
        margin: 8px 0 0;
    }

    form#ticketForm input[name$="-ext"] {
        width: 100% !important;
        margin-top: 8px;
    }

    form#ticketForm br,
    #reply br {
        display: none;
    }

    .redactor-box,
    .redactor-toolbar,
    .redactor-layer,
    .redactor-editor {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .redactor-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        height: auto !important;
        padding: 8px;
    }

    .redactor-toolbar li {
        float: none !important;
        display: inline-flex;
    }

    .redactor-editor,
    .redactor-source {
        min-height: 180px !important;
    }

    .filedrop,
    .filedrop .dropzone,
    .filedrop .files {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .filedrop .dropzone {
        min-height: 88px;
        padding: 14px 12px;
        white-space: normal;
        text-align: center;
    }

    .captcha {
        display: block;
        margin-bottom: 10px;
    }

    .captcha img {
        max-width: 100%;
        height: auto;
    }

    .buttons,
    p.buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .buttons input,
    p.buttons input,
    .buttons .button,
    p.buttons .button {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 560px) {
    #content {
        padding: 14px 10px 20px;
    }

    form#ticketForm,
    #reply,
    .search.well {
        padding-left: 10px;
        padding-right: 10px;
        border-radius: 12px;
    }

    form#ticketForm > table td,
    #dynamic-form td {
        padding: 5px 0 !important;
    }

    form#ticketForm .form-header h3,
    #content > h1:first-of-type {
        font-size: 1.25em;
        line-height: 1.3;
    }
}
