/* Common
--------------------------------------------------------------*/

.required {
    color: red;
}

.both {
    clear: both;
}

.ets-field .Polaris-Labelled__HelpText,
.ets-field .ets-help-text {
    font-size: var(--p-text-body-sm-font-size);
    font-style: italic;
    line-height: var(--p-text-body-sm-font-line-height);
    opacity: 0.75;
}

.ets-pagination {
    text-align: center;
    padding-top: 10px;
}

.ets-pagination > .Polaris-Pagination {
    display: flex;
    justify-content: center;
}

.ets-pagination > .Polaris-Pagination p {
    margin: 0;
}

.ets_hd_message_content,
.ets-hd-message__content {
    word-break: break-word;
}

/* Common Form Fields
--------------------------------------------------------------*/

.ets-field-upload-with-thumb {
    display: flex;
    align-items: flex-start;
}

.ets-field-upload-with-thumb > .ets-field-upload-dropzone {
    flex-basis: 0;
    flex-grow: 1;
}

.ets-field-upload-with-thumb > .Polaris-Thumbnail {
    width: 4.375rem;
}

.ets-field-upload-with-thumb .Polaris-DropZone {
    min-height: 4.375rem;
}

.ets-field-upload-with-thumb > .Polaris-Thumbnail + .ets-field-upload-dropzone {
    padding-left: var(--p-space-300, 0.75rem);
}

.ets-field-upload-with-thumb .Polaris-DropZone-FileUpload {
    padding: var(--p-space-200, 0.5rem);
}

.etshc-upload-box.ets-has-files .Polaris-DropZone {
    min-height: 0;
}

.ets-field .ets-help-text {
    margin-top: var(--p-space-100, 0.25rem);
}

/* .etshc-upload-box.ets-no-files {
    width: 96px;
}

.etshc-upload-box.ets-has-files {
    width: 256px;
}

.etshc-upload-box .Polaris-Text--root {
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
} */

/* Login Form
--------------------------------------------------------------*/

.fisoma-login-card-wrapper {
    display: table;
    width: 100%;
    height: auto;
    margin-top: 20px;
}

.fisoma-login-card-wrapper-cell {
    display: table-cell;
    vertical-align: middle;
}

.fisoma-login-card-wrapper-cell .Polaris-FormLayout {
    width: 480px;
    max-width: 100%;
}

@media (min-width: 48em) {
    .fisoma-login-card-wrapper {
        height: auto;
        margin-top: 0px;
    }

    .fisoma-login-card-wrapper-cell > .Polaris-ShadowBevel > .Polaris-Box {
        padding-top: var(--p-space-800, 2rem);
        padding-bottom: var(--p-space-800, 2rem);
    }
}

/* Message List
--------------------------------------------------------------*/

#box-list-messages .ets-col-message {
    white-space: normal;
}

#box-list-messages .ets-col-message > * {
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

#box-list-messages .ets_hd_message_content {
    font-size: var(--p-text-body-md-font-size);
}

#box-list-messages .ets-unread [class^='Polaris-Text--'],
#box-list-messages .ets-unread .ets_hd_message_content {
    font-weight: var(--p-font-weight-bold);
}

#box-list-messages .ets-read [class^='Polaris-Text--'] {
    font-weight: var(--p-font-weight-regular);
}

#box-list-messages #ets-col-actions {
    text-align: right;
}

#box-list-messages .ets-col-actions .Polaris-ButtonGroup {
    justify-content: flex-end;
}

/* Single Message
--------------------------------------------------------------*/

.ticket__header-entry,
.ticket__body-entry {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
}

.ticket__header .ticket__label,
.ticket__body .ticket__label {
    flex: 0 0 80px;
    padding-right: 0.75rem;
}

.ets-download-link-box .Polaris-Icon {
    display: inline-block;
    vertical-align: middle;
}

/* Single Message Comments and Replies
--------------------------------------------------------------*/

.ets_hd_wrap_messages {
    margin-top: var(--p-space-200, 0.5rem);
}

.ets_hd_message {
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin: 0 60px;
    padding: 10px 15px;
    position: relative;
    border-radius: var(--p-border-radius-200, 8px);
    width: calc(100% - 120px);
    clear: both;
}

.ets_hd_message.staff {
    background-color: var(--p-color-bg-surface, #ffffff);
}

.ets_hd_message.customer {
    background-color: var(--p-color-bg-surface-info, #eaf4ff);
}

.ets_hd_message .avatar_img {
    display: block;
    position: absolute;
}

.ets_hd_message .avatar_img::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border: 1px solid transparent;
    position: absolute;
    top: 50%;
    margin-top: -5px;
}

.ets_hd_message.staff .avatar_img {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 15px;
}

.ets_hd_message.staff .avatar_img::before {
    left: auto;
    right: -19px;
    background-color: var(--p-color-bg-surface, #ffffff);
    border-top-color: rgba(0, 0, 0, 0.1);
    border-left-color: rgba(0, 0, 0, 0.1);
    transform: rotate(-45deg);
}

.ets_hd_message.customer .avatar_img {
    left: 100%;
    right: auto;
    margin-left: 15px;
    margin-right: 0;
}

.ets_hd_message.customer .avatar_img::before {
    left: -19px;
    background-color: var(--p-color-bg-surface-info, #fff1e3);
    border-top-color: rgba(0, 0, 0, 0.1);;
    border-right-color: rgba(0, 0, 0, 0.1);;
    transform: rotate(45deg);
}

.ets_hd_message .message_date {
    display: block;
    color: #999;
    font-style: italic;
}

.ets_hd_message .message_date > span {
    display: block;
}

.ets_hd_message.staff .message_date {
    text-align: right;
}

.ets_hd_message.staff + .ets_hd_message.customer,
.ets_hd_message.customer + .ets_hd_message.staff {
    margin-top: var(--p-space-150, 0.375rem);
}

/* Overriding Polaris
--------------------------------------------------------------*/

.Polaris-TextField__Input::-moz-placeholder {
    opacity: 0.5;
}

.Polaris-TextField__Input::placeholder {
    opacity: 0.5;
}

.Polaris-TextField__Input::-webkit-input-placeholder,
.Polaris-TextField__Input::-moz-placeholder,
.Polaris-TextField__Input:-ms-input-placeholder {
    opacity: 0.5;
}

.Polaris-Select__Input {
    padding-left: var(--p-space-300, 0.75rem);
    padding-right: var(--p-space-200, 0.5rem);
    width: calc(100% + var(--p-space-200, 0.75rem));
}

.Polaris-IndexFilters__ButtonWrap .Polaris-Button--tertiary .Polaris-Button__Content:after {
    content: 'Cancel';
}

/* Firefox won't do it correctly */
.Polaris-IndexTable--scrollBarContainerHidden {
    overflow: hidden;
}

.Polaris-Labelled--disabled > .Polaris-Labelled__LabelWrapper {
    color: inherit;
}

.Polaris-TextField--error .Polaris-TextField__Input:hover ~ .Polaris-TextField__Backdrop,
.Polaris-TextField--error .Polaris-TextField__Input:focus-visible ~ .Polaris-TextField__Backdrop,
.Polaris-TextField--error > .Polaris-TextField__Input ~ .Polaris-TextField__Backdrop {
    background-color: var(--p-color-input-bg-surface, rgba(253, 253, 253, 1));
}

/*--------------------------------------------------------------
 * UNUSED
--------------------------------------------------------------*/

.ets-form-reply {
    float: left;
    width: 100%;
    margin-bottom: 10px;
}

.ets-form-reply .left {
    width: 93%;
    float: left;
}

.ets-form-reply .right {
    width: 5%;
    float: left;
    margin-top: 100px;
    margin-left: 10px;
}
.btn-cancel-upload button {
    position: absolute;
    right: 5px;
    top: 4px;
}
#no-record td{
    text-align: center;
}
.Polaris-IndexTable__Table th,.Polaris-IndexTable__Table td {
    padding: 10px!important;
}
.ets_hd_message.staff .ets-hd-message__footer div {
    text-align: right;
    justify-content: flex-end;
}
.box-reply-attachment.ets-download-link-box {
    display: flex;
    justify-content: flex-start!important;
}
.box-reply-attachment.ets-download-link-box {
    display: flex;
    justify-content: flex-start!important;
}
.Polaris-Button__Text span.Polaris-Icon {
    display: inline-flex;
    vertical-align: middle;
    align-items: center;
    justify-content: center;
}
.ets_hd_message.staff .ets-hd-message__footer div.box-attachment,
.ets_hd_message.staff .ets-hd-message__footer div.box-attachment p{
    text-align: left;
}
.Polaris-Frame-Toast--error svg.Polaris-Icon__Svg {
    color: #fff;
}
.header_form_stack {
    border-bottom: 1px solid #ccc;
    padding-bottom: 15px;
    margin-bottom: 15px;
    width: 100%;
}
img.Polaris-Icon__Img {
    width: 14px;
    height: 14px;
}
.btn-add-new-ticket {
    float: right;
}

.box-header-list {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    justify-content: space-between;
}
.Polaris-IndexTable__StickyTableHeader--isSticky {
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}
.box-header-list p {
    font-weight: 700;
    font-size: 20px;
}
.Polaris-IndexFilters__ActionWrap > div button:after,
.Polaris-IndexFilters__ButtonWrap .Polaris-InlineStack div:last-child button:after {
    position: absolute;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 888;
    width: auto;
    bottom: 100%;
    margin-bottom: 9px;
    border: 1px solid #ccc;
    color: #333;
    white-space: nowrap;
    right: auto;
    box-shadow: 0 0 4px 0 #ddd;
    content: "sort";
}

.Polaris-IndexFilters__ActionWrap > div button:before,
.Polaris-IndexFilters__ButtonWrap .Polaris-InlineStack div:last-child button:before {
    content: "";
    width: 9px;
    height: 9px;
    border-left: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    position: absolute;
    background: #fff;
    left: 50%;
    bottom: 100%;
    margin-left: -5px;
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    margin-bottom: 5px;
    z-index: 900;
    border-bottom-left-radius: 3px;
}
.Polaris-IndexFilters__ActionWrap > div button:hover:before,
.Polaris-IndexFilters__ActionWrap > div button:hover:after{
    display: block;
}
td.ets-unread, td.ets-unread * {
    font-weight: 900;
}
.box-attachment {
    display: inline-flex;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 4px;
    overflow: hidden!important;
    padding: 10px 15px 10px 10px;
    font-weight: normal;
}

.box-attachment .Polaris-Thumbnail {
    border-radius: 0!important;
    border: none;
    box-shadow: none!important;
    border-right: 1px solid #ccc;
    margin-right: 10px;
    margin-left: -10px;
    margin-top: -10px;
    margin-bottom: -10px;
    display: inline-flex;
    align-items: center;
    font-weight: normal;
}

.box-attachment .Polaris-Thumbnail:after,.box-attachment .Polaris-Thumbnail:before {
    border: none;
    box-shadow: none;
}

.box-attachment p {
    font-weight: 500;
    color: #333;
    font-size: 13px;
}
.box-message-attachment {
    padding-left: 80px;
}
.box-attachment:hover, .box-attachment:hover span {
    background: #f9f9f9;
}
.box-attachment p.Polaris-Text--bold {
    font-weight: 600;
    margin-bottom: 2px;
}
td.ets-unread, td.ets-unread * {
    font-weight: 900;
}
.Polaris-IndexTable__TableRow.Polaris-IndexTable__TableRow--hovered:not(.Polaris-IndexTable__TableRow--disabled),
.Polaris-IndexTable__TableRow.Polaris-IndexTable__TableRow--hovered:not(.Polaris-IndexTable__TableRow--disabled) td,
.Polaris-IndexTable__TableRow:hover td.ets-unread,
.Polaris-IndexTable__TableRow:hover td{
    background: #eee!important;
}
.box-message-attachment {
    padding-left: 80px;
}

.box-attachment:hover,.box-attachment:hover span {
    background: #f9f9f9;
}

.etshc-upload-box.ets-has-files {
    display: block;
    clear: both;
    margin-top: 5px;
}

.etshc-upload-box.ets-has-files > div {
    display: inline-block;
}

.etshc-upload-box.ets-has-files .Polaris-Box {
    padding: 10px 38px 10px 10px;
    overflow: hidden;
    border-radius: 8px;
}

.etshc-upload-box.ets-has-files span.Polaris-Thumbnail {
    margin-left: -10px;
    margin-top: -10px;
    margin-bottom: -10px;
    border: none;
    border-right: 1px solid #ccc;
    border-radius: 0;
    margin-right: 5px;
    float: left;
    min-width: 50px;
}

.etshc-upload-box.ets-has-files span.Polaris-Thumbnail::before,.etshc-upload-box.ets-has-files span.Polaris-Thumbnail:after {
    opacity: 0;
}

.etshc-upload-box.ets-has-files .btn-cancel-upload button.Polaris-Button {
    border: none;
    box-shadow: none;
    padding: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    min-width: 24px;
    min-height: 24px;
    border-radius: 1px;
}

.etshc-upload-box.ets-has-files .btn-cancel-upload button.Polaris-Button:hover {
    background: #fff;
    box-shadow: 0 0 1px 0 #999;
}

