/* CLEAR AND NORMALIZE */
html, body, div, fieldset, input, label, span, img, h1, h2, h3 {
  margin: 0;
  padding: 0;
}
h1 { font-size: 16pt; }
h2 { font-size: 12pt; }
h3 { font-size: 11pt; }
body {
  font-size: 10pt;
  font-family: sans-serif;
}
ul {
  list-style: none;
  padding: 0; 
}
*[hidden] {
  display: none;
}
.prescription-form.disabled {
  display: none;    
}
#receita-simples,
#receita-especial {
  margin-bottom: 2em;
}

/* Colors */
body {
  background: #f2f2f2;
}
.main-column {
  background: white;
  padding: 5px;
  width: 70%;
  margin: 2px;
  float: left;
}
.right-column {
  background: #e0e0e0;
  width: 25%;
  float: right;
  padding: 3px;
}
#resetDrugs {
  margin-left: 2em;
}
div.specialPrescriptionToggle {
  margin-top: 10px;
}

/* dynamic bottoms */
#dynamic-bottom {
    font-size: smaller;
    font-weight: lighter;
    color: #555;
}
#dynamic-bottom.empty {
  padding: 0;
}

/* Receita Items */
.receitaItem {
  position: relative;
}
.receitaItem > * {
  margin: 0.5em 1em;
}
.receitaItem:not(:first-child) {
  padding-top:5px;
}
.receitaItem .drug-info {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  position: relative;
}

.drug-buttons {
  position: absolute;
  top:-20px;
  right: 0;
  display: none;
}

.prescribed-image .drug-buttons {
  top: 10px;
}
.externalLink .drug-buttons{
  top: 5px;
}
.button {
  cursor: pointer;
}

.receitaItem:hover .drug-buttons{
  display: flex;
  gap:5px;
}

.receitaItem:not(:first-of-type):not(.prescribed-image):before {
  content : "";
  position: absolute;
  left    : 2.5%;
  top     : 0;
  height  : 1px;
  width   : 95%;
  border-bottom: 1px solid #BBB
}
.receitaItem .printable-drug-text {
  display: none;
}
.receitaItem .printable-drug-text::first-line {
  font-family: monospace;
  font-weight: bold;
  font-size: larger;
}
.receitaItem .drug-text-wrapper {
  flex: 2;
} 
.receitaItem img.img-for-patient {
  display: block;
  max-width: 80%;
}
.receitaItem div.qr-code {
  display: flex;  
  align-items: center;
}
.prescribed-image img {
  max-width: 80%;
}

/* Instructions for doctors */
.instructions-for-doctors {
  padding: 5px;
  margin: 5px;
  border-radius: 5px;
  background-color: #FAA;
  position:relative
}
.instructions-for-doctors img {
  height: 150px;
  width: auto;  
  margin-right: 5px;
}

.instructions-for-doctors button {
    position:absolute;
    top:4px;
    right:4px
}

/* General organization */
div.collapsed {
  display: none;
}

.attribution, .attribution a {
  color: #666;
  font-size: small;
}
.clone{
  display: none;
}

@media print {

  @page{
    margin: 5mm;
  }

  *{
   box-sizing: border-box;
  }

  body:has(.clone) {
    zoom: 0.70;
  }
  
  .content:has(.clone){
    display: flex;
    gap: 15mm;
  }

  .clone{
    display: block;
  }

  .main-column {
    width: 100%;
    height: 285mm;
    margin: 0;
    padding: 0;
    page-break-after: always;
    page-break-before: always;
    page-break-inside: avoid;
  }

  .content:has(.clone) .main-column {
    width: 202.5mm;
  }
  
  #drogas-form,
  .attribution,
  button,
  textarea,
  .icon-options,
  .right-column,
  .group-by-route img.unchecked,
  .nav,
  .instructions-for-doctors {
    display: none;
  }
  input {
    border: none;
  }
  .receitaItem .printable-drug-text {
    display: block;
  }
}
