/**
  Contacts : 
  Written by (c) Petko Yotov 2018-2019
  
  This text is written for PmWiki; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version. See pmwiki.php for full details
  and lack of warranty.

*/

.pmcontactdiv {
/*   border: 2px solid .ccc; */
/*   max-height: 100vh; */
/*   position: relative; */
  margin-bottom: 1em;
}

.pmcontactcard {
  display:none;
  column-width: 12em;
/*   border: 2px solid #080; */
}




.pmcontactcard-inline > * {
  display: inline-block;
  padding: 1mm 2mm;
}

.pmcontactcard-inline .pmcontact-note {
  display: block;
/*   padding: 1mm 2mm; */
}
.pmcontactcard-inline drt-tel.primary {
  font-weight: bold;
}


.pmcontact-fax {
  color: #888;
}

.pmcontact-mail {
  color: #04f;
}


.pmcontactselect {
  max-width: 20em;
  text-overflow:ellipsis;
}

.pmcontact-search {
  width: 12em;
}

.pmcontact-clearsearch {
/*   width: 8%; */
/*   float: right; */
  cursor: pointer;
  color:red;
}
.pmcontact-searchdiv {
  border: 1px inset #555;
  margin: 4px 2px;
  border-radius: 4px;
  display: inline-block;
  width:20em;
}


.pmcontactcard .pmcontact-category {
  display: block;
  color: #888;
/*   text-align: center; */
}




.pmcontactcard div.tel a, .pmcontactcard div.mail a, .pmcontactcard div.url a, 
.pmcontactcard div.bleep, .pmcontactcard div.fax {
  display: block;
  text-align: center;
}

.wikieditcontact .frame.new {
  border: 1px solid #fc0;
  background-color: var(--highlight);
} 

.wikieditcontact .frame.deleted {
  border: 1px solid black;
  background-color: var(--aaa);
  opacity: .2;
}



.wikieditcontact select.status {
/*   width: 8em; */
  text-overflow: ellipsis;
}

.wikieditcontact p.contactitem strong:first-child,
.wikieditcontact select.status + strong, .wikieditcontact strong.fixedwidth {
  display: inline-block;
  width: 3.2em;
  margin: 0 .5em;
  text-align: right;
}

.wikieditcontact input[type="tel"] {
  width: 12em;
}


.wikieditcontact input[type="tel"], .wikieditcontact input[type="email"], .wikieditcontact input[type="url"] {
  border-width: 0px;
  border-bottom: 1px solid #888;
  background-color: transparent;
}

.wikieditcontact input[type="email"], .wikieditcontact input[type="url"] {
  width: 24em;
  color: var(--link-color);
  border-color:  var(--link-color);
}
.wikieditcontact input[data-type="tel"] {
  color: green;
  border-color: green;
}
.wikieditcontact input[data-type="bleep"] {
  color: var(--orangered);
  border-color: var(--orangered);
}
.wikieditcontact textarea[data-type="note"] {
  vertical-align: top;
  width: 24em;
  font-family: inherit;
}

.wikieditcontact input, .wikieditcontact select, .wikieditcontact textarea {
  max-width: 99%;
}

.wikieditcontact input[name="name"] {
  max-width: 99%;
  font-size: 1.25em;
  
}

.wikieditcontact p.contactitem strong.new {
  width: 8em;
  color: #800;
  margin: 0 .5em;
}

.wikieditcontact p.contactitem .handle {
  display: inline-block;
  width: 1em;
  text-align: center;
  cursor: grab;
}
.wikieditcontact input#deletecontact {
  float: right;
  color: red;
  font-weight: bold;
/*   border-color: red; */
  
}

.wikieditcontact div.difffrom {
  margin-top: 2em;
  
}


drt-tel.pending, span.pending, a.pending, drt-bleep.pending,
drt-tel.flagged, span.flagged, a.flagged, drt-bleep.flagged {
  background-color: #fd7;
}



.wikieditcategory table.ecattable td {
  padding: .3em;
  
}
.wikieditcategory  input, .wikieditcategory  select, 
.wikieditcontact input, .wikieditcontact select, .wikieditcontact textarea {
/*   border: 1px inset ; */
/*   border-color: var(--ccc) #888 #888 var(--ccc); */
/*   background-color: white; */
/*   padding: 2px 4px; */
/*   border-radius: 3px; */
/*   height: 1.2em; */
}

.wikieditcategory input[type=text], .wikieditcontact input[type=text], .wikieditcontact textarea {
/*   padding: 0 2px; */
/*   border: 1px inset #888; */
}

.pmcontactdiv h2, .pmcontactdiv h3 {
    color: var(--heading-color);
    background-color: var(--eee);
    padding: 1px 4px;
}
.pmcontactdiv * {
    box-sizing: border-box;
}


div.pmcontact-content-collapsible {
  position: relative;
  overflow: hidden;
  padding: 0;
  z-index:1;
}
div.pmcontact-content-collapsible div.nosearch {display: none;}



.pmcontact-addnew {
    border: 2px solid #0af;
    cursor: pointer;
    background-color: white;
    border-radius: 3px;
    padding: .2em .4em;
}

#cntcontacts {
  padding: 0 .2em;
}

#previewtable {
  border-collapse: collapse;
}
#previewtable th { text-align: left;  }
#previewtable td, #previewtable th {
  border: 1px solid #888;
}

#previewtable tbody td { color: #aaa;  }
#previewtable tbody td:hover { color: #800;  }
#previewtable .bleep { color: #f60; font-weight: bold;  }
#previewtable .telext, #previewtable .prefix { color: teal;  font-weight: bold; }
#previewtable .email { color: blue; font-weight: bold;  }
#previewtable .url { color: indigo; font-weight: bold; }
#previewtable .note, #previewtable .category, #previewtable .name, #previewtable .fax { color: black;  font-weight: bold; }


#previewtable tr.ignore td:hover { color: #800 !important; text-decoration: none !important; }
#previewtable tr.ignore td { color: #aaa !important; text-decoration: line-through !important; font-weight: normal !important; }

.pmcontactdiv a[data-text]:before {
  content: attr(data-text);
}

.pmcontactdiv .normalsmall  {
  font-weight: normal; font-size: 90%;
}


.pmcontactdiv drt-tel:not(.primary) {
  font-weight: normal;
}



@media screen and (min-width: 600px) {
  .pmcontactdiv ul.synclist {
    display: grid;
    grid-template-columns: auto auto;
    grid-gap: 0 1em;
  }

  .pmcontactdiv li.longcontact,
  .pmcontactdiv li[data-role="controls"],
  .pmcontactdiv li[data-role="list-divider"] {
    grid-column-start: span 2;
  }
}

.wikieditcontact .orderable p.vspace:first-child {
  margin-top: .2em;
}
.wikieditcontact .orderable.multiple {
  border: 2px dashed var(--orangered);
  padding: .4em;
}

.wikieditcontact .orderable.multiple:before {
  color: var(--orangered);
  display: block;
  content: "Drag the entries to reorder them. The primary number at the top will appear in bold.";
}

.pmcontactdiv h2 .h2addnew {
  font-weight: normal;
  font-size: 0.9rem;
}

.wikieditcategory option[value="-1"] {
  color: green;
}

.wikieditcategory option[value^="delete-"] {
  color: red;
}

.uhpcontactform input[type=button] { margin-left: .3em; }

var.notes {
  color: var(--ppp);
}

.longnote {
  color: var(--orangered);
}
.longnote:not(.open) {
  display: inline-block;
  width: 10em;
  height: 1.4em;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor:pointer;
}
.longnote.h2addnew {
  display: inline;
  cursor:pointer;
}
.longnote .toggle {
  cursor:pointer;
  display: inline-block;
  background-color: var(--orangered);
  color: var(--bgcolor);
  font-weight: bold;
  width: 1.1em;
  height: 1.1em;
  line-height: 1.1em;
  text-align: center;
  
}

.longnote .toggle:before {
  content: ">";
}


.longnote.open .toggle {
  transform: rotate(90deg);
  
}
