/* top-level id and elements rules {{{ */
body {
    margin: 0;
    font-size: 14px;
}

body,
.ui-widget,
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button {
    font-family: 'Ubuntu', Arial, sans-serif;
}

header#header {
    padding: 6px;
    text-align: center;
}
#header-title {
    font-size: 20px;
}

section#page {
    padding: 8px;
    margin: auto;
    width: 90%;
    min-height: 480px;
    min-width:  960px;
    max-width:  1440px;
}

footer#footer {
    margin: 6px;
    font-size: 12px;
    text-align: center;
}
/* }}} */

/* general containers rules (div, p, lists etc.) {{{ */
img {
    border: none;
}

.ui-state-error:not(li):not(input), .ui-state-highlight:not(li):not(input) {
    padding: 6px;
    margin: 4px;
}

p {
    margin: 1em;
}

p.timestamps {
    margin-top: -1em;
    margin-left: 26px;
    color: #666;
    font-size: 14px;
}

/* tables */
tr:nth-child(2n + 1) {
    background-color: #eee;
}
th {
    text-align: left;
    padding: 8px;
}
td {
    padding: 4px;
}

/* CSS2.1 table-like layout with div elements. */
div.table {
    margin: 6px;
    display: table;
    border-spacing: 10px;
}
div.tr {
    display: table-row;
}
div.td {
    display: table-cell;
}

/* form */
fieldset {
    margin: 26px 0;
}
legend {
    font-size: 16px;
    padding: 2px 8px;
}
label {
    font-weight: bold;
}
/* }}} */

/* holly hacks. {{{ */
/*
 * classic clearfix hack
 * http://perishablepress.com/new-clearfix-hack/
 */
.clearfix:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
}

/* "obvious" highlight */
.todo {
    background-color: #c1cdc1;
    color: #696969;
    padding: 2px;
}
/* }}} */

/* specific rules {{{ */

/* make the info flash green */
/*
.flash.notice .ui-state-highlight {
    border: 1px solid #2a2;
    background: #efe url(images/ui-bg_glass_55_fbf8ee_1x400.png) 50% 50% repeat-x;
}
*/

/* action icons.  */
img.big-icon {
    width:  28px;
    height: 28px;
}
img.icon {
    width:  22px;
    height: 22px;
}
img.small-icon {
    width:  14px;
    height: 14px;
}

/* buttons like "Add a new ..." */
.action-links {
    margin: /* top */14px 6px 6px;
    float: right;
}

#document-form-tab.underage,
tr.underage {
    background-color: #cce;
}

.disabled, [disabled] {
    color: #777;
}

article.identity,
article.warrant {
    position: relative;
}

article.identity > nav.action-links,
article.warrant > nav.action-links {
    position: absolute;
    top: 0px;
    right: 0px;
}

/* ressource lists & properties */
ul.identities,
ul.warrants,
ul#document-events,
ul#document-invoices,
ul.document-other-events,
ul.user-deadlines,
ul#document-counsel-events,
ul#document-ffb-events {
    list-style-type: none;
}
ul.identities > li,
ul.warrants > li,
ul#document-events > li,
ul#document-invoices > li,
ul.document-other-events > li,
ul.user-deadlines > li,
ul#document-counsel-events > li,
ul#document-ffb-events > li {
    margin: 10px 0;
}
h3.demarche-title { padding: 6px; }

fieldset.ui-widget-content,
ul.identities > li:not(.ui-state-highlight),
ul.warrants > li:not(.ui-state-highlight),
ul#document-events > li:not(.ui-state-highlight),
ul#document-invoices > li:not(.ui-state-highlight),
ul.document-other-events > li:not(.ui-state-highlight),
ul.user-deadlines > li:not(.ui-state-highlight),
ul#document-counsel-events > li:not(.ui-state-highlight),
ul#document-ffb-events > li:not(.ui-state-highlight) {
    border: 1px solid #d0d0d0;
}

.identities-wrapper,
.warrants-wrapper {
    margin: 10px;
}
ul.identities,
ul.warrants {
    padding: 0px 10px;
    min-height: 20px;
}

article.event,
article.invoice,
article.other-event,
article.deadline,
article.counsel-event,
article.ffb-event {
    padding: 6px;
}

.event h2.event-type,
.invoice h2.invoice-type,
.other-event h2.event-type,
.counsel-event h2.event-type,
.ffb-event h2.event-type {
    margin: 6px 4px 14px 4px;
    font-weight: normal;
}
.event.procedure h2.event-type,
.invoice h2.invoice-type,
.other-event h2.event-type,
.counsel-event h2.event-type,
.ffb-event h2.event-type {
    font-weight: bold;
}
.invoice .amount,
.invoice .currency,
.event h2.event-type .decision,
.other-event h2.event-type .decision,
.counsel-event h2.event-type .decision,
.ffb-event h2.event-type .decision,
.event h2.event-type .subtype,
.other-event h2.event-type .subtype,
.counsel-event h2.event-type .subtype,
.ffb-event h2.event-type .subtype {
    font-weight: normal;
    font-size: 14px;
}
.event .comments p,
.invoice .comments p,
.other-event .comments p,
.counsel-event .comments p,
.ffb-event .comments p {
    margin: 2px 4px;
    padding: 4px;
}
.event ul.files,
.other-event ul.files,
.counsel-event ul.files,
.ffb-event ul.files {
    float: right;
    margin-top: 18px;
    margin-bottom: 10px;
}
.event ul.files > li,
.other-event ul.files > li,
.counsel-event ul.files > li,
.ffb-event ul.files > li {
    display: inline;
    list-style-type: none;
    padding-right: 4px;
}
.event ul.mails,
.counsel-event ul.mails,
.other-event ul.mails,
.ffb-event ul.mails {
    float: right;
    margin-bottom: 10px;
}
.event ul.mails > li,
.counsel-event ul.mails > li,
.other-event ul.mails > li,
.ffb-event ul.mails > li {
    display: inline;
    list-style-type: none;
    padding-right: 4px;
}

.deadline {
    background-color: red;
    font-weight: bold;
    color: #eee;
    padding: 8px;
    margin: 6px;
}
/* special display for event's comment when there is a deadline. */
article.event .deadline,
article.other-event .deadline {
    margin-left: 0;
    padding: 4px;
}
article.event .deadline + .comments,
article.other-event .deadline + .comments {
    margin-top: 4px;
    border: 1px solid #c00;
    color: #c00;
}
.invoice.payment .amount {
    color: #080;
}
.red,
.invoice.bill .amount {
    color: #c00;
}

.bloody {
    background-color: red;
    font-weight: bold;
    color: #eee;
}
.hidden {
    display: none;
}

/* habilitation */
body.habilitation .ui-widget-header {
    background: #31988A;
    border-color: #3a9c8f;
}
.green,
body.habilitation .ui-state-active,
body.habilitation .ui-widget-content .ui-state-active,
body.habilitation .ui-widget-header .ui-state-active,
body.habilitation .ui-state-active a,
body.habilitation .ui-state-active a:link,
body.habilitation .ui-state-active a:visited
{
    color: #136F63;
}
body.habilitation .deadline,
body.habilitation .bloody {
    background-color: #31988A;
}
#search-results td.habilitation {
    background-color: #31988A;
    color: #FFFFFF;
}
/* ended habilitation */
body.habilitation.ended .ui-widget-header {
    background: #316898;
    border-color: #0964b1;
}
.blue {
    color: #316898;
}
body.habilitation.ended .ui-state-active,
body.habilitation.ended .ui-widget-content .ui-state-active,
body.habilitation.ended .ui-widget-header .ui-state-active,
body.habilitation.ended .ui-state-active a,
body.habilitation.ended .ui-state-active a:link,
body.habilitation.ended .ui-state-active a:visited
{
    color: #338bd6;
}
body.habilitation.ended .deadline,
body.habilitation.ended .bloody {
    background-color: #316898;
}
#search-results td.habilitation.ended {
    background-color: #316898;
    color: #FFFFFF;
}
a.ui-state-default.change_status {
    background: #316898;
    color: #FFFFFF;
}

/* prison */
body.prison .ui-widget-header {
    background: #5E6665;
    border-color: #444C4C;
}
.grey,
body.prison .ui-state-active,
body.prison .ui-widget-content .ui-state-active,
body.prison .ui-widget-header .ui-state-active,
body.prison .ui-state-active a,
body.prison .ui-state-active a:link,
body.prison .ui-state-active a:visited
{
    color: #656868;
}
body.prison .bloody,
body.prison .deadline {
    background-color: #5E6665;
}
#search-results td.prison {
    background-color: #5E6665;
    color: #FFFFFF;
}
.green.ui-state-active span,
.blue.ui-state-active span,
.grey.ui-state-active span,
.red.ui-state-active span {
    color: #000;
}
/* }}} */

/* Modal permanency & consultation in document */
#btn-document-contact { cursor: pointer }

/* The Modal (background) */
.modal-document-contact {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
  margin: auto;
  width: 100%;
}
.ui-widget.ui-widget-content.ui-corner-all.modal-content {
    width: 30%;
    margin: auto;
}

/* The Close Button */
.close-document-contact {
  color: #aaaaaa;
  margin-top: -30px;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-document-contact:hover,
.close-document-contact:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

span.badge {
    font-size: 10px;
    padding: 4px 4px;
    background: #ce0202;
    color: #FFFFFF;
    border-radius: 4px;
    white-space: nowrap;
    margin-bottom: 2px;
    display: inline-block;
}
/* ckeditor plugin rules {{{ */
.ckeditor-identity-wrapper.ui-widget {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    border: 1px solid #cd0404;
    background: #FFFFFF;
    border-radius: 8px;
    z-index: 1000000;
}

.ckeditor-identity-wrapper.ui-widget label {
    display: block;
    margin-bottom: 10px;
    text-align: center;
}

.ckeditor-identity-wrapper.ui-widget > select {
    display: block;
}

.ckeditor-identity-wrapper.ui-widget > .ui-button {
    display: block;
    margin-top: 20px;
}
.folder_status .ui-multiselect.ui-widget.ui-state-default.ui-corner-all {
    padding: .4em 1em !important;
}
/* }}} */


/* helpers {{{ */
.no-padding-h {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.text-left {
    text-align: left;
}
.text-center {
    text-align: center;
}
.text-right {
    text-align: right;
}
.text-bold {
    font-weight: bold;
}
.well {
    padding: 20px;
    border: 1px solid #F0F0F0;
    box-sizing: border-box;
    background: #FAFAFA;
    margin-bottom: 20px;
}

.mb-1 { margin-bottom: 0.2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }
/* }}} */

/* stats {{{ */
.row {
    box-sizing: border-box;
    margin-left: -15px;
    margin-right: -15px;
    clear: both;
}
.row:before {
    content: " ";
    display: table;
}
.row:after {
    content: " ";
    display: table;
    clear: both;
}
.col-md-3 {
    float: left;
    box-sizing: border-box;
    width: 25%;
    position: relative;
    min-height: 1px;
    padding-left: 15px;
    padding-right: 15px;
}
.col-md-4 {
    float: left;
    box-sizing: border-box;
    width: 33.3333333%;
    position: relative;
    min-height: 1px;
    padding-left: 15px;
    padding-right: 15px;
}
.col-md-6 {
    float: left;
    box-sizing: border-box;
    width: 50%;
    position: relative;
    min-height: 1px;
    padding-left: 15px;
    padding-right: 15px;
}
.col-md-9 {
    float: left;
    box-sizing: border-box;
    width: 75%;
    position: relative;
    min-height: 1px;
    padding-left: 15px;
    padding-right: 15px;
}
.col-md-12 {
    float: left;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    min-height: 1px;
    padding-left: 15px;
    padding-right: 15px;
}
.panel {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid transparent;
    border-radius: 0;
    -webkit-box-shadow: 0 1px 1px rgb(0 0 0 / 5%);
    box-shadow: 0 1px 1px rgb(0 0 0 / 5%);
}
.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid transparent;
    border-top-right-radius: -1px;
    border-top-left-radius: -1px;
}
.panel-body {
    padding: 15px;
}
.panel-info {
    border-color: #bce8f1;
}
.panel-info>.panel-heading {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}
.panel-primary {
    border-color: #A80101;
}
.panel-primary>.panel-heading {
    color: #FFFFFF;
    background-color: #CC0000;
    border-color: #A80101;
}
.big-number {
    text-align: center;
    font-size: 52px;
    padding: 12px;
    border-radius: 50%;
    min-width: 100px;
    display: inline-block;
}
.alert-info {
    background-color: #d9edf7;
    border: 1px solid #bce8f1;
    color: #31708f;
}
.alert-primary {
    color: #FFFFFF;
    background-color: #CC0000;
    border: 1px solid #A80101;
}
.alert-default {
    color: #000000;
    background-color: #FAFAFA;
    border: 1px solid #F0F0F0;
}
.stats_sub_title {
    margin-top: 5px;
    padding: 4px 5px;
    text-align: center;
    border-radius: 9px;
    font-weight: bold;
}
.stats_duration_details {
    text-align: center;
    font-size: 10px;
    margin-bottom: 15px;
}
.toggle-foldable {
    cursor: pointer;
}
.foldable {
    display: none;
}
/* }}} */
/* End modal document_habilitation_ended_at */

#modal-change_status {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 300px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
#modal-change_status fieldset {
    padding-left: 3px;
    padding-right: 5px;
    padding-top: 3px;
}
#modal-change_status .ui-widget-header.ui-corner-all {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0.4em 0;
}
#modal-change_status .label {
    padding-left: 5px;
}
#modal-change_status .close-change_status {
    width: 20px; height: 20px; margin-right: 5px;
}
#modal-change_status div.modal-content {
    margin-top: 40px;
}
#modal-change_status #document-choose_date-wrapper,
#modal-change_status fieldset div.modal-content {
    display: flex;
    justify-content: space-between;
}
#modal-change_status form#document-form {
    width: 100%;
    margin-left: 10px;
    margin-right: 10px;
}
#modal-change_status #document-habilitation_ended_at-wrapper {
    display: flex;
    justify-content: space-between;
}
/* End modal document_habilitation_ended_at */
/* Stick status top of Tab Panel */
#stick_status {
    width: 100%;
    position: absolute;
    top: 26px;
    left:0px;
    height: 9px;
    display: flex;
    flex-direction: row;
    padding-top: 15px;
}
.stick_status_color {
    flex: 1;
}
.stick_status_color.red {
    background-color: #CC0000;
}
.stick_status_color.green {
    background-color: #31988A;
}
.stick_status_color.blue {
    background-color: #316898;
}
.stick_status_color.grey {
    background-color: #5E6665;
}
.event-border-red {
    border-left: solid 5px #CC0000 !important;
}
.event-border-green {
    border-left: solid 5px #31988A !important;
}
.event-border-blue {
    border-left: solid 5px #316898 !important;
}
.event-border-grey {
    border-left: solid 5px #5E6665 !important;
}
.btn-new-prison span {
    background: #5E6665;
    color: #FFFFFF;
    border-radius: 6px;
}
.btn-new-habilitation span {
    background: #31988a;
    color: #FFFFFF;
    border-radius: 6px;
}
.btn-new-folder span{
    background: #cc0000;
    color: #FFFFFF;
    border-radius: 6px;
}
.green.ui-state-active span {
    background: #31988a;
    color: #FFF;
}
.blue.ui-state-active span {
    background: #316898;
    color: #FFF;
}
.grey.ui-state-active span {
    background: #5E6665;
    color: #FFF;
}
.red.ui-state-active span {
    background: #cc0000;
    color: #FFF;
}

#modal-change-juridical-status{
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 300px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
#modal-change-juridical-status fieldset {
    padding: 5px;
}
#modal-change-juridical-status .ui-widget-header.ui-corner-all {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0.4em 0;
}
#modal-change-juridical-status label {
    padding-left: 5px;
}
#modal-change-juridical-status .ui-button.ui-widget.ui-state-default.ui-corner-all.ui-button-icon-only.close-juridical-status {
    width: 1.2em !important;
}
#modal-change-juridical-status span.ui-button-text {
        padding: 0px;
        margin: 0px;
}
#modal-change-juridical-status div.modal-content {
    margin-top: 20px;
}
#modal-change-juridical-status form#document-form {
    width: 100%;
    margin-left: 10px;
    margin-right: 10px;
}
div#document-choose_date-wrapper {
    margin-top: 1em;
}

.lang_switch {
    border-left: 1px solid #FFFFFF;
    font-weight: normal !important;
    text-decoration: none;
    padding-left: 5px;
}
.lang_switch:first-child {
    border: none;
}
.lang_switch.active {
    font-weight: bold !important;
}

input.buttonize.change_status {
    margin-top: 1em;
    display: flex;
}
/* Warrant list in document */
#document-tabs .cke_top .cke_toolbox {
    display: flex;
}
#document-tabs .warrant-infos.table .cke_contents.cke_reset {
    max-height: 100px;
}
#document-tabs .warrant-infos.table .cke_bottom.cke_reset_all {
    display: none;
}
div.tags {
    display: flex;
    justify-content: flex-start;
    gap: 5px;
}
div.tags .tag {
    padding: 5px 2px;
    border: 1px solid #354f80;
    width: auto;
    background: #73a0c7;
    display: inline-block;
    border-radius: 4px;
    font-size: 80%;
    color: #000000;
}

/* Extract data page {{{ */
.extract-page .step-wrapper {
    border: 1px solid #F0F0F0;
    padding: 10px;
    margin-bottom: 10px;
}
.extract-page .step-wrapper .step-title {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    line-height: 32px;
    margin-bottom: 10px;
}

.extract-page .step-wrapper .step-title .step-number {
    display: inline-block;
    width: 35px;
    height: 35px;
    text-align: center;
    padding: 0;
    margin-right: 10px;
    font-size: 32px;
    font-weight: bold;
    border: 1px solid #000000;
    border-radius: 50%;
}
.extract-page .step-wrapper .step-title .step-description {
    font-size: 20px;
}
.extract-page .step-wrapper .step-content {
    clear: both;
}
.extract-page .step-wrapper .step-content .tr {
    width: 100%;
}
.extract-page .step-wrapper .step-content .tr .td {}
.extract-page .step-wrapper .step-content .tr .td .field {
    min-width: 200px;
}
.extract-page .step-wrapper .step-content .tr .td .field > label {
    display: inline-block;
    min-width: 150px;
}
.extract-page .step-wrapper .step-content .tr .td .field .buttonsetize label:first-child {
    display: inline-block;
    min-width: 150px;
}
/* }}} */
