/* CSS para formularios */

fieldset {
  border: none;
  border-radius: 3px;
  clear: both;
}
.action-bar.search-and-filters form fieldset {
  border: 0 none;
}
form > div {
  display: inline-block;
  width: 100%;
}
form li {
  list-style-type: none;
  margin: 0 0 0 145px;
}
form td > ul > li {
  list-style-type: square;
  margin: 0 0 5px;
}
form .integer-widget {
  width: auto;
}
input {
  outline: 0 none;
}
input[type="email"],
input[type="file"],
input[type="number"],
input[type="password"],
input[type="text"],
input[type="url"] {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 100%;
  height: 34px;
  padding: 0 5px;
  color: #222;
}
/*input[type="email"],*/
/*input[type="text"],*/
/*input[type="url"] {*/
/*max-width: 40%;*/
/*width: 40%;*/
/*}*/
input[type="file"] {
  width: 300px;
}
input.md[type="text"],
form fieldset .form-row input[type="number"].integer-widget,
form fieldset .form-row input[type="text"].hasDatepicker,
form fieldset .form-row input[type="text"].short-time-widget,
form fieldset .form-row input[type="text"].br-dinheiro-widget {
  max-width: 110px;
}
form fieldset .form-row input[type="text"].br-cpf-widget,
form fieldset .form-row input[type="text"].br-cnpj-widget {
  max-width: 160px;
}
input[type="text"].int,
input[type="password"].pq,
input[type="text"].pq {
  width: 80px;
}
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
select:focus,
textarea:focus {
  border: 1px solid #347b3e;
  border-radius: 3px;
}
input[type="text"].disabled:focus {
  border: 1px solid #dddddd;
}
label,
form label.labelForm {
  color: #222;
  float: left;
  font-size: 100%;
  margin: 5px 0;
  padding: 0 !important;
}
body.readonly label + p {
  padding: 7px 0 0;
}
label,
form p.labelForm {
  line-height: 15px;
  text-align: right;
  width: 150px;
}
form p.labelForm {
  margin: 5px 0 5px 5px !important;
}
label span {
  font-size: 90%;
  font-weight: normal;
}
legend {
  color: #666;
  font-size: 110%;
  font-weight: bold;
  margin: 15px;
  padding: 0 5px;
}
select {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #222;
  height: 34px;
  padding: 3px 0;
}
select[multiple="multiple"] {
  height: auto;
}
select option {
  padding: 3px 5px;
}
select + option.filled {
  background: #d5f6da !important;
}
select[multiple="multiple"] option {
  padding: 5px;
}
textarea {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #222;
  font-family: "Lato", "Arial", sans-serif;
  font-size: 100%;
  height: 190px;
  padding: 5px;
  width: 60%;
}
textarea.pq {
  height: 40px;
}
#changelist {
  clear: both;
}
#li_usuarios_add {
  clear: both;
  display: inline-block;
  margin: 0 0 0 145px;
}
#ui-datepicker-div {
  font-family: "Lato", "Arial", sans-serif !important;
  font-size: 100%;
  z-index: 4 !important;
}
.form-options label {
  margin: 0;
}
form.errors {
  box-shadow: 1px 1px 5px #999999;
}
form fieldset > h2 {
  border: 1px solid #eeeeee;
  border-top-right-radius: 3px;
  border-top-left-radius: 3px;
  background: #eeeeee;
  color: #555555;
  float: none;
  font-size: 120%;
  margin: 0;
  padding: 10px;
}
form fieldset.campos input[type="checkbox"],
form fieldset.campos label {
  margin: 0 0 10px;
}
form fieldset.module {
  margin: 0 0 10px;
}
form fieldset .form-row {
  background: #f9f9f9;
  border-bottom: 1px solid #eeeeee;
  border-left: 1px solid #eeeeee;
  border-right: 1px solid #eeeeee;
  border-top: 0 none;
  font-size: 100%;
  overflow: hidden;
  padding: 5px 0;
  width: 100%;
}
form fieldset .form-row:first-of-type {
  border-top-right-radius: 3px;
  border-top-left-radius: 3px;
}
form fieldset .form-row:first-of-type {
  border-top: 1px solid #eeeeee;
}
form fieldset h2 + .form-row:first-of-type,
form fieldset .inline-related .form-row:first-of-type {
  border-top: 0 none;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
}
form fieldset .form-row:last-of-type {
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 3px;
}
.formQuiz form fieldset .form-row {
  padding: 15px 0;
}
.action-bar.search-and-filters form fieldset .form-row {
  background: transparent;
  border: 0 none;
  float: left;
  width: auto;
}
form fieldset .form-row.data {
  text-align: left;
}
form fieldset .form-row.several-items input {
  float: left;
  max-width: 25%;
}
form fieldset .form-row input[type="checkbox"] {
  margin: 5px 5px 0 0;
}
form fieldset .form-row label {
  font-size: 100%;
  margin: 7px 10px 0 5px;
  text-align: right;
  width: 150px;
}
.form-large-labels form fieldset .form-row label {
  width: 50%;
}
/*form fieldset .form-row label + input[type="email"],*/
/*form fieldset .form-row label + input[type="text"],*/
/*form fieldset .form-row label + input[type="url"] {*/
/*width: 80%;*/
/*}*/
fieldset .fieldBox label + input[type="email"],
fieldset .fieldBox label + input[type="text"],
fieldset .fieldBox label + input[type="url"] {
  max-width: calc(100% - 165px);
}
form fieldset .form-row label + span {
  line-height: 25px;
}
form fieldset .form-row li label {
  font-weight: normal !important;
  width: auto;
}
form fieldset .form-row .help {
  color: #666;
  font-size: 95%;
  line-height: 1.2em;
  margin: 5px 0 0 165px;
  clear: both;
}
form fieldset .form-row .related-widget-wrapper .help {
  margin: 5px 0 0 !important;
}
.action-bar.search-and-filters form fieldset .form-row .help {
  margin: 0 !important;
  width: 158px;
}
form fieldset .form-row .related-widget-wrapper .ac_input {
  max-width: none;
}
form .aligned p.help_marginless {
  color: #666;
  padding: 0;
}
form .submit-row {
  background: none transparent;
  border: 0 none;
  margin: 10px 0 0;
  padding: 0;
  text-align: left;
}
form .submit-row.floated {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px 0 0 2px;
  bottom: 124px;
  padding: 10px 40px 10px 10px;
  position: fixed;
  right: 0;
  width: auto;
}
form .submit-row.floated input:last-child {
  margin: 0;
}
.action-bar form .submit-row {
  margin: 0;
}
.action-bar form .submit-row input[type="submit"] {
  font-size: 100%;
  margin: 0;
}
td .action-bar form .submit-row input[type="submit"] {
  font-size: 95%;
}
.action-bar.search-and-filters form .submit-row {
  margin: 15px 0;
}
form .submit-row input {
  float: left;
  margin: 0 5px 0 0;
}
fieldset .coluna {
  float: left;
  margin: 20px;
}
fieldset .coluna label {
  float: none;
}
fieldset .fieldBox {
  float: left;
  margin: 0 3% 0 0;
  min-width: 30.33%;
}
/* Em telas entre 940px e 1065px, manter campos lado a lado quando há múltiplos fieldBox */
@media screen and (min-width: 941px) and (max-width: 1065px) {
  form fieldset .form-row .fieldBox:first-child:not(:only-child),
  form fieldset .form-row .fieldBox + .fieldBox {
    float: left !important;
    width: 48% !important;
    min-width: 0 !important;
    max-width: 48% !important;
    margin-right: 2% !important;
  }
  form fieldset .form-row .fieldBox:last-child:not(:only-child) {
    margin-right: 0 !important;
  }
}
/* Em telas maiores que 1330px, reduzir espaçamento entre campos múltiplos */
@media screen and (min-width: 1331px) {
  form fieldset .form-row .fieldBox:first-child:not(:only-child),
  form fieldset .form-row .fieldBox + .fieldBox {
    min-width: 0 !important;
    margin-right: 1% !important;
  }
  form fieldset .form-row .fieldBox:last-child:not(:only-child) {
    margin-right: 0 !important;
  }
}
td label {
  float: none;
  width: auto;
}
#add_id_user_permissions,
#add_id_groups {
  float: left;
  margin: 5px 0 0;
}
.add_programa_form label {
  font-weight: bold;
  margin: 0 0 2px;
  text-align: left !important;
}
.add_programa_form .form-row {
  margin: 4px 0;
}
#changelist-search {
  float: left;
}
#changelist-search input[type="submit"] {
  background: #eee;
  border: 1px solid #ddd;
  border-radius: 0;
  float: left;
  font-size: 100%;
  height: 32px;
  margin: 0 0 0 2px;
  padding: 0 10px;
}
#changelist-search input[type="submit"]:hover {
  background: #fff;
}
#changelist-search input[type="text"] {
  float: left;
  max-width: 100%;
  width: auto;
}
.ac_input {
  /*max-width: 60%;*/
}
.ac_input[readonly] {
  color: #999;
}
.aligned .vCheckboxLabel {
  float: left !important;
}
input.autocomplete {
  background: #effbe7;
  max-width: 60%;
}
.search-and-filters input.autocomplete {
  max-width: 200px;
  width: 200px;
}
.calendarbox,
.clockbox {
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
}
.change-list .filtered {
  background: transparent !important;
}
.checkboxes {
  margin: 0 0 0 142px;
  overflow: hidden;
}
.checkboxes label {
  text-align: left !important;
}
.checkboxes li {
  float: left;
  margin: 0 5% 0 0;
  width: 300px;
}
.checkboxes6 li {
  margin: 0 30px 10px 0;
}
.checkbutton {
  clear: both;
  float: left;
  margin: 15px 0 0 160px;
}
.form-row .clearable-file-input label[for$="clear_id"] {
  float: none;
  margin: 0;
}
.form-row .clearable-file-input input[id$="clear_id"] {
  margin-left: 10px;
}

.django-ckeditor-widget {
  width: calc(100% - 170px);
}
.django-ckeditor-widget > div {
  width: 100% !important;
}
input.filled,
input.ac_filled_hidden {
  background: #d5f6da !important;
}
.django-ckeditor-widget {
  width: calc(100% - 170px);
}
.django-ckeditor-widget > div {
  width: 100% !important;
}
.empty-form {
  display: none;
}
.filled {
  background: #eeeeee !important;
}
.filter select {
  width: 158px;
}
.filter.filter-select-big label,
.filter.filter-select-big select,
select.filter-select-big {
  width: 240px;
}
.form-options {
  margin: -20px 0 0 150px;
}
.form-options li {
  display: inline-block;
  margin: 0 0 5px;
  width: 100%;
}
.form-options li label {
  margin: 0 !important;
  width: auto !important;
}
.form-options li input[type="checkbox"] {
  margin: 0 !important;
}
.form-row-photo {
  float: right;
  padding: 15px;
  width: 30%;
}
.form-row-photo canvas {
  width: 100%;
}
.form-row-photo video {
  display: none;
}
.form-row-photo ~ .form-row {
  float: left;
  width: 70%;
}
.formQuiz label {
  margin: 5px 10px 0 !important;
  text-align: left !important;
  width: 100% !important;
}
.formQuiz label input[type="radio"] {
  margin: 0 5px 0 0;
}
.formQuiz label + ul li {
  display: inline-block;
  margin: 5px 0;
}
.formQuiz li label {
  margin: 5px 10px 0 0 !important;
}
.formQuiz .form-row p.help {
  margin: 5px 0 0 10px !important;
}
.formQuiz textarea {
  height: 200px;
  margin: 10px;
  width: 98%;
  width: calc(100% - 20px);
}
.formQuiz input[type="number"] {
  margin: 10px;
}
.hiddenfields {
  display: none;
}
.inline-deletelink {
  float: right;
  font-weight: normal;
}
.inline-group h2 {
  margin: 10px 0;
  padding: 0;
  background: none;
  border: none;
  color: #000;
}
.inline-related {
  clear: both;
}
.inline-related h3 {
  background: #eeeeee;
  border-top-right-radius: 3px;
  border-top-left-radius: 3px;
  font-size: 100%;
  font-weight: normal;
  margin: 0;
  padding: 10px 15px;
}
.inline-related table {
  margin: 0.5%;
  width: 99%;
}
.inline-related .datetime {
  clear: both;
  padding: 0 0 0 160px;
}
.inline-related .delete {
  float: right;
}
.inline-related .delete label.inline {
  margin: 0 5px 0 0;
}
.invalid {
  background: rgba(231, 76, 60, 0.4) !important;
  border: 1px solid #cc0000 !important;
}
.multiFileUploaderContainer {
  margin: 0 0 0 160px;
}
.multiFileUploaderContainer li {
  background: url("/static/comum/img/close_modal_box.5ae802624c2e.png") no-repeat 98% 5px
    #eeeeee;
  cursor: pointer;
  float: left;
  margin: 10px 10px 0 0;
  min-height: 50px;
  min-width: 250px;
  padding: 10px 25px 10px 15px;
}
.multiFileUploaderContainer li:hover {
  background-color: #ffffff;
}
.multiFileUploaderContainer li.error {
  background-color: rgba(231, 76, 60, 0.4);
}
.multiFileUploaderContainer ul {
  padding: 0;
}
.multiFileUploaderContainer .progress {
  height: 20px;
  margin: 0 0 5px;
}
.multiFileUploaderContainer .progress p {
  font-size: 95%;
  height: 20px;
  line-height: 20px !important;
}
.required label,
label.required {
  cursor: help;
  font-weight: bold !important;
}
label.required:after,
.required label:after {
  color: #cc0000;
  content: " *";
}
.selector {
  display: inline-block;
  margin: 3px 20px 0 165px;
  width: 60%;
  width: calc(100% - 185px);
}
.selector h2 {
  color: #666;
  font-size: 110%;
  margin: 10px 0 0;
  text-transform: capitalize;
}
.selector h2 img.help {
  margin: 0 !important;
}
.selector select {
  font-size: 110%;
  height: 160px;
  width: 100%;
  overflow: auto;
  white-space: nowrap;
}
.selector-available {
  background: #eee;
  float: left;
  padding: 20px;
  width: 45%;
}
.selector-chosen .selector-filter img {
  height: 14px;
}
.selector-chooser {
  float: left;
  margin: 120px 0 0;
  padding: 0;
  width: 10%;
}
.selector-chooser a {
  margin: 2px 0;
  padding: 2px 0;
  text-align: center;
  width: 100%;
}
.selector-chooser li {
  margin: 0 10px;
}
.selector-chosen {
  background: #eee;
  float: right;
  padding: 20px;
  width: 45%;
}
.selector-filter {
  clear: none;
}
form fieldset .form-row .selector .selector-filter input {
  width: 100%;
  max-width: unset;
}
.selector-filter label {
  width: auto !important;
}
.selector-chooseall,
.selector-clearall {
  display: block;
  margin: 5px 0 0;
}
.several-items .btn {
  margin: 0 0 0 5px;
}
.submit-row p.deletelink-box {
  float: right !important;
  padding: 4px 0 0;
}
.tree-container {
  margin: 0 20px 0 160px !important;
}
.tree-container > ul {
  background: #ffffff;
  border-radius: 3px;
}
.form-row.width400 p.labelForm {
  float: left;
  width: 400px !important;
}
.form-row.width400 textarea {
  float: left;
  height: 80px;
  margin: 10px 5px 0 10px;
  width: 500px;
}
.form-row.width400 ul.checkboxes {
  float: left;
  margin: 7px 0 0 5px;
}
.related-widget-wrapper {
  display: inline;
}
.ui-datepicker-calendar thead th {
  padding: 1px 3px;
}
.ui-datepicker-calendar thead th span {
  background: none;
  border-radius: 0px;
  box-shadow: 0px 0px 0px transparent;
  float: none;
  margin: 0;
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
  background: #d5f6da !important;
  border: 1px solid #aaaaaa !important;
}
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
  background: #eeeeee;
  border: 1px solid #dddddd;
}
.ui-widget-header {
  background: #ccc;
  border-radius: 0px !important;
}
ul.ajaxmultiselect_field {
  padding: 0 0 5px 165px;
}
.related-widget-wrapper ul.ajaxmultiselect_field {
  padding: 0 0 5px;
}
ul.ajaxmultiselect_field a {
  width: auto;
}
ul.ajaxmultiselect_field li {
  background: rgba(46, 204, 113, 0.2);
  color: #3c763d;
  display: inline-block;
  float: left;
  list-style: none;
  margin: 0 4px 4px 0;
  padding: 4px 6px;
  width: auto;
}
.timeline-content ul.ajaxmultiselect_field li {
  width: 100%;
}
ul.ajaxmultiselect_field li:last-child {
  background: #eee;
  border: 1px solid #ddd;
  border-radius: 3px;
  clear: left;
  width: 400px;
}
ul.ajaxmultiselect_field li:only-child {
  clear: none !important;
}
ul.ajaxmultiselect_field li#li_alunos_add {
  display: table;
}
ul.ajaxmultiselect_field + .help {
  display: inline-block;
  width: 100%;
}
img.ajaxmultiselect_add,
img.ajaxmultiselect_remove {
  cursor: pointer;
}
body.readonly p.help,
body.readonly .ajaxmultiselect_remove,
body.readonly .ajaxmultiselect_field li:last-child {
  display: none !important;
}
input.ajaxmultiselect_add {
  width: 100% !important;
}

/* Overwrites All */
input[disabled="disabled"],
input[readonly="readonly"],
select[readonly="readonly"],
textarea[readonly="readonly"] {
  background: #ccc;
}

@media screen and (max-width: 940px),
  only screen and (max-device-width: 480px),
  only screen and (min-device-width: 481px) and (max-device-width: 991px) and (orientation: portrait),
  only screen and (min-device-width: 481px) and (max-device-width: 991px) and (orientation: landscape) {
  form fieldset .form-row {
    padding: 10px;
  }
  form fieldset .form-row label {
    display: inline-block;
    text-align: left;
    width: 100%;
  }
  form fieldset .form-row .help {
    margin: 5px 0 0;
  }
  select,
  textarea {
    width: 100%;
  }
  .form-row-photo,
  .form-row-photo ~ .form-row {
    width: 100%;
  }
  .related-widget-wrapper {
    width: 100%;
  }
  ol,
  ul {
    padding: 0;
  }
  ul.ajaxmultiselect_field {
    padding: 0 5px;
  }
  form li {
    margin: 0;
  }
  fieldset .fieldBox {
    float: none;
  }
  /* Manter campos lado a lado quando há múltiplos fieldBox no mesmo form-row */
  /* Detecta quando há um segundo fieldBox (indicando múltiplos campos lado a lado) */
  /* Aplica ao primeiro fieldBox quando há múltiplos */
  form fieldset .form-row .fieldBox:first-child:not(:only-child) {
    float: left !important;
    width: 48% !important;
    min-width: 0 !important;
    max-width: 48% !important;
    margin-right: 2% !important;
  }
  /* Aplica ao segundo e demais fieldBox quando há múltiplos */
  form fieldset .form-row .fieldBox + .fieldBox {
    float: left !important;
    width: 48% !important;
    min-width: 0 !important;
    max-width: 48% !important;
    margin-right: 2% !important;
  }
  /* Remove margem do último fieldBox quando há múltiplos */
  form fieldset .form-row .fieldBox:last-child:not(:only-child) {
    margin-right: 0 !important;
  }
  form fieldset .form-row input[type="checkbox"] {
    margin: 5px 5px 0 5px;
  }
  #changelist-search input[type="text"] {
    float: left;
    width: 85%;
  }
  .selector {
    display: inline-block;
    margin: 10px 0 0;
    width: 100%;
  }
  .form-row .clearable-file-input label[for$="clear_id"] {
    display: inline;
  }
}
