
span.attachment img {
  vertical-align: middle;
}

div.flash span.icon.icon-email svg.icon-svg {
  margin-inline: 0 4px;
}


div#contacts_previous_issues {
  margin-bottom: 20px;
}

/**********************************************************************/
/* TICKETS DATA SHOW ISSUE
/**********************************************************************/

span.helpdesk-message-date {
  font-size: 0.9em;
  color: #888;
}
/**********************************************************************/
/* TICKETS DATA FORM
/**********************************************************************/


/**********************************************************************/
/* TICKETS EXCERPT LIST
/**********************************************************************/
table.list.issues td.helpdesk_ticket_relation {white-space: normal; text-align: left;}
table.list.issues td.helpdesk_ticket_relation .gravatar {float: left;}
table.list.issues td.helpdesk_ticket_relation .ticket-data {margin-left: 45px;}
table.list.issues td.helpdesk_ticket_relation .ticket-data .ticket-name {margin: 0px;font-weight: bold;}
table.list.issues td.helpdesk_ticket_relation .ticket-status {float: left;}
table.list.issues td.last_message {vertical-align: top}

/**********************************************************************/
/* PUBCLIV TICKETS
/**********************************************************************/
div.ticket-history div.journal {
  overflow: visible;
}

div.ticket-history div.journal.incoming,
div.ticket-history div.journal.outgoing {
  padding: 6px;
  margin-bottom: 6px;
  border: 1px solid #d7d7d7;
  position: relative;
}

div.ticket-history div.journal.incoming {
  background: #ececec;
  margin-right: 30px;
  margin-left: 4px;

}
div.ticket-history div.journal.outgoing {
  background: #f1faff;
  margin-left: 30px;
  margin-right: 4px;
}

div.ticket-history div.journal.incoming:after {
    content: '';
    display: block;
    position: absolute;
    top: 10px;
    left:-7px;
    width: 10px;
    height: 10px;
    background: #ececec;
    border-left:1px solid #d7d7d7;
    border-bottom:1px solid #d7d7d7;
    -moz-transform:rotate(45deg);
    -webkit-transform:rotate(45deg);
}

div.ticket-history div.journal.outgoing:after {
    content: '';
    display: block;
    position: absolute;
    top: 10px;
    right:-7px;
    width: 10px;
    height: 10px;
    background: #f1faff;
    border-right:1px solid #d7d7d7;
    border-bottom:1px solid #d7d7d7;
    -moz-transform:rotate(-45deg);
    -webkit-transform:rotate(-45deg);
}

/**********************************************************************/
/* TICKET DATA
/**********************************************************************/
span.ticket-status {
  padding: 3px 4px;
  font-size: 10px;
  white-space: nowrap;
  margin-right: 4px;
  color: white;
}

div#ticket_data > div.contextual {
  margin-top: initial;
}

form.new_issue .email-template,
.helpdesk-ticket-edit {
  padding: 10px;
  background-color: var(--helpdesk-ticket-edit-bg, #E5F2FF);
}

form.new_issue .email-template .helpdeks-ticket-line,
.helpdesk-ticket-edit .helpdeks-ticket-line {
  margin: -10px -10px 5px;
}

.helpdesk-ticket-edit .select2-container--default .select2-selection--single .select2-selection__rendered {
  font-size: var(--helpdesk-ticket-edit-font-size, 13.3333px);
}

.badge-ticket {
  color: var(--oc-green-9, #2b8a3e);
  border: 1px solid var(--oc-green-9, #2b8a3e);
}

span.ticket-status.status-1 {background-color: #CD5C5C;}
span.ticket-status.status-2 {background-color: deepSkyBlue;}
span.ticket-status.status-3 {background-color: green;}
span.ticket-status.status-4 {background-color: #FF8C00;}
span.ticket-status.status-5 {background-color: #AAA;}
span.ticket-status.status-6 {background-color: #8A2BE2;}

/**********************************************************************/
/* SHOW TICKET
/**********************************************************************/

#ticket-history .ticket-avatar {float: left;}
#ticket-history .ticket-note-content {margin-left: 50px;}
#ticket-history .ticket-note {border-top: 1px solid #d7d7d7; padding-top: 8px;}

/**********************************************************************/
/* SEND RESPONSE
/**********************************************************************/
.notes_with-send {
  background-color: #E5F2FF;
}

.notes_with-send .email-template {
  background-color: initial;
  border: initial;
  min-height: 1em;
}

.notes_with-send .jstTabs.tabs {
  width: auto;
}

.notes_with-send .email-canned-responses {
  float: right;
  margin-right: 14px;
}

.notes_with-send .helpdesk-send-response {
  margin-bottom: 5px;
}

.notes_with-send .helpdesk-ticket-to {
  margin-top: 2px;
}

.notes_with-send .reponse-list-edit {
    margin-top: 0px;
    margin-bottom: 5px;
}

.reponse-list-edit .is-cc {
  float: left;
  min-width: 25px;
  margin-top: 4px;
}

.reponse-list-edit .select2 {
  margin-left: 60px;
  width: 90% !important;
  -moz-border-radius: 0px;
  -webkit-border-radius: 0px;
  -khtml-border-radius: 0px;
  border-radius: 0px;
  background: white;
  padding: 0px;
}
.reponse-list-edit .select2 .select2-selection__choice {
  background-color: #D7E7F9;
  color: #000;
}

.reponse-list-edit ul.tagit li.tagit-choice .tagit-close .text-icon:hover {
  color: black;
}

.reponse-list-edit ul.tagit li.tagit-new input {
  font-size: 11px;
  background: white;
  margin-bottom: 2px;
  margin-left: 2px;
  width: 200px;
}

.reponse-list-edit ul.tagit li.tagit-new {
  padding: 0px;
}

.select2-contact__avatar { float: left; }
.select2-contact__name { margin-bottom: 2px; margin-left: 43px; }
.select2-contact__email { margin-bottom: 2px; margin-left: 43px; color: #AAA; min-height: 14px; }

/**********************************************************************/
/* ISSUES LIST
/**********************************************************************/

tr.issue td.contact, tr.issue td.contact_company {
  white-space: normal;
  text-align: left;
}

table.list.issue td.last_message img.gravatar{
  vertical-align: middle;
  margin: 0 4px 2px 0;
}

div.email-template {
  background-color: #FFD;
  border: 1px solid #E4E4E4;
  padding-left: 10px;
  padding-right: 10px;
  margin-bottom: 5px;
}

tr.issue td.last_message {
  text-align: left;
  white-space: normal;
  padding: 5px;
}

tr.issue td.last_message_date {
  text-align: left;
  white-space: normal;
}

tr.issue.context-menu-selection td.last_message span.description {
  color: inherit;
}

/**********************************************************************/
/* ICONS
/**********************************************************************/

#admin-menu a.helpdesk:not(:has(svg)) { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/support-b210d543.png")}
.icon-public-link:not(:has(svg)) { background-image: url("/assets/external-093f681f.png");padding-left: 14px;}
.icon-email-spam:not(:has(svg)) { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/email_error-0ad2bdcc.png"); }
.icon-email-to:not(:has(svg)) { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/email_go-04629aae.png"); }
.icon-email-from:not(:has(svg)) { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/email_from-9e4e837a.png"); }
.icon-helpdesk:not(:has(svg)) { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/user_comment-424dae17.png"); }
.icon-split:not(:has(svg)) { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/arrow_divide-53e510da.png"); }
.icon-web:not(:has(svg)) { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/world-d90be913.png"); }
.icon-support:not(:has(svg)) { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/support-b210d543.png"); }
.icon-helpdesk-reply:not(:has(svg)) { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/reply-91ae6e36.png"); }
.icon-helpdesk-contact-add { margin-left: 8px; }

/**********************************************************************/
/* VOTE
/**********************************************************************/

.vote_form {
  text-align: center;
}

.submit, #vote_comment {
  margin-top: 5px;
  width: 40%;
  margin-left: auto;
  margin-right: auto;
  padding: 10px;
}

.vote-value .icon {
   margin-left: 5px;
}

.vote-value .icon:not(:has(svg)) {
   padding-left: 20px;
}

.icon-awesome:not(:has(svg)) { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/awesome-202e762f.png"); }
.icon-justok:not(:has(svg)) { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/just_ok-313cfcee.png"); }
.icon-notgood:not(:has(svg)) { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/not_good-0814adb4.png"); }

.error-text { color: red; }

/**********************************************************************/
/* REPORTS
/**********************************************************************/

h2 #report { margin-left: 10px; }
#helpdesk-report-data img { vertical-align: middle; }

.helpdesk-report-tiles { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.helpdesk-report-tile { flex: 1 1 170px; border: 1px solid #dbdde1; border-radius: 3px; padding: 8px 12px; }
.helpdesk-report-tile span { display: block; color: #868e96; font-size: 0.9em; }
.helpdesk-report-tile strong { font-size: 1.6em; color: #444; }
.helpdesk-report-tile small { display: block; color: #868e96; font-size: 0.8em; }
.helpdesk-report-tile em { font-style: normal; font-size: 0.9em; margin-left: 6px; color: #868e96; }
.helpdesk-report-tile em.good { color: #2b8a3e; }
.helpdesk-report-tile em.bad { color: #e03131; }

.helpdesk-report-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 24px; margin-top: 16px; }
.helpdesk-report-chart h4 { margin: 0 0 6px; }
.helpdesk-report-chart div { position: relative; }

@media screen and (max-width: 899px) {
  .helpdesk-report-charts { grid-template-columns: 1fr; }
}

#contact_previous_issues ul {margin: 0;  padding: 0;}
#contact_previous_issues ul li {position: relative; margin-bottom: 10px}
#contact_previous_issues ul li .ticket-meta {color: #888; font-size: 0.9em;display: block}

#contact_profile_and_issues .ajax-loading {
  background-color: #eee;
  background-position: 33% 50%;
  background-repeat: no-repeat;
  background-image: url("/assets/loading-5fb375e6.gif");
  border: 1px solid #bbb;
  font-weight: bold;
  text-align: center;
  padding:0.6em;
  margin-right: 10px;
  opacity: 0.5;
}

.mail_rule_block {
  margin-bottom: 10px;
}

.mail_rule_block #filters-table,
.mail_rule_block #actions-table {
  display: flex;
  flex-direction: column;
  width: 65%;
}

#filters-table .filter,
#actions-table .filter {
  margin: 5px 0 0 0;
  display: flex;
  flex-wrap: wrap;
}

#filters-table .field,
#actions-table .field {
  width: 230px;
}

.tabular.settings p.helpdesk_mail_rule_condition {
  padding-left: 20px;
  text-align: left;
}

table.list .conditions { width: 50% }
table.list .actions { width: 50% }

.helpdesk-message-date.viewed:after {
  content: "\25CF ";
  color: rgb(30, 197, 77);
  padding-left: 2px;
  font-size: 20px;
  position: absolute;
  line-height: 15px;
}

.helpdeks-ticket-line {
  background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 10px, rgba(0, 0, 0, 0.05) 10px, rgba(0, 0, 0, 0.05) 20px);
  height: 12px;
  min-height: 12px;
  margin: -15px -10px 5px;
  position: relative;
}

#edit_canned_response #existing-attachments label {
  float: none;
  margin-left: auto;
}

.jstb_responses { background-image: url("/assets/plugin_assets/redmine_contacts_helpdesk/message-plus-e01560d8.svg"); }
.canned-responses__menu { position: absolute; }

#tab-content-history .note-header span { margin-left: 4px; }
#tab-content-history .note-header span.separator { margin: 0px 4px 0px 0px; }
#tab-content-history .note-header .lined-text { white-space: nowrap;display: inline-block; margin-left: initial; }
#tab-content-history .note-header .lined-text img.gravatar { margin: initial; }
#tab-content-history .journal_message {margin: inherit;}

p.helpdesk_mail_rule_condition.red { color: red }

.bulk_reply {
  padding: initial;
  padding-bottom: 6px;
}

.reply-list-edit span:first-child {
  width: auto;
}

/**********************************************************************/
/* MERGE TICKET
/**********************************************************************/

div.helpdesk-ticket-container {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
}

/* Source ticket */

div.helpdesk-ticket-container div.source-ticket-container {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding-bottom: 15px;
}

div.source-ticket-container div.source-ticket-head {
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

div.source-ticket-head p {
  margin: 0 auto;
}

/* Target ticket */

div.target-ticket-container {
  min-width: 40%;
}

div.target-ticket-container .search-container-input {
  width: 90%;
}

div.target-ticket-container div.target-tickets-list {
  margin-top: 15px;
}

div.target-ticket-container div.target-tickets-list ul {
  padding: 0;
}

div.target-ticket-container div.target-tickets-list li {
  list-style-type: none;
}

span.target-ticket-subject {
  font-weight: bold;
}

/**********************************************************************/
/* EMAIL PREVIEW
/**********************************************************************/

.helpdesk-email-headers {
  border-top: 1px solid #dedede;
  margin-bottom: 10px;
  padding-top: 8px;
}

.helpdesk-email-headers .attribute {
  padding-inline-start: 100px;
  clear: inline-start;
  min-block-size: 1.6em;
  font-size: 12px;
}

.helpdesk-email-headers .attribute .label {
  inline-size: 90px;
  margin-inline-start: -100px;
  font-weight: bold;
  float: inline-start;
  color: #7f7f7f;
}

.helpdesk-email-headers .attribute .value {
  overflow: auto;
}

helpdesk-email-frame {
  display: block;
  border-top: 1px solid #dedede;
  margin-top: 10px;
  padding-top: 10px;
}

helpdesk-email-frame[hidden] {
  display: none;
}

.helpdesk-quote.collapsed > blockquote {
  display: none;
}

.helpdesk-quote.collapsed .helpdesk-quote-expanded-icon,
.helpdesk-quote:not(.collapsed) .helpdesk-quote-collapsed-icon {
  display: none;
}

a.helpdesk-quote-toggle {
  color: var(--oc-gray-6, #868e96);
  font-style: italic;
  text-decoration: none;
}
