:root {

  --font-size: 13px;

  --primary-color: #2d4156;
  --primary-color-hover: dimgray;
  --primary-color-active: dimgray;
  --primary-color-text: white;

  --secondary-color: #c12033;
  --secondary-color-hover: gray;
  --secondary-color-text: white;

  --action-color: #cf5050;
  --action-color-active: #ac2d2d;
  --action-color-text: white;

  --button-color: var(--secondary-color);
  --button-color-hover: var(--secondary-color-hover);
  --button-color-text: var(--secondary-color-text);

  --link-text: dimgray;
  --link-text-visited: dimgray;
  --link-text-hover: gray;

  --error-color: tomato;
  --error-color-hover: lightred;
  --error-color-accent: red;
  --error-color-text: white;
  --error-color-hover-text: dimgray;

  --warn-color: #ef6c00;
  --warn-color-accent: #c45d1a;
  --warn-color-text: white;

  --info-color: #2196f3;
  --info-color-accent: #087dcd;
  --info-color-text: white;

  --success-color: #208420;
  --success-color-accent: #036D03;
  --success-color-text: white;

  --row-hover: #FFFFCC;

  --light-background: whitesmoke;
  --light-shadow: 3px 3px 15px -10px lightgray;
  --shadow: 3px 3px 15px -10px gray;
  --inset-shadow: 0 0 15px -5px lightgray inset;

  --bootstrap-icons: "bootstrap-icons";
}

.text-title {
  font-size: 1rem;
  font-weight: bold;
}

.text-primary {
  color: var(--primary-color);
}
.text-success {
  color: var(--success-color);
}
.background-success {
  background-color: var(--success-color);
}
.text-danger {
  color: var(--error-color);
}
.background-danger {
  background-color: var(--error-color);
}

.text-dark {
  color: black;

  a&, a {
    color: black;
  }
}
.text-dark .btn.btn-icon::before {
  color: black;
}

.text-mute {
  color: var(--link-text-hover);
}

.h3 {
  font-size: 16px;
  font-weight: 600;
}

.empty,
.empty a{
  color: #999!important;
}

body {
  min-height: 100vh;
  margin:0;
  padding:0;
  font-family: sans-serif;
  font-size: var(--font-size);
}

a {
  color: var(--link-text);
  text-decoration: none;

  &:link {
    color: var(--link-text);
  }
  &:visited {
    color: var(--link-text-visited);
  }
  &:active,
  a:hover {
    color: var(--link-text-hover);
  }

  &.tiny {
    font-size: .8em;
  }
  &.primary {
    color: var(--primary-color);
  }
  &.dark {
    color: black;
  }
}

input {
  border: 1px solid #cccccc;
  padding: .3rem .5rem;
  border-radius: 3px;
  height: auto;
  line-height: normal;
  display: inline-block;
  transition: border .3s;
}

input[type="radio"] {
  appearance: none;
  margin: 0;
  border: 0;

  &:focus {
    background-color: transparent;
  }
  &:after {
    font-family: var(--bootstrap-icons);
    content: "\F28A";
    vertical-align: top;
  }
  &:checked:after {
    content: "\F26B";
  }
}

select {
  background-color: white;
  border: 2px solid #ECEFF1;
  border-radius: 3px;
  box-sizing: border-box;
  color: dimgray;
  padding: .6rem 1.3rem .6rem .6rem;
  height: auto;
  line-height: normal;
  letter-spacing: .5px;
  display: inline-block;
  transition: border .3s;
  outline: 0;
  font-size: 1em;
}
select:not(:disabled):hover,
select:not(:disabled):focus {
  border: 2px solid gray;
}
select.clear {
  border: none;
  padding-left: 0;
}
select.clear:not(:disabled):hover,
select.clear:not(:disabled):focus {
  border: none;
}

abbr {
  cursor: help;
  text-underline-offset: 2px;
}

.select2-dropdown {
  z-index: 2000000;
}
.select2-selection__placeholder {
  color: #b3b3b3;
}

.select2-container--default .select2-selection--single {
  padding: .6rem 1.4rem .6rem .8rem;
  border: 2px solid #ECEFF1;
  border-radius: 3px;
  background-color: white;
  color: dimgray;
  box-sizing: border-box;
  letter-spacing: .5px;
  width: 100%;
  height: auto;
  transition: border .3s;
  min-height: calc(1.6rem + 1em);
}
.select2-container--default .select2-selection--single:hover,
.select2-container--default .select2-selection--single:focus {
  border: 2px solid gray;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0;
  line-height: 1.2em;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  width: 1.5rem
}
.select2-container--default .select2-selection--single .select2-selection__clear {
  height: 100%;
}

div[data-sortable] {
  padding: .3rem;
  border-radius: 3px;
  border: 1px solid lightgray;
}
div[data-sortable] > div {
  padding: .3rem .5rem;
  background-color: whitesmoke;
  margin-bottom: .3rem;
  cursor: row-resize;
}
div[data-sortable] > div:last-child {
    margin-bottom: 0;
}
div[data-sortable] > div::before {
  content: "||";
  margin-right: .5rem;
  color: lightgray;
  letter-spacing: -.2em;
  transition: color .3s;
}
div[data-sortable] > div:hover::before {
  color: black;
}

select[multiple] {
  min-height: 250px;
  min-width: 400px;
  max-width: 800px;
}

input[disabled]{
    background-color:#eee !important;
}

textarea[disabled]{
    background-color:#eee !important;
}

details > summary {
  cursor: pointer;
}
details[open] > summary ~ * {
  animation: sweep .5s ease-in-out;
}
details[open].no-animation > summary ~ * {
  animation: none;
}
@keyframes sweep {
  0%    { opacity: 0; }
  100%  { opacity: 1; }
}

/* Reports: expandable rows */
.report-row {
  border: 1px solid #ECEFF1;
  border-radius: 6px;
  padding: .5rem .75rem;
  background: white;
}
.report-row + .report-row {
  margin-top: .5rem;
}
.report-row .row-toggle {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.report-row .row-toggle::after {
  font-family: var(--bootstrap-icons);
  content: "\F285"; /* chevron-down */
  display: inline-block;
  transition: transform .2s ease-in-out;
}
.report-row .row-toggle[aria-expanded="true"]::after {
  transform: rotate(90deg);
}
.report-row .row-content {
  margin-top: .5rem;
  animation: sweep .3s ease-in-out;
}

div.divinput{
  padding: 4px;
}

span.label {
  padding: 0 5px;
  width: 350px;
}

div.group {display: table; margin: 2px 0; width: 100%;}
div.group .label,
div.group .offer {
  display: table-cell;
  text-align: left;
  vertical-align: middle;
}
div.group .label {width: 150px;}

.sidealert{
  position:fixed;
  padding:10px;
  top:50px;
  right:30px;
  background-color:white;
  border:1px solid #eee;
}

#userinfo-hidden{
  display:none;
  visibility:hidden;
}

.attachedpath {
    color: light-grey;
    margin: 3px 0 0;
}

.menuparagraph-link-outer{
  float:right;
  padding-left: 6px;
  width:20px
  }
.menuparagraph-link-inner{
  float:right;
  padding-left:2px;
  width:140px
}

.LISel a div{
  font-weight: bold;
}

/* vocabolari */
.voctype-a:after {
    content: "A";
    padding: 0 4px;
}
.voctype-c:after {
    content: "C";
    padding: 0 4px;
}
.voctype-n:after {
    content: "N";
    padding: 0 4px;
}

.Pcolv, .colv{
    display: none;
}

.voctype {
    display: none;
    float: right;
    font-size: 80%;
    padding: 5px 0;
}

.field-key{
  display: inline;
  font-size:  80%;
  color: white;
  margin: 0 2px;
}
.field-key:after{
  content:url('images/field-key-sml.png');
}

.field-image input[type="text"] {
  pointer-events: none;
}

.paginazione{
  clear:both;
    border-bottom: 1px solid #CCCCCC;
    background-color: white;
    padding: 5px;
    min-height:16px;
}
.stick-paging {
    position:fixed;
    top:0px;
    z-index: 10;
    width : 85%;
}

.stick-buttons{
    border-radius: 3px;
    bottom: 10px;
    padding: 10px;
    position: fixed;
    right: 10px;
}


.buttons-sticker{
  float:right;
  cursor:pointer;
  background-image: url("../images/buttons-icon.png");
  background-position: right center;
    background-repeat: no-repeat;
  margin: 0 5px;
  width:16px;
  height:16px;
  display: none;
}

.buttons-printer {
  float:right;
  cursor:pointer;
  background-image: url("../images/print.png");
  background-position: right center;
    background-repeat: no-repeat;
  margin: 0 5px;
  width:16px;
  height:16px;
  display: none;
}

.coladmin {
  width: 400px;
}

.coladminorder {
  width: 400px;
}

div.padminbuttonsorder {
  position: relative;
  width: 320px;
  float: right;
  text-align:right;
}

span.link-remove {
  color: red;
  text-align: right;
  float: right;
  cursor: pointer;
}

.menuparagraph-list li{
  border:none;
  display:inline-block;
}

.menuparagraph-list ul li ul{
  display:none;
  list-style-type:none;
  width:300px;
}

.menuparagraph-list li ul {
  display: none;
  float: left;
  position: absolute;
}
.menuparagraph-list ul li:hover ul{
  display:block;
  border:1px solid black;
}
.menuparagraph-list ul li:hover ul li{
  width:300px;
  display:inline-block;
}

.menuparagraph-list li:hover ul {
  display: block;
  margin-left:140px;
  margin-top:-20px;
}

.par-content-summary {
  background-color: white;
  border:1px solid black;
  min-width:320px;
  padding: 20px 10px;
  z-index:1;
  top: -19px;
  position: relative;
}

.par-content-summary-others{
  width: auto!important;
}
.menuparagraph-buttons{
  text-align: right;
  cursor:pointer;
  float:right;
  width: 40%;
}

.menuparagraph-summary .par-comment{
  font-weight: bold;
  margin-bottom: 5px;
}

.menuparagraph-summary .repeatable,
.menuparagraph-summary .occurrences{
  display: inline-block;
  min-width: 12px;
}

.menuparagraph-summary .repeatable a {
    padding: 0;
}


.kfield-summary{font-style: italic; clear: both;border-top: 1px solid #EEEEEE;}
.sfield-summary{margin-left: 20px; clear: both;}


.kfield-summary .mark,
.sfield-summary .mark,
.cfield-summary .mark{
  font-size: 90%;
  font-weight: bold;
  width: 20%;
  display:inline-block;
  vertical-align: top;
}

.kfield-summary .comment{
  display: inline-block;
  width: 40%;
}
.sfield-summary .comment,
.cfield-summary .comment{

  display: inline-block;
  width: 70%;
}

table.summary,
table.summary-show,
table.summary-show-inner,
table.summary-id,
table.summary-selected{
  width: 100%;
  padding: 0px 0px 0px 0px;
}
table.summary-insert{
  width: 100%;
}

table td.subparagraphlabel-mark{ font-weight: bold;}
table td.subparagraphlabel-comment{ font-weight: bold;}

table td.paragraphlabel-mark{ font-weight: bold;}
table td.paragraphlabel-comment{font-weight: bold;}
table tr.paragraphlabel{color: #cc0000;}

.dispatchresults{
  white-space: nowrap;
  float: left;
}
.dispatchresults .workspaceresults,
.dispatchresults .loadresults{
  display: inline-block;
  min-width: 15px;
  cursor:pointer;
}
.dispatchresults .loadresults a{
  float: left;
}

.paginazione .workspaceresults {
  float: right;
  margin: 0 8px;
  cursor:pointer;
}
.label-mark.cccmark{font-weight: bold;}


.summary.tableduplica .mark { /*allarga le colonne del mark per fare posto al check di duplicazione*/
  width: 70px;
}

.hovertext{
  color: #aaa;
}
.hovertext:hover{
  color: #333;
}
.softwarn {
    color: #BBBBBB;
}

#savepointlist {
    background: none repeat scroll 0 0 #FFFFFF;
    border: 1px solid #DDDDDD;
    border-radius: 3px;
    margin: 10px;
    max-width: 600px;
    position: absolute;
    right: 0;
    padding: 15px;
}

.savepointbutton {
    float: left;
    width: 80px;
    cursor: pointer;
}

.notificationbase {
    display: inline-block;
    position: relative;
}

.notification {
    background-color: #FF0000;
    border-radius: 10px;
    color: #FFFFFF;
    line-height: 1.5em;
    min-width: 15px;
    position: absolute;
    right: -10px;
    text-align: center;
    top: -5px;
}

.containersel > option {
    max-width: 500px;
    overflow: hidden;
}

.ico {
    background-color: rgba(0, 0, 0, 0);
    border: 0 none;
    display: inline-block;
    float: left;
    height: 14px;
    width: 14px;
}
.icopin {
    background-image: url("../images/pin.png");
}
.icopinned{
    background-image: url("../images/pinned.png");
}
.icochainlink {
    background-image: url("../images/chainlink.png");
}
.icochainbroken{
    background-image: url("../images/chainbroken.png");
}


.column-treeview{
  display:none;
}

.thumb[data-viewer] {
  cursor: zoom-in;
  opacity: .8;
  transition: opacity .3s;
}
.thumb[data-viewer]:hover,
.thumb[data-viewer]:focus {
  opacity: 1;
}

.column-result-hidden {
  top:0;
  left:-9999px;
  width:0px; height:0px;
  overflow:hidden;
  visibility: hidden;
  position: absolute;
}

.sort-results {
  margin: 1rem 0;
  padding: .5rem;
}
.sort-results[open] > summary {
  padding-bottom: 1rem;
}
.sort-results > div {
  display: flex;
  flex-flow: row wrap;
  align-items: stretch;
}
.sort-options,
.sort-fields {
  padding: 1rem;
}

body.popup {
  padding: 2rem;
}

select {
  background-color: white;
}

input.as-text {
  border: 1px solid transparent;
}

.secondary {
  color: gray;
}
a.secondary,
a.secondary:link,
a.secondary:visited {
  color: gray;
  text-decoration: none;
  transition: all .3s;
}
a.secondary:hover,
a.secondary:focus,
a.secondary:active {
  color: black;
}
a.disabled {
  pointer-events: none;
}

.border {
  border-width: 1px;
  border-style: solid;
  border-color: lightgray;
}
.border-bottom {
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-color: lightgray;
}

.gray-100 {
  color: #F5F5F5;
}
.gray-200 {
  color: #EEEEEE;
}
.gray-400 {
  color: #78909C;
}

.button-group {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
}
.button-group.inline {
  display: inline-flex;
}
.button-group > button {
  background-color: #F5F5F5;
  color: dimgray;
  padding: .3rem .5rem;
  margin-left: .5rem;
  border-radius: 3px;
  border: 1px solid lightgray;
  white-space: nowrap;
  box-shadow: 2px 2px 6px -3px lightgray;
  cursor: pointer;
  transition: all .3s;
}
.button-group > button:hover {
  background-color: #EEEEEE;
  color: black;
}
.button-group > button:first-child {
  margin-left: 0;
}
.button-group > button.active {
  background-color: var(--primary-color);
  color: white;
}

.button.action,
.modal .button.action {
  color: white;
  background-color: var(--action-color);
}
.button.action:focus,
.button.action:hover,
.modal .button.action:focus,
.modal .button.action:hover {
  background-color: var(--action-color-active);
}

button, .button {
  font-family: inherit;
  font-size: 1em;
}
.button {
  border: none;
  border-radius: 3px;
  padding: .5rem 1rem;
  white-space: nowrap;
  box-shadow: 2px 2px 6px -3px lightgray;
  cursor: pointer;
  transition: all .3s;
}
.button.button-primary,
button.primary {
  color: var(--primary-color-text);
  background-color: var(--primary-color);

  &::before {
    color: var(--primary-color-text);
  }
}
.button.button-primary:hover,
button.primary:hover {
  color: black;
}
.button.button-secondary,
button.secondary {
  color: var(--secondary-color-text);
  background-color: var(--secondary-color);
}
.button.button-secondary:hover,
button.secondary:hover {
  color: var(--secondary-color-text);
  background-color: var(--secondary-color-hover);
}
.button.button-success,
button.success {
  background-color: #208420;
  color: white;
}
.button.button-success:hover,
button.success:hover {
  background-color: #2D912D;
  color: white;
}
.button.button-default,
button.default {
  background-color: black;
  color: white;
}
.button.button-default:hover,
button.default:hover {
  background-color: #434343;
  color: white;
}
.button.button-danger,
button.danger {
  background-color: var(--error-color);
  color: var(--error-color-text);
}
.button.button-danger:hover,
button.danger:hover {
  background-color: var(--error-color-hover);
  color: var(--error-color-hover-text);
}

.button.small,
button.small {
  padding: .4rem .6rem;
}

.button.block,
button.block {
  display: block;
  width: 100%;
  padding: .5rem;
  white-space: nowrap;
}
button.clear,
button.clear:hover,
.button.clear,
.button.clear:hover {
  background-color: transparent;
  border: 0;
  box-shadow: none;
}

.button.light {
  background-color: dimgray;
  color: white;

  &:hover,
  &:active {
    background-color: dimgray;
  }
}

.button.loading {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.button.loading::after {
  content: "";
  background-image: url("../images/btn-loader.apng");
  width: 18px;
  height: 18px;
  display: inline-block;
  background-position: -6px -6px;
}
.button[disabled] {
  background-color: whitesmoke;
  color: gray;
  border: 1px solid lightgray;
  cursor: default;
}
.button[disabled]:hover {
  color: gray;
}

.modal {
  display: none;
  margin: 2rem;
  padding: 2rem;
  background: white;
  border-radius: 3px;
  box-shadow: 5px 5px 20px -10px gray;
  max-height: 100vh;
  overflow: auto;
  box-sizing: border-box;
  transition: all .3s;

  &.modal-open {
    display: block;
    opacity: 0;
    max-height: calc(100vh - 4rem);
    max-width: calc(100vw - 4rem);
    height: auto;
    width: auto;
    position: relative !important;
  }
  &.modal-show {
    opacity: 1;
  }
  &.modal-fullscreen {
    height: calc(100vh - 4rem);
    max-height: none  !important;
    width: calc(100vw - 4rem) !important;
    max-width: none  !important;
  }
  &.modal-lg {
    width: 80vw;
    max-width: 1400px;
  }
  &.modal-md {
    width: 60vw;
    max-width: 800px;
  }
  &.modal-sm {
    width: 30vw;
    max-width: 500px;
    padding: 1rem;
  }
  @media (max-width: 1024px) {

    &.modal-md {
      width: 80vw;
    }
  }
  @media (max-width: 768px) {

    &.modal-md {
      width: 80vw;
    }
  }
  @media (max-width: 425px) {

    &.modal-md {
      width: 90vw;
    }
  }

  > header {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
  }
  > header > *:first-child {
    margin: 0;
  }
  .modal-alert > .btn {
    float: right;
    margin: 0;
  }
  .modal-alert .content {
    line-height: 1.5em;
  }
  &.alert-error {
    background-color: var(--error-color);
    color: var(--error-color-text);

    .btn.btn-icon::before {
      color: var(--error-color-text);
    }
  }
  &.small .modal-alert .content {
    font-size: .8rem;
  }
  .buttons {
    justify-content: flex-end;
    border: none;
    padding: 1vw 0;
    position: static;
  }
  .button {
    border-radius: 3px;
    background-color: black;
    color: white;
    padding: .5rem 1rem;
    transition: .3s all;
    border: none;
    display: inline-block;
  }
  .button:hover {
    box-shadow: 0 0 0px 3px lightgray;
    color: white;
    background-color: #434343;
  }
  .button.button-primary,
  button.primary {
    color: var(--primary-color-text);
    background-color: var(--primary-color);
  }
  .button.button-primary:hover,
  button.primary:hover {
    color: var(--primary-color-hover);
  }
  .button.button-success,
  button.success {
    background-color: #208420;
    color: white;
    border: none;
    padding: .5rem 1rem;
  }
  .button.button-success:hover,
  button.success:hover {
    background-color: #2D912D;
    color: white;
  }
  .button.button-default,
  button.default {
    background-color: black;
    color: white;
    border: none;
    padding: .5rem 1rem;
  }
  .button.button-default:hover,
  button.default:hover {
    background-color: #434343;
    color: white;
  }
  > footer {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: flex-end;
    margin-top: 2rem;
  }
}
.overlay-center {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
}
.modal-overlay {
  background-color: rgba(0,0,0,.3);
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}
body.disable-scroll {
  width: 100vw;
  height: 100vh;
  padding-right: 17px;
  position: fixed;
}

.buttons {
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background-color: white;
  padding: 1rem;
}
.buttons.light {
  background-color: #F5F5F5;
}

.overlay-center {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
}
body.disable-scroll {
  width: 100vw;
  height: 100vh;
  padding-right: 17px;
  position: fixed;
}

.viewer-regen::before,
.viewer-rotate::before,
.viewer-scale::before,
.viewer-crop::before {
  display: inline-block;
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -.125em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: white;
  font-size: 18px;
}
.viewer-regen::before {
  content: "\F130";
}
.viewer-rotate::before {
  content: "\F116";
}
.viewer-scale::before {
  content: "\F150";
}
.viewer-crop::before {
  content: "\F1B5";
}
.image-wrapper {
  position: relative;
}
.image-wrapper img {
  width: 100%;
  object-fit: contain;
  object-position: center;
  max-height: 50vh;
  z-index: 0;
}

.samira-helper {
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.samira-helper::after {
  display: inline-block;
  content: "\F505";
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -.125em;
  color: #5f9ea0;
  font-size: 16px;
  margin-left: .5rem;
  cursor: help;
}

i.icon {
  background-color: transparent;
  display: inline-block;
  margin: 0.3rem 0;
  text-align: center;
  border: none;
  padding: .3rem;
}
i.icon::before {
  display: inline-block;
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: top;
  font-size: 24px;
  cursor: pointer;
  color: dimgray;
  width: 24px;
  height: 24px;
  background-origin: content-box;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% auto;
}
i.icon.light::before {
  color: white;
}
i.icon.no-cursor::before {
  cursor: default;
}
i.icon.small::before {
  font-size: 16px;
  width: 16px;
  height: 16px;
}
i.icon.regular {
  padding: .1rem;
}
i.icon.regular::before {
  font-size: 18px;
  width: 18px;
  height: 18px;
}
i.icon.no-space {
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
}

div.buttons {
  border: none;
  justify-content: flex-end;
  align-items: center;
  padding: 1vw 0;
  float: none;
}

div.buttons a,
div.buttons a:hover,
div.buttons a:link,
div.buttons a:visited,
div.buttons a:active,
div.buttons button {
  border: 0;
  border-radius: 5px;
  color: var(--button-color-text);;
  float: none;
  font-weight: normal;
  margin: 0;
  min-width: 60px;
  padding: .5rem .8rem;
  position: relative;
  text-align: center;
  text-decoration: none;
  background-color: var(--button-color);
  transition: .3s all;
  box-shadow: var(--shadow);
}
div.buttons a:hover,
div.buttons button:hover {
  background-color: var(--button-color-hover);
}

.btn:hover,
.btn:focus {
  background-color: whitesmoke;
  border: 2px solid lightgray;
}
.btn.selected {
  background-color: var(--success-color) !important;
  pointer-events: none;
  opacity: .9;
}
.btn.disabled {
  pointer-events: none;
  opacity: .3;
}
.btn.danger {
  background-color: var(--error-color);
  color: var(--error-color-text);
}
.btn.btn-icon {
  background-color: transparent;
  display: inline-block;
  margin: 0.3rem 0;
  text-align: center;
  border: none;
  padding: .3rem;
  border-radius: 3px;
}
.btn.btn-icon::before {
  display: inline-block;
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: top;
  font-size: 24px;
  cursor: pointer;
  color: dimgray;
  width: 24px;
  height: 24px;
  background-origin: content-box;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% auto;
}
.btn.btn-icon.primary::before {
  color: white;
}
.btn.btn-icon.inline {
  padding: .3rem;
  vertical-align: middle;
  margin: 0;
}
.btn.btn-icon.small::before {
  font-size: 16px;
  width: 16px;
  height: 16px;
}
.btn.btn-icon.regular::before {
  font-size: 18px;
  width: 18px;
  height: 18px;
}
.btn.btn-icon.big::before {
  padding-right: 10px;
  font-size: 22px;
  width: 20px;
  height: 20px;
}
.btn-icon:hover,
.btn-icon:focus {
  background-color: transparent;
  border: none;
}
.btn.btn-icon.light::before {
  color: whitesmoke;
}
.btn-icon.as-font::before {
  width: 1em;
  height: 1em;
}
.btn.btn-icon > img,
.btn.btn-icon > span {
  display: none;
}
.btn.btn-icon.danger::before {
  color: red;
}
.btn.btn-icon.btn-dark {
  background-color: gray;
  color: white;
  border-radius: 3px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .3s all;
}
.btn.btn-icon.btn-dark::before {
  color: white !important;
}
.btn.btn-icon.btn-dark:hover {
  background-color: black;
}

.btn.btn-icon.loading {
  opacity: 1 !important;
}
.btn.btn-icon.loading::before {
  content: url("../images/btn-loader.apng");
}

.btn-3d::before {
  content: "\F15B";
}

.btn-edit::before {
  content: "\F4CA";
}
.btn-view::before {
  content: "\F341";
}
.btn-card:not(.cardlink)::before {
  content: "\F392";
}
.btn-clipboard::before {
  content: "\F290";
}
.btn-clipboard-check::before {
  content: "\F28B";
}
.btn-clipboard-x::before {
  content: "\F28F";
}
.btn-cardlink::before {
  content: "\F4CA";
}
.btn-copy::before {
  content: "\F759";
}
.btn-delete::before {
  content: "\F78B";
}
.btn-users::before {
  content: "\F4D0";
}
.btn-cards::before {
  content: "\F69F";
}
.btn-dictionary::before {
  content: "\F473";
}
.btn-list-columns::before {
  content: "\F6A0";
}
.btn-email::before {
  content: "\F32F";
}
.btn-file::before {
  content: "\F362";
}
.btn-image::before {
  content: "\F36D";
}
.btn-insert::before {
  content: "\F37D";
}
.btn-link::before {
  content: "\F470";
}
.btn-map::before {
  content: "\F47F";
}
.btn-movetop::before {
  content: "\F115";
}
.btn-moveup::before {
  content: "\F148";
}
.btn-movebottom::before {
  content: "\F112";
}
.btn-movedown::before {
  content: "\F128";
}
.btn-new::before {
  content: "\F3AB";
}
.btn-url::before {
  content: "\F470";
}
.btn-video::before {
  content: "\F37B";
}
.btn-arrow-left::before {
  content: "\F12F";
}
.btn-arrow-right::before {
  content: "\F138";
}
.btn-x::before {
  content: "\F62A";
}
.btn-diagram-3::before {
  content: "\F2EE";
}
.btn-arrow-in-right::before {
  content: "\F1BE";
}
.btn-open::before {
  content: "\F1C5";
}
.btn-reboot::before {
  content: "\F1A7";
}
.btn-upload::before {
  content: "\F2C0";
}
.btn-stickies::before {
  content: "\F58B";
}
.btn-add::before {
  content: "\F4FA";
}
.btn-dash::before {
  content: "\F2E4";
}
.btn-plus::before {
  content: "\F4FE";
}
.btn-translate::before {
  content: "\F658";
}
.btn-download::before {
  content: "\F29B";
}
.btn-share::before {
  content: "\F52E";
}
.btn-search::before {
  content: "\F52A";
}
.btn-clean::before {
  content: "\F78B";
}
.btn-grip-vertical::before {
  content: "\F3FE";
}
.btn-arrow-up::before {
  content: "\F145";
}
.btn-arrow-down::before {
  content: "\F124";
}
.btn-chevron-right::before {
  content: "\F285";
}
.btn-chevron-down::before {
  content: "\F282";
}
.btn-chevron-up::before {
  content: "\F286";
}
.btn-arrow-clockwise::before {
  content: "\F116";
}
.btn-search-heart::before {
  content: "\F787";
}
.btn-check::before {
  content: "\F26E";
}
.btn-square::before {
  content: "\F582";
}
.btn-square-check::before {
  content: "\F26C";
}
.btn-world::before {
  content: "\F882";
}
.btn-settings::before {
  content: "\F789";
}

i.icon.icon-process-result-0::before {
  content: "\F26E";
}

/*BUTTON RICERCA MODALE*/
.btn-search-modal::before {
  content: "\F52A";
}

.btn-database::before {
  content: "\F8C4";
}
.btn-person-circle::before {
  content: "\F4D7";
}
.btn-backspace-reversed::before {
  content: "\F158";
}
.btn-chevron-double-up::before {
  content: "\F281";
}
.btn-chevron-double-down::before {
  content: "\F27E";
}
.btn-gear-fill::before {
  content: "\F3E2";
}
.btn-home::before {
  content: "\F425";
}
.btn-arrow-bar-left::before {
  content: "\F113";
}
.btn-arrow-left-short::before {
  content: "\F12C";
}
.btn-arrow-left-circle::before {
  content: "\F12A";
}
.btn-arrow-counterclockwise::before {
  content: "\F117";
}
.btn-arrow-right-short::before {
  content: "\F135";
}
.btn-arrow-bar-right::before {
  content: "\F114";
}
.btn-pencil-square::before {
  content: "\F4CA";
}
.btn-trash::before {
  content: "\F5DE";
}
.btn-history::before {
  content: "\F292";
}
.btn-toggle[data-status="on"]::before {
  content: "\F5D6";
}
.btn-toggle[data-status="off"]::before {
  content: "\F5D5";
}
.btn-fullscreen::before {
  content: "\F3DF";
}
.btn-fullscreen-exit::before {
  content: "\F3DE";
}
.btn-checkbox::before {
  content: "\F584";
}
.btn-checkbox-checked::before {
  content: "\F26C";
}
.btn-print::before {
  content: "\F501";
}
.btn-report::before {
  content: "\F444";
}
.btn-image-edit::before {
  content: "\F4B1";
}
.btn-folder::before {
  content: "\F3D7";
}
.btn-folder-plus::before {
  content: "\F3D3";
}
.btn-folder-minus::before {
  content: "\F3D2";
}
.btn-folder-x::before {
  content: "\F3D6";
}
.btn-slash::before {
  content: "\F56A";
}
.btn-process::before {
  content: "\F2D6";
}
.btn-list::before {
  content: "\F1B3";
}
.btn-mosaic::before {
  content: "\F2CD";
}

.hover:not(table) {
  background-color: white;
  transition: background-color .3s;
}
.hover:not(table):hover {
  background-color: whitesmoke;
}


ul.list {
  padding: 0;
  list-style: none;
}

input[type='checkbox'].w-100 {
  width: 100%;
  margin: 0;
  padding: 0;
}

input[type="password"],
input[type="text"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="file"] {
  padding: .6rem .8rem;
  border: 2px solid #ECEFF1;
  border-radius: 3px;
  background-color: white;
  color: dimgray;
  box-sizing: border-box;
  letter-spacing: .5px;
  width: 100%;
  outline: 0;
  font-family: inherit;
  min-width: 70px;
  font-size: 1em;
}
input[type="password"]:autofill,
input[type="text"]:autofill,
input[type="search"]:autofill,
input[type="number"]:autofill,
input[type="file"]:autofill,
input[type="url"]:autofill,
input[type="email"]:autofill {
  background: white;
}
input[type="password"]:placeholder,
input[type="text"]:placeholder,
input[type="search"]:placeholder,
input[type="date"]:placeholder,
input[type="number"]:placeholder,
input[type="file"]:placeholder,
input[type="url"]:placeholder,
input[type="email"]:placeholder {
  color: lightgray;
}

input[type="password"].small,
input[type="text"].small,
input[type="search"].small,
input[type="date"].small,
input[type="number"].small,
input[type="file"].small,
input[type="url"].small,
input[type="email"].small {
  padding: .3rem .5rem;
}

input[type="password"].clear,
input[type="text"].clear,
input[type="search"].clear,
input[type="date"].clear,
input[type="number"].clear,
input[type="file"].clear,
input[type="url"].clear,
input[type="email"].clear {
  margin: 0;
  border: 0;
}

input[type="password"]:disabled,
input[type="text"]:disabled,
input[type="search"]:disabled,
input[type="number"]:disabled,
input[type="date"]:disabled,
input[type="file"]:disabled,
input[type="url"]:disabled,
input[type="email"]:disabled {
  cursor: not-allowed;
  background-color: whitesmoke;
}

input:hover[readonly],
input:focus[readonly] {
  cursor: default;
}

input[readonly=""] {
  background-color: ghostwhite;
  user-select: none;
  cursor: default;
}

input:hover[cardlink],
input:focus[cardlink] {
  cursor: default;
}

input[cardlink=""] {
  background-color: ivory;
}

textarea[cardlink=""] {
  background-color: ivory;
}

textarea {
  font-family: sans-serif;
  font-size: 1em;
  padding: .6rem .8rem;
  border: 2px solid #ECEFF1;
  border-radius: 3px;
  background-color: white;
  color: dimgray;
  box-sizing: border-box;
  letter-spacing: .5px;
  outline: 0;
  width: 100%;
  max-width: 100%;
  min-width: min-content;
}
textarea:hover, textarea:focus {
}
textarea.small {
  padding: .3rem .5rem;
}
textarea.clear {
  margin: 0;
  border: 0;
}

input:focus-visible {
  outline: none;
}

.form-text-row,
.field-type-text,
.field-type-multilink,
.field.field-edit {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: start;
  gap: .5rem;
}
.form-text-row > input,
.field-type-text > input,
.field-type-multilink > input,
.form-text-row > textarea,
.field-type-text > textarea,
.field.field-edit > input,
.field.field-edit > textarea {
  flex: 1;
}

.modal-overlay-login_samira {
  background-color: rgba(0,0,0,.8);
}
.modal-login_samira {
  box-shadow: 0px 0px 50vw 0 #263238;
  width: 20rem;
}
.modal-login_samira > h3 {
  margin-top: 0;
  margin-bottom: 2rem;
}
.modal-login_samira label > span {
  display: block;
  margin-bottom: .5rem;
  color: dimgray;
}

.password-container {
  position: relative;
}

.password-eye-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2em;
}

body > nav {
  padding: .5rem 2rem;
  background-color: white;
  margin: 0;
  box-shadow: 3px 3px 10px -5px gray;
  position: relative;
  z-index: 3000;
}

.alerts {
  display: flex;
  flex-flow: row wrap;
  gap: 1rem;
}
.alert {
  padding: 1rem 1.2rem;
  border-radius: 3px;
  box-shadow: var(--light-shadow)
}
.alert.small {
  padding: .6rem .8rem;
}
.alert.block {
  width: 100%;
  flex-basis: 100%;
}
.alert-info {
  background-color: whitesmoke;
  color: black;
}
.alert-success,
.alert.success {
  background-color: #dfd;
}
.alert.alert-warn {
  background-color: #e9967a5c;
}
.alert.alert-error,
.alert.alert-danger {
  background-color: var(--error-color);
  color: white;
}

.samira-badge {
  display: inline-block;
  user-select: none;
  margin-left: .3rem;
  margin-right: .3rem;
  border-radius: 3px;

  i.icon {
    margin: 0;
    padding: 0;
  }

  &[type='success'] {
    color: var(--success-color-text);
    background-color: var(--success-color);

    i.icon::before {
      color: var(--success-color);
    }
    &:has(i.icon) {
      background-color: var(--error-color-text);
    }
  }
  &[type='action'] {
    color: var(--action-color-text);
    background-color: var(--action-color);

    i.icon::before {
      color: var(--action-color);
    }
    &:has(i.icon) {
      background-color: var(--action-color-text);
    }
  }
  &[type='danger'] {
    color: var(--error-color-text);
    background-color: var(--error-color);

    i.icon::before {
      color: var(--error-color);
    }
    &:has(i.icon) {
      background-color: var(--error-color-text);
    }
  }
}

#modal_query_tool {
  width: 800px;
}

.querytool-row {
  margin-bottom: 1rem;
  border-bottom: 1px dotted gray;
  padding-bottom: 1rem;
}
.querytool-row:last-of-type {
  margin-bottom: 0;
  border-bottom: 0;
  padding-bottom: 0;
}
#query_tool .loader {
  background-image: url("../images/loader.gif");
  height: calc(100% - 4rem);
  width: calc(100% - 4rem);
  position: absolute;
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(255,255,255,.8);
}

.select-terms  {
  width: calc(600px - 4rem);
}
@media (max-width: 600px) {

  .select-terms  {
    width: calc(100vw - 4rem);
  }
}
.select-terms-list {
  height: 50vh;
  overflow: auto;
  padding-right: 18px;
  transition: all .5s;
}
.select-terms-list > div {
  padding: .2rem .5rem;
  cursor: pointer;
  border-radius: 3px;
  color: dimgray;
}
.select-terms-list > div:hover {
  background-color: whitesmoke;
  color: black;
}

#wrapper {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 6fr;
  grid-gap: 1rem;
  min-height: 100vh;
  margin-right: 1rem;

  #content {
    padding: 1rem;
  }
}
main {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 6fr;
  min-height: 100vh;
  width: 100vw;

  article {
    display: flex;
    flex-flow: column;

    > header {
      margin-bottom: 2rem;
    }
    > nav {
      padding: .5rem 1.5rem .5rem 2vw;
      background: rgb(255,255,255);
      z-index: 99;
    }
    > .content {
      flex-grow: 1;
      padding: 1vw;
      box-shadow: var(--inset-shadow);
      border-radius: 5px 0 0 5px;
      margin-right: 0;
      background-color: whitesmoke;

      header {
        margin: 0 .5rem 1rem 0;
      }

      header > h2 {
        font-size: 1.6em;
        margin: 0;
      }

      #principale {
        background-color: white;
        padding: 1vw;
        border-radius: 5px;
        box-shadow: 3px 3px 10px -5px lightgray;
      }
    }
    > footer {
      display: flex;
      flex-flow: column;
      gap: 1rem;
      padding: .5rem 1.5rem .5rem 1rem;

      .samira-version {
        text-align: center;
      }
    }
  }
}
#sidemenu {
  z-index: 999;

  > * {
    margin: .5rem !important;
  }

  .menu-header {
    margin-bottom: 1rem;
  }
  .menu-header > div {
    margin: 0 .5rem;
    padding: .5rem;
    display: flex;
    align-items: center;
  }
  .menu-header a {
    padding: 0;
  }

  > details {
    border-radius: 5px;
    /* overflow: hidden; */
    box-shadow: var(--shadow);
    background-color: white;
    transition: all .3s;
  }
  > details > summary {
    background-color: var(--primary-color);
    color: white;
    padding: .5rem;
    user-select: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    transition: all .3s;
  }
  > details > summary:hover {
    background-color: var(--primary-color-hover);
  }
  > details[open] > summary {
    background-color: var(--primary-color-active);
  }
  details > summary::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    margin-left: auto;
  }
  details[open] > summary::after {
    content: "\F286";
  }
  > details > summary > span {
    margin: 0 .5rem;
  }
  > details > ul {
    list-style: none;
    padding: 0 0 .5rem 0;
    margin: 0;
  }
  .menu-item a,
  .menu-item button {
    background-color: white;
    padding: .2rem 1rem;
    display: block;
    user-select: none;
    padding-left: 2rem;
    color: #3E3E3E;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
  }
  .menu-item a:hover,
  .menu-item button:hover {
    background-color: whitesmoke;
    color: black;
  }
  .menu-item.selected a,
  .menu-item.selected button {
    color: black;
    background-color: #DBDBDB;
    cursor: default;
  }
  details > summary::before {
    font-family: "bootstrap-icons";
    width: 1rem;
    text-align: center;
    font-size: 16px;
  }
  details#menunavigazione > summary::before {
     content: "\F425";
  }
  details#menuricerca > summary::before {
     content: "\f52A";
  }
  details#menuschede > summary::before {
     content: "\f227";
  }
  details#menuscheda > summary::before {
     content: "\f227";
  }
  details#menuparagrafi > summary::before {
     content: "\f2EB";
  }
  details#menuutils > summary::before {
     content: "\f5DB";
  }
  details#menuadmin > summary::before {
     content: "\f4DA";
  }
  details#menuinteroper > summary::before {
     content: "\f3D7";
  }
  details#menuconfig > summary::before {
     content: "\f3E2";
  }
  details#menumodel > summary::before {
     content: "\f227";
  }
  @media (max-width: 1400px) {

    details > summary::before {
      content: none !important;
    }
    details > summary > i {
      display: none;
    }
    details > summary > span {
      margin-left: 0;
    }
    .menu-item a,
    .menu-item button {
      padding-left: 1rem;
    }
  }
  details ul.inner {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  details > ul > li.paragraph {
    display: flex;
    padding-left: 0;
  }
  ul > li.paragraph > a {
    padding: 0;
    display: flex;
    width: 100%;
    border-bottom: 1px solid whitesmoke;
  }
  ul > li.paragraph > a > span {
    display: flex;
    align-items: center;
    padding: .2rem;
  }
  ul > li.paragraph > a > span.mark {
    width: 2em;
    flex: 0 0 3em;
    justify-content: center;
    margin-right: .5rem;
    border-bottom: 1px solid whitesmoke;
    background-color: lightgray;
    color: black;
  }
  ul > li.paragraph > a > span.comment {
    font-size: .9em;
  }
  ul > li.paragraph.empty > a > span.mark {
    background-color: whitesmoke;
    color: gray;
  }
  ul > li.paragraph.selected > a,
  ul > li.paragraph.selected > a > span.mark,
  ul > li.paragraph.selected > a > span.comment {
    background-color: gray !important;
    color: white !important;
  }
  ul > li.paragraph.selected > a > span.mark {
    background-color: dimgray !important;
    border-bottom: 0;
  }
}


div#extender {
  margin: .5rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
div#extender i {
  font-size: 120%;
}
div#extender a {
  margin-left: 2%;
  height: auto;
  color: black;
  font-size: 100%;
  padding: 0;
}
button {
  border-width: 0;
}

#modal_personalize {
  width: 350px;
  height: auto;
}
.personalize {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.personalize .options {
  min-height: 110px;
}
.personalize .option {
  display: flex;
  align-items: center;
  user-select: none;
  justify-content: space-between;
}
.personalize .option.icon::after {
  font-family: "bootstrap-icons";
  width: 1rem;
  font-size: 210%;
  margin-left: auto;
  margin-right: 4%;
}
.personalize .option[data-key='menu_compact_mode'][data-value='extended']::after,
.personalize .option[data-key='menu_compact_mode'][data-value='']::after,
.personalize .option[data-key='paragraph_compact_mode'][data-value='extended']::after,
.personalize .option[data-key='paragraph_compact_mode'][data-value='']::after {
  content: "\f5D6";
}
.personalize .option[data-key='menu_compact_mode'][data-value='unextended']::after,
.personalize .option[data-key='menu_compact_mode'][data-value='']::after,
.personalize .option[data-key='paragraph_compact_mode'][data-value='unextended']::after,
.personalize .option[data-key='paragraph_compact_mode'][data-value='']::after {
  content: "\f5D5";
}
.personalize button.save-preferences {
  color: black;
  background-color: #DBDBDB;
  margin-bottom: 0;
}
.paginazione {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}
.paginazione-options a i, .paginazione-options a:hover i,
.paginazione-options a:visited i, .paginazione-options a:active i,
.paginazione-options a:link i {
  color: black;
}

repeater-list {
  display: flex;
  flex-flow: column nowrap;
  gap: .5rem;
}
.repeater-grip {
  pointer-events: none;
  opacity: .5;
}
.repeater-header {
  display: flex;
  justify-content: flex-start;
}
.repeater-wrapper {
  display: flex;
  flex-flow: column nowrap;
  gap: .5rem;
}
.repeater-item > div:first-child {
  flex-grow: 1;
  margin-right: 1rem;
}
.repeater-item {
  display: flex;
  flex-flow: nowrap;
  justify-content: space-between;
  align-items: center;
  transition: all .3s;
}
.repeater-item.dragged {
  opacity: .3;
}
.repeater-item.drag-over {
  margin-bottom: 1rem;
}
.repeater-item.drag-over::last-child {
  margin-bottom: 0;
}
.repeater-move-buttons {
  display: inline-flex;
  flex-flow: column nowrap;
}
.repeater-move-buttons > .btn.btn-icon {
  padding-top: 0;
  padding-bottom: 0;
  height: 16px;
}
.repeater-move-buttons > .btn.btn-icon::before {
  width: 24px;
  height: 16px;
  line-height: 16px;
}

#modal_helper {
  max-width: 600px;
}

select-card:not([data-small]) {
  display: block;
  min-width: 20rem;
}
select.small + .select2-container--default .select2-selection--single {
  padding: .3rem 1.5rem .3rem .5rem;
  min-height: auto;
}

input-text {
  width: 100%;
  display: inline-flex !important;
  align-items: center;
  justify-content: space-between;
  flex-flow: row nowrap;
  border: 2px solid #ECEFF1;
  background-color: white;
  border-radius: 3px;
  box-sizing: border-box;
  transition: .3s box-shadow;
}
input-text > input {
  border: 0 !important;
  background-color: transparent !important;
}
input-text:hover,
input-text:active {
  box-shadow: 0 0 0px 5px whitesmoke;
}

input-text input[readonly] ~ .input-text-clear,
input-text input[readonly] + .input-text-clear { display:none !important; }

input-search {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  flex-flow: row nowrap;
  border: 2px solid #ECEFF1;
  background-color: white;
  border-radius: 3px;
  box-sizing: border-box;
  padding-right: .4rem;
}
input-search > input {
  border: 0 !important;
  background-color: transparent !important;
  flex-grow: 1;
}

#MenuH > ol {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  height: 100%;
  align-items: center;
  gap: 1rem;
}
#MenuH a {
  color: black;
  text-transform: uppercase;
  letter-spacing: .2px;
  font-size: 16px;
}
#MenuH > ol > li {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
}


#nav_search {
  display: inline-flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: .3rem;
}
#nav_search input {
  width: 12rem;
}
#nav_card {
  display: inline-flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: .3rem;
  padding-top: 0;
  padding-left: 0;
  padding-bottom: 0;
}
#nav_card input {
  width: 6rem;
  height: 100%;
}

.form label > span {
  margin-bottom: .5rem;
  display: block;
  color: dimgray;
  margin-left: .2rem;
}

.background-info {
  background-color: whitesmoke;
}
.background-primary {
  background-color: var(--primary-color);
}
.background-secondary {
  background-color: var(--secondary-color);
}

.header {
  display: flex;
  flex-flow: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin: 1rem 0;
  position: sticky;
  top: 0;
  background-color: white;
  padding: .5rem;
}

.pagination {
  display: flex;
  flex-flow: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin: 1rem 0;
  position: sticky;
  bottom: 0;
  background-color: white;
  padding: .5rem;
}
.pagination ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-flow: nowrap;
  align-items: center;
  justify-content: center;
}
.pagination li {

}
.pagination li > span,
.pagination li > a:link {
  padding: .3rem .5rem;
  color: dimgray;
  text-decoration: none;
  line-height: 0;
  border: 2px solid transparent;
  border-radius: 5px;
  transition: all .3s;
}
.pagination > a:link:hover {
  border: 2px solid lightgray;
}
.pagination input#edit-name {
  width: 15em;
}

.label-mark {
  white-space: nowrap;
}


#samira_user {
  background-color: var(--primary-color);
  color: var(--primary-color-text);
}
#samira_user * {
  color: var(--primary-color-text);
}
#samira_user *:before {
  color: var(--primary-color-text);
}

.card {
  padding: .3rem .5rem;
  background-color: white;
  border-radius: 5px;
  box-shadow: 3px 3px 10px -5px lightgray;
  border: 2px solid #eceff1;

  &.large {
    padding: .6rem 1rem;
  }
  &.xl {
    padding: 1rem 1.4rem;
  }
  &.light {
    box-shadow: none;
    border: 0;
  }
  &.hover::hover {
    background-color: whitesmoke;
  }
}
.card.clear .select2-container--default .select2-selection--single {
  border: 2px solid transparent;
}
.card-toolbar {
  margin: -.3rem -.5rem;
  background-color: whitesmoke;
  margin-bottom: .5rem;
  padding: .5rem .5rem .3rem;
  border-bottom: 1px solid #e7e7e7;
}

.card.card-menu {
  border: 2px solid whitesmoke;
  margin: .5rem;
  padding: 0;
}
.card.card-menu h3 {
  background-color: var(--primary-color);
  padding: .5rem .8rem;
  color: white;
  font-weight: normal;
  border-radius: 3px 3px 0 0;
  margin: 0;
}
.card.card-menu h3 + * {
  padding: .5rem;
}

.badge {
  user-select: none;
  padding: .3rem .5rem;
  background-color: var(--action-color);
  color: var(--action-color-text);
  margin-left: .3rem;
  margin-right: .3rem;
  border-radius: 5px;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;

  &:has(input:checked) {
    background-color: var(--action-color-active);
    color: var(--action-color-text);
  }

  input[type='checkbox']:first-child,
  input[type='radio']:first-child {
    padding: 0;
    margin-right: .3rem;
  }
}

.table-row-actions {
  display: inline-block;
  margin-left: auto;
}


table.samira-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid lightgray;
}
table.samira-table th,
table.samira-table td {
  padding: .3rem .5rem;
  border-bottom: 1px solid lightgray;
  transition: background-color .3s;
}
table.samira-table th {
  text-align: left;
  background-color: black;
  color: white;
  border: 1px solid black;
}
table.samira-table th * {
  color: white;
}
table.samira-table tr:hover td {
  background-color: whitesmoke;
}
table.samira-table .actions {
  opacity: 0;
  transition: opacity .3s;
}
table.samira-table tr:hover .actions {
  opacity: 1;
}

.input-group {
  border: 2px solid #ECEFF1;
  border-radius: 3px;
  background-color: white;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}
.input-group input {
  border: none;
  padding: .3rem;
  text-align: right;
  appearance: textfield;
}


.tooltip-image-preview {
  max-width: 600px;
  max-height: 600px;
}
.tooltip-image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sticky {
  position: sticky;
  top: 0;
}
.sticky-bottom {
  position: sticky;
  bottom: 0;
}
.sticky-aside {
  overflow: auto;
  max-height: 100vh;
}
.sticky-aside-right {
  padding-left: .3rem;
}
.sticky-aside-left {
  padding-right: .3rem;
}

.card-details {
  display: flex;
  align-items: stretch;
  height: 100%;
  min-height: 100vh;
}
.card-details > div {
  flex: 1;
}
.card-details > aside {
  flex-basis: 15%;
}
.card-details > aside .sticky {
  margin-left: 1rem;
  max-height: 100vh;
}
.card-details > aside h3 {
  margin: 0;
  margin-bottom: 1rem;
}
.card-details > aside ul {
  padding: 0;
  margin: 0;
  list-style: none;
}
.card-details > aside ul > li > a {
  display: flex;
  align-items: start;
  gap: .5rem;
  border-bottom: 1px solid whitesmoke;
  padding: .2rem;
  font-size: .9em;
  cursor: default;
}
.card-details > aside .menu > a {
  line-height: 1.5em;
}

.card-details > aside ul > li span.comment {
  border-left: 1px solid lightgray;
  padding-left: .5rem;
}
.card-details > aside ul > li span.mark {
  flex: 0 0 1.3rem;
}
.card-details > aside ul > li span.mark.compiled,
.card-details > aside ul > li span.descrizione.compiled {
  color: black;
}
.card-details > aside ul > li:hover {
  background-color: whitesmoke;
}
.card-details > aside .menu {
  display: flex;
  flex-flow: column;
  gap: .2rem;
}
.card-details > aside .menu > a {
  padding: 0;
  color: #3E3E3E;
}

.popup-files-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 500px;
  overflow: auto;
}
.popup-files-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  background-color: whitesmoke;
  border-radius: 3px;
  margin-bottom: .3rem;
}
.popup-files-list li label {
  padding: .5rem;
}
.popup-files-list img {
  max-height: 5rem;
  width: auto;
  object-fit: contain;
}

.card-table {
  border-collapse: collapse;
  border: 1px solid lightgray;
}
.card-table thead {
  font-size: .9em;
  background-color: black;
  color: white;
  border: 1px solid black;
  position: sticky;
  top: -2rem;
}
.card-table tr:hover {
  background-color: whitesmoke;
}
.card-table th {
  font-weight: normal;
  text-align: left;
  padding: .3rem .6rem;
  white-space: nowrap;
  user-select: none;
}
.card-table td {
  text-align: left;
  padding: .3rem .6rem;
  line-height: normal;
  user-select: none;
  border-bottom: 1px solid lightgray;
}
.card-table td[data-type="ID"] {
  text-align: center;
}
.card-table td[data-type='IMAGE'] {
  padding: .2rem;
}
.card-table td[data-type='IMAGE'] img {
  height: 5rem;
  width: 100%;
  object-fit: contain;
  vertical-align: top;
}

table .field td {
  padding-top: 0.8rem;
  vertical-align: top;
}
.paragrafo.paragraphlabel td,
.subparagraphlabel td {
  padding: .8rem;
  background-color: whitesmoke;
}
.subparagraphlabel td div,
.paragrafo.paragraphlabel td div {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: bold;
}

#multiForm .field-value select-mark {
  display: inline-block;
  min-width: 15rem;
  width: 100%;
}
#multiForm .field-value input[type="text"] {
  min-width: 20rem;
  width: 100%;
}

.select2-container--default .select2-selection--multiple {
  border: 2px solid #ECEFF1;
  outline: 0;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
  border: 2px solid gray;
  outline: 0;
}
.select2-container--default .select2-selection--multiple:hover,
.select2-container--default .select2-selection--multiple:focus {
  border: 2px solid gray;
}

#modal_map {
  padding: 0;
  width: 90vw;
  height: 80vh;
  display: flex;
  flex-flow: column;
}
.modal_map_container {
  height: 100%;
}

.field-map.field-map-g3w {
  height: 20rem;
}

select-term.voc {
  position: relative;
}
select-term.voc .btn-icon::after {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: white;
  padding: 0 2px;
  border-radius: 5px;
  border: 1px solid lightgray;
  font-size: .6rem;
  pointer-events: none;
}
select-term.voc.voc-open .btn-icon::after {
  content: "VA";
}
select-term.voc.voc-close .btn-icon::after {
  content: "VC";
}

details.paragraph .mark,
div.subparagraph-view .subparagraph span.mark {
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-start;
  align-items: flex-start;
  padding: .4rem .4rem .4rem .6rem;
  margin-right: 1rem;
  width: 6rem;
  border-radius: 3px;
  letter-spacing: 1px;
  font-weight: 600;
}
div.subparagraph-view .subparagraph span.mark {
  margin: 0 1rem;
}
details.paragraph .mark .comment,
div.subparagraph-view .subparagraph span.mark .comment {
  font-weight: normal;
  margin-top: .3rem;
  font-size: .9em;
}
details.paragraph, div.subparagraph-view .summary-show-inner {
  margin-bottom: 1rem;
  border: 2px solid #e3e3e3;
  border-radius: 5px;
  margin-top: 1rem;
  box-shadow: 3px 3px 10px -5px lightgray;
  overflow: hidden;
}
div.subparagraph-view .summary-show-inner div.subparagraph {
  border-left:0 ;
  margin-top: 0;
}
details.paragraph:first-of-type, div.subparagraph-view:first-of-type {
  margin-top: 1rem;
}
details.paragraph:last-of-type, div.subparagraph-view:last-of-type {
  margin-bottom: 0;
}
details.paragraph > summary, div.subparagraph-view div.subparagraph {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: flex-start;
  padding: .1rem .3rem;
  background-color: #e3e3e3;
  border-bottom: 2px solid #e3e3e3;
}
details.paragraph > summary .padminbuttons::before {
  content: "\F282";
  font-family: "bootstrap-icons";
  margin-left: 0;
  font-size: 150%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}
details[open].paragraph > summary .padminbuttons::before {
  content: "\F286";
}
details.paragraph > summary > span.mark {
  margin-left: .5rem;
}
details.paragraph > summary > span.mark,
div.subparagraph-view div.subparagraph > .Kcol1 > span.mark  {
  background-color: var(--secondary-color);
  color: var(--secondary-color-text);
}
details.paragraph > summary > span.mark.samira-helper::after {
  color: white;
}
details.paragraph > summary > h3 {
  margin: 0;
  flex: 1;
}
details.paragraph .padminbuttons {
  display: flex;
  flex-flow: row nowrap;
  margin: 0;
}
details.paragraph .padminbuttons > * {
  margin: 0 !important;
  padding-top: 0;
  padding-bottom: 0;
}
div.paragraph-content {
  margin: .5rem 0 .6rem 0;
}
div.paragraph-content:first-child {
  padding-top: 0;
}
div.subparagraph {
  display: flex;
  align-items: center;
  padding: .3rem .3rem .3rem .3rem;
  background-color: #ededed;
  margin-top: .5rem;
  border-left: .5rem solid white;
}
div.subparagraph > .Kcol1 {
  flex-basis: 6rem;
}
div.subparagraph > .Kcol1 > span.mark {
  background-color: #d9d9d9;
  color: black;
}
div.subparagraph > .Kcol2 {
  flex: 1;
  min-width: 20em;
}
div.subparagraph > .coladmin {
  flex: 0;
  white-space: nowrap;
  display: flex;
  justify-content: space-between;
}
.subparagraph-view .coladmin > .btn-group.sort-input {
  flex-basis: 10em;
  /*
  padding-left: 1.5em;
  box-sizing: border-box;
  */
}

div.paragraph-content .field.subfield {
  border-left: .5rem solid white;
  display: flex;
  align-items: center;
  padding: .2rem .5rem .2rem .3rem;
  background-color: whitesmoke;
}
div.paragraph-content .field.subfield > .mark {
  flex-basis: 6rem;
  padding: .4rem .4rem .4rem .6rem;
  margin-right: 1rem;
}
div.paragraph-content .field.subfield > .comment {
  flex-basis: 30%;
  min-width: 10em;
  max-width: 20em;
}
div.paragraph-content .field.subfield > .value  {
  flex: 1;
}
div.field-content {
  display: flex;
  align-items: center;
  padding: .2rem .5rem .2rem .8rem;

  & .leaflet-container {
    width: 100% !important;
    height: 600px !important;
  }
}
div.subparagraph-view div.subfield {
  display: flex;
  align-items: center;
  padding: .2rem .5rem .2rem 2rem;

  & .leaflet-container {
    width: 100% !important;
    height: 600px !important;
  }
}
div.subparagraph-view div.subfield {
  padding-left: 1.3rem;
}
div.field-content > .mark {
  flex-basis: 6rem;
  padding: .4rem .4rem .4rem .6rem;
  margin-right: 1.2rem;
}
div.subparagraph-view div.subfield > .mark {
  flex-basis: 6rem;
  padding: .4rem .4rem .4rem .6rem;
  margin-right: 1rem;
}
div.field-content > .comment,
div.subparagraph-view div.subfield > .comment{
  flex-basis: 30%;
  min-width: 10em;
  max-width: 20em;
}
div.field-content > .value,
div.subparagraph-view div.subfield > .value {
  flex: 1;
}
.subparagraph-view details.paragraph, div.subparagraph-view .summary-show-inner {
  margin-top: 0;
}

details.paragraph .sort-input {
  margin-left: auto;
}
details.paragraph .sort-input input {
  max-width: 6rem;
}

@media (max-width: 360px) {

  div.field-content.field .mark,
  div.subfield.field .mark {
    display: none;
  }
  div.field-content.field > .description,
  div.subfield.field > .description {
    flex-basis: 20%;
    min-width: 5em;
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: stretch;
  margin: 1rem 0;

  > div {
    display: flex;
    flex-flow: column;
    gap: 1rem;
  }
  .card-status,
  .card-signature,
  .card-property {
    display: flex;
    flex-flow: row;
    align-items: center;
    gap: 1rem;
  }
  .card-status > div:first-child,
  .card-signature > div:first-child,
  .card-property > div:first-child {
    min-width: 5rem;
  }
  .card-status span {
    font-weight: bold;
    text-transform: uppercase;
  }
  .card-property a {
    padding: 0;
  }
}

.formatted.dark {
  padding: 1rem;
  background-color: dimgray;
  color: white;
  border-radius: 5px;
  margin: .5rem 0;
  white-space: break-spaces;
}

.samira-table {

  thead th {
    color: black;
    border-top: 1px solid black !important;
    border-bottom: 1px solid black !important;
  }

  .samira-table-paging {

    > span {
      display: inline-flex;
      flex-flow: row nowrap;
      align-items: center;
      gap: .3rem;
    }
    .paginate_button {
      padding: .4rem .6rem;
      display: inline-block;
      border-radius: 3px;
      border: none;
      cursor: pointer;
      color: black;
    }
    .paginate_button.disabled {
      visibility: hidden !important;
    }
    .paginate_button:hover {
      background-color: whitesmoke;
    }
    .paginate_button.current {
      background-color: dimgray;
      color: white;
    }
    .paginate_button.current:hover {
    }
  }
}

input-toggle {
  cursor: pointer;
  display: inline-block;

  &::after {
    display: inline-block;
    font-family: "bootstrap-icons";
    content: "\f5D5";
    font-size: 26px;
    color: dimgray;
    transition: .3s all;
    line-height: 1em;
    vertical-align: top;
  }
  &:hover::after {
    color: black;
  }
  &.checked::after {
    content: "\f5D6";
    color: green;
  }
}
label:has(> input-toggle) {
  cursor: pointer;
}

#settings {

  details {
    padding: 1rem;
    border: 1px solid transparent;
  }
  details[open] {
    background-color: whitesmoke;
    border-radius: 10px;
    box-shadow: 3px 3px 10px -5px gray;
    border: 1px solid #E8E8E8;
  }
  details > summary {
    user-select: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    transition: all .3s;
  }
  details > summary::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    margin-left: auto;
  }
  details[open] > summary::after {
    content: "\F286";
  }
}

.icon-locale {
  display: inline-block;
  width: 3rem;
  text-align: center;

  img {
    width: 2rem;
    height: 100%;
    vertical-align: top;
  }
}
.s-dropdown-content {

  button {
    padding: 0;
  }
  .icon-locale {
    width: 2rem;
  }
}

div#titolo h3 {
  padding: 0 !important;
  font-size: 1.6em;
  margin-top: 0;
}

term-translate {

  &[status=""] button::before,
  &[status="empty"] button::before {
    color: dimgray !important;
  }
  &[status="partial"] button::before {
    color: orange !important;
  }
  &[status="complete"] button::before {
    color: green !important;
  }
}


tabs-wrapper {
  display: block;

  .tabs {

    ul {
      display: inline-flex;
      list-style: none;
      padding: 0;
      margin: 0;
      margin-bottom: 2rem;
    }
    li {
      padding: .8rem 1rem;
      border-bottom: 3px solid lightgray;
      transition: border-bottom .3s;
    }
    li.selected {
      border-color: red;
    }
  }
}

s-dropdown {
  position: relative;
  display: inline-block;

  &[aria-expanded="true"] > .s-dropdown-area {
    background-color: var(--primary-color-active);
  }

  .s-dropdown-content {
    position: absolute;
    z-index: 9999;
    opacity: 0;
    background-color: white;
    border-radius: 3px;
    padding: 1rem;
    box-shadow: 3px 3px 15px -5px gray;
    box-sizing: border-box;
  }
}
.dropdown-overlay {
  background-color: rgba(0,0,0,.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

smr-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 2fr));
  gap: 1rem;
  grid-auto-flow: dense;
}

.samira-widget {
  position: relative;
  background-color: white;
  display: flex;
  flex-flow: column nowrap;
  gap: 1rem;

  .widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .widget-title {
    margin: 0;
  }
  .widget-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: flex-end;
  }
}

.btn:hover,
.btn:focus {
  background-color: whitesmoke;
  border: 2px solid lightgray;
}
.btn-icon {
  border: none;
  padding: .3rem;
}
.btn-icon:hover,
.btn-icon:focus {
  background-color: lightgray;
  border: none;
  border-radius: 5px;
}
.btn-icon::before {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-origin: content-box;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% auto;
}
.btn-icon.as-font::before {
  width: 1em;
  height: 1em;
}
.btn-preview::before {
  content: "";
  background-image: url(../images//search.svg);
}
td .btn-icon {
  margin-top: 0;
  margin-bottom: 0;
  margin-left: 0;
}
td .btn-icon:last-of-type {
  margin-right: 0;
}

#login {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
  justify-content: center;

  aside {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 40vw;
    background-color: whitesmoke;
    box-shadow: 3px 3px 15px -5px gray;

    #logo img {
      height: 10rem;
    }
  }
  article {
    width: 50vw;
    margin-right: 10vw;
    padding: 1rem;
    box-sizing: border-box;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

table.results {
  border: 1px solid #dddddd;
  width: 100%;
  margin: 1rem 0;
  border-radius: 3px;

  th, td {
    padding: .3rem .4rem;
    vertical-align: middle;
    min-height: 3rem;
  }

  thead > tr {
    background-color: #bbbbbb;
  }
  th {
    color: white;
    background-color: var(--secondary-color);
    padding: .3rem .4rem;
    box-sizing: border-box;
    border-radius: 3px;
    font-weight: normal;

    a {
      color: var(--secondary-color-text);
    }
    &.sortable,
    &.sortable {
      background-image: none;
      padding-right: 0;

      &.sorted {
        background-color: var(--action-color);
      }
      a {
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
      &.order1 a::after,
      &.order2 a::after {
        display: inline-block;
        font-family: bootstrap-icons !important;
        font-style: normal;
        font-weight: normal !important;
        font-variant: normal;
        text-transform: none;
        line-height: 1;
        vertical-align: -.125em;
        font-size: 24px;
        cursor: pointer;
        color: white;
        width: 24px;
        height: 24px;
        background-origin: content-box;
        background-position: center;
        background-repeat: no-repeat;
        background-size: 100% auto;
      }
      &.order1 a::after {
        content: "\F145";
      }
      &.order2 a::after {
        content: "\F124";
      }
    }
  }
  th.sortable-minwidth a {
    background-image: url(../images//arrow_off.png);
    text-align: left;
    width: 42px;
    font-weight: bold;
  }
  th.sortable-tablewidth a {
    background-image: url(../images//arrow_off.png);
    background-position: center right;
    text-align: left;
    font-weight: bold;
  }
  th.sortable-tablewidth {
    background-image: url(../images//arrow_off.png);
    background-position: center right;
    text-align: left;
    width: 200px;
  }
  tr.odd {
    background-color: #f0f0f0;
  }
  tr.even {
    background-color: #ffffff;
  }
  tr.over {
    background-color: var(--row-hover);
  }
}

.setting {
  padding: 0.3rem .8rem;

  &.custom {
    background-color: var(--row-hover);
  }
}


.jcrop-stage.jcrop-image-stage {
  max-width: 100%;

  img {
    max-width: 100%;
  }
}


.hover-trigger {

  .hover-trigger-show {
    opacity: 0;
    transition: all .3s;
  }

  &:hover {

    .hover-trigger-show {
      opacity: 1;
    }
  }
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.grip {
  pointer-events: none;
  cursor: move;
}

s-thumbnail {
  display: inline-block;
  position: relative;

  img {
    width: 100%;
    height: 100%;
  }

  &[size='sml'] {
    width: 250px;
    max-width: 250px;
    max-height: 250px;

    > img {
      max-height: 250px;
      object-fit: cover;
    }
  }
  &[size='sml']:is(.invisible) {
    height: 250px;
  }
  &[size='med'] {
    width: 500px;
    max-width: 500px;
    max-height: 500px;

    > img {
      max-height: 500px;
      object-fit: cover;
    }
  }
  &[size='med']:is(.invisible) {
    height: 500px;
  }
  &[size='lrg'] {
    width: 1000px;
    max-width: 1000px;
    max-height: 1000px;

    > img {
      max-height: 1000px;
      object-fit: cover;
    }
  }
  &[size='med']:is(.invisible) {
    height: 500px;
  }

  &.square {
    display: inline-block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;

    &[size='sml'] {
      width: 250px;
      height: 250px;
    }
    &[size='med'] {
      width: 500px;
      height: 500px;
    }

    &:after {
      content: "";
      display: block;
      padding-bottom: 100%;
    }
    .content {
      position: absolute;
      width: 100%;
      height: 100%;

      img {
        object-fit: cover;
        transition: all .3s;
      }
    }
    &:hover {

      .content img {
        transform: scale(110%);
        box-shadow: 3px 3px 15px -5px black;
      }
    }
  }
}

.thumbnail {
  width: 100%;
  display: inline-block;
  padding: 0;

  img {
    width: 100%;
    height: 100%;
  }
  &.small,
  &[size='sml'] {
    max-width: 250px;
    max-height: 250px;
  }
  &.medium,
  &[size='med'] {
    max-width: 500px;
    max-height: 500px;
  }
}
img.thumbnail {
  object-fit: none;
  object-position: top center;
}

.thumbnail.square {
  display: inline-block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;

  &:after {
    content: "";
    display: block;
    padding-bottom: 100%;
  }
  .content {
    position: absolute;
    width: 100%;
    height: 100%;

    img {
      object-fit: cover;
      transition: all .3s;
    }
  }
  &:hover {

    .content img {
      transform: scale(110%);
      box-shadow: 3px 3px 15px -5px black;
    }
  }
}

.folder-tree {
  background-color: whitesmoke;
  padding: .3rem;
}
.jqtree_common.jqtree-folder {
  padding: 0;
}
.jqtree_common.jqtree-tree {
  margin: 0;
}
.jqtree_common > * {
  margin-top: .1rem;
  margin-bottom: 0.1rem;
  margin-right: .5rem;
  padding: 0;
}
.jqtree-title.jqtree_common.jqtree-title-button-left {
  margin-left: calc(18px + .5rem);
}
a + .jqtree-title.jqtree_common.jqtree-title-button-left {
  margin-left: 0;
}
ul.jqtree-tree li.jqtree-selected > .jqtree-element,
ul.jqtree-tree li.jqtree-selected > .jqtree-element:hover {
  background-color: whitesmoke;
  background: none;
  text-shadow: none;
}
.jqtree_common.jqtree-selected {
  background-color: var(--row-hover);
}


.grid-stack-item-content {
  padding: 1rem;
  background-color: white;
  border-radius: 5px;
  box-shadow: 3px 3px 10px -5px lightgray;
  border: 2px solid #e3e3e3;
}

s-progress {
  display: block;
  width: 100px;
  height: 30px;
  background-color: white;
  border-radius: 10px;
  border: 3px solid lightgray;
  overflow: hidden;
  position: relative;

  &[progress='error'] .bar {
    background-color: red;
    width: 100%;
  }

  div {
    height: 100%;
    position: absolute;
    box-sizing: border-box;
  }
  .bar {
    background-color: #85E985;
    border: 3px solid white;
    border-radius: 8px;
    width: var(--progress);
    transition: width 2s ease-in-out;
  }
  .text {
    width: 100%;
    text-align: center;
    cursor: default;
  }

  &.small {
    width: 80px;
    height: 20px;
    border-radius: 8px;
    border-width: 2px;

    .bar {
      border-width: 2px;
      border-radius: 6px;
    }
  }
}


.toastify.on {
  padding: 1rem 1.2rem;
  font-size: 14px;
  border-radius: 5px;
  color: white;
  font-weight: bold;
  box-shadow: 3px 3px 20px -10px black;

  &.info {
    background: var(--primary-color);
  }
  &.success {
    background: #208420;
  }
  &.warn {
    background: orange;
  }
  &.error {
    background: tomato;
  }

  button {
    color: white;
    opacity: 1;
    margin-left: 1rem;
    background-color: white;
    color: black;
    border-radius: 100%;
    height: 1.6rem;
    width: 1.6rem;
    font-size: 16px;
  }
}

fieldset:has(legend) {
  border: 2px solid #DDD;
  padding: 1rem;
  border-radius: 5px;

  legend {
    padding: 0 1em;
    margin-left: -.6em;
    font-weight: bold;
    color: gray;
    font-size: 1.2em;
  }
}

s-select {
  display: inline-block;
}

.choices {
  font-size: 1em;
}
.choices__inner {
  background-color: white;
  border: 1px solid #cccccc;
  padding: .6rem 1.6rem .6rem .8rem;
  border-radius: 3px;
  height: auto;
  line-height: normal;
  box-sizing: border-box;
  min-height: auto;
  font-size: inherit;
}
.choices__list--single {
  display: inline-block;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}
.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
  font-size: 1em;
  white-space: nowrap;
}
.choices__list--dropdown .choices__item:empty,
.choices__list[aria-expanded] .choices__item:empty {
  line-height: 1em;
  min-height: 1em;

  &:before {
    content: 'Nessuna selezione';
    color: lightgray;
  }
}
.choices__list--multiple .choices__item {
  border-radius: 3px;
  padding: 4px 10px;
  font-size: 1em;
  background-color: var(--primary-color);
  border: none;
  color: var(--primary-color-text);
}

.choices[data-type="select-multiple"] input.choices__input,
.choices[data-type="text"] input.choices__input {
  background-color: white;
  font-size: 1em;
  border: 0;
  padding: 0;
  margin: 0;
}

.dt-info {
  color: dimgray;
  font-size: .9em;
}

.dt-search {
  padding: .3rem .5rem;
  max-width: 200px;
  justify-self: right;
}

.dt-search input {
  padding: .3rem .5rem;
  max-width: 200px;
  justify-self: right;
}

.dt-paging > nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.dt-paging button.disabled {
  visibility: hidden;
}
.dt-paging-button {
  background: none;
  border-radius: 3px;
  padding: .3rem !important;
  min-width: 1.5rem;
  height: 1.5rem;
  line-height: 0;
  width: auto !important;
  text-align: center !important;
}

.dt-button.buttons-colvis {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 0.25rem;
  transition: background-color 0.3s ease;
}
.dt-button.buttons-colvis:hover {
  background-color: var(--secondary-color-hover);
}

div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button.current:hover {
  border-bottom: 2px solid var(--primary-color);
  background: none;
  color: dimgray;
}
div.dt-container .dt-paging .dt-paging-button:hover {
  border: none;
  border-bottom: 2px solid var(--primary-color-hover);
  background: var(--primary-color);
  color: dimgray;
}

.s-datatable {
  display: flex;
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  overflow: hidden;
}

.s-datatable table {
  width: 100%;
  border-collapse: separate;
  border-radius: 12px;
  overflow: hidden;
  font-family: sans-serif;
  font-size: 14px;
  background: white;
}

.s-datatable thead tr:first-child th:first-child {
  border-top-left-radius: 12px;
}
.s-datatable thead tr:first-child th:last-child {
  border-top-right-radius: 12px;
}
.s-datatable tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}
.s-datatable tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

.s-datatable thead {
  background: var(--primary-color);
  color: white;
  text-transform: uppercase;
}

.s-datatable thead th {
  padding: 12px;
  text-align: left;
}

.s-datatable tbody tr:nth-child(even) {
  background-color: #f8f8f8;
}

.s-datatable tbody td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.workflow-controls {
  margin-bottom: 0.3rem;
  padding-bottom: 0.3rem;
}

.workflow-controls-inner {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #ddd;
}


s-button {
  display: inline-block;

  button {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: start;
    gap: .5rem;
    padding: 5px .6rem 5px .6rem;

    svg {
      filter: invert(1);
    }
    &.button:disabled,
    &.button:disabled:hover {
      background-color: var(--action-color);
      color: var(--action-color-text);
      border: none;
      cursor: not-allowed;
    }
  }
  .button-loader {
    opacity: 0;
    transition: opacity .3s;
    height: 24px;
    width: 24px;
    transition: .3s all;
  }
  &:has(.button-loader) button {
    padding: .3rem 1rem;
  }
  &[loading] button {
    background: var(--primary-color);
    color: var(--primary-color-text);
  }
  &[success] button {
    background-color: var(--success-color);
    color: var(--success-color-text);
  }
  &[error] button {
    background: var(--error-color);
    color: var(--error-color-text);
  }
}
.s-overlay {
  background-color: rgba(0,0,0,.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
}

.model-field-type-p {
  background-color: #71B340;
}
.model-field-type-k {
  background-color: #FFDD4A;
}
.model-field-type-c,
.model-field-type-s {
  background-color: white;
}

.missing-image-placeholder {
  background-image: url(/samira/images/image-placeholder.png);
  display: inline-block;
  min-height: 100px;
  min-width: 150px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.toast-success {
  border-left: 5px solid var(--success-color-accent);
  background-color: var(--success-color);
  color: var(--success-color-text);
}
.toast-error {
  border-left: 5px solid var(--error-color-accent);
  background-color: var(--error-color);
  color: var(--error-color-text);
}
.toast-info {
  border-left: 5px solid var(--info-color-accent);
  background-color: var(--info-color);
  color: var(--info-color-text);
}
.toast-warning {
  border-left: 5px solid var(--warn-color-accent);
  background-color: var(--warn-color);
  color: var(--warn-color-text);
}
.link-style {
  color: var(--link-text);
  text-decoration: underline;
  cursor: pointer;
}
.link-style:hover {
  color: var(--link-text-hover);
}

.button-container .leaflet-pm-actions-container .leaflet-pm-action {
  padding: 0 10px !important;
  background-color: #666 !important;
  color: #fff !important;
  display: inline-block !important;
  width: auto !important;
  border-right: 1px solid #eee !important;
  user-select: none;
  border-bottom: none;
  height: 29px !important;
  line-height: 29px !important;
  vertical-align: middle;
}
.leaflet-bar a {
  background-color: #fff;
  border-bottom: 1px solid #ccc;
  width: 26px !important;
  height: 26px !important;
  line-height: 26px !important;
  display: block !important;
  text-align: center;
  text-decoration: none !important;
  color: black !important;
}

.leaflet-control-geosearch.leaflet-geosearch-bar form {
  position: relative;
  display: flex;
  align-items: center;
  height: 2.2rem;
  overflow: visible;
}

.leaflet-control-geosearch.leaflet-geosearch-bar input.glass {
  flex: 1;
  border: none;
  padding: 0 2.5rem 0 0.6rem;
}

.leaflet-control-geosearch.leaflet-geosearch-bar button.reset {
  position: absolute;
  top: 0.3rem;
  right: 0.4rem;
  width: 1.6rem;
  height: 1.6rem;
  line-height: 1.6rem;
  padding: 0;
  background: none;
  border: none;
  color: #333;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
}

.leaflet-control-geosearch.leaflet-geosearch-bar input.glass:not(:placeholder-shown) + .reset {
  display: block;
}

.leaflet-control-geosearch.leaflet-geosearch-bar .results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ccc;
}

.anchor {
  width: 0;
  height: 0;
  display: block;
}



dl {
  display: grid;
  grid-template-columns: 1fr 15fr;
  grid-template-rows: auto;
  grid-gap: .5rem;
  margin: 0;

  dt {
    font-weight: bold;
  }
  dd {
    white-space: break-spaces;
  }
}

.mosaic-tiles-wrapper {
  display: flex;
  flex-flow: row wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 1rem;
  position: relative;

  &.loading {
    opacity: 0.5;
    transition: opacity 0.2s ease-in-out;
  }
  & > s-card-preview {
    flex: 1 0 300px;
    min-width: 300px;
    max-width: 500px;
    background: whitesmoke;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.4s, box-shadow 0.2s;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  & > s-card-preview .card-preview {
    gap: 0 !important;
  }
  & > s-card-preview .card-preview-image {
    width: 100%;
    height: 300px;
    object-fit: contain;
    display: block;

    s-thumbnail {
      display: block;
    }
    img {
      width: 100%;
      height: 300px;
      object-fit: cover !important;
    }
  }
  & > s-card-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  & > s-card-preview .card-preview {
    gap: 0;
  }
  & > s-card-preview .card-preview-title {
    padding: 1rem;
  }
  & > s-card-preview .card-preview-description {
    padding: 16px 16px 16px 16px;
    font-size: 14px;
    line-height: 1.4;
  }
  & > s-card-preview .select-indicator {
    position: absolute;
    top: 8px; right: 8px;
    width: 20px; height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    background: white;
    display: none;
  }
  & > s-card-preview.selected {
    opacity: 0.3;
    transition: opacity 0.2s;
  }
  &.select-mode > s-card-preview .select-indicator {
    display: block;
  }
}

.mosaic-wrapper {
  display: flex;
  position: relative;
  align-items: start;
  justify-content: space-between;
  gap: 2rem;

  .mosaic-facets {
    flex: 0 0 20%;
    min-width: 200px;
    max-width: 300px;
  }
  .mosaic-facet {
    border-bottom: 1px dotted gray;
    padding-top: .5rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }


}

.mosaic-facet .facet-list {
  list-style: none;
  margin: 0;
  padding: 0;

  li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    text-wrap: auto;
    cursor: pointer;
    padding: .2rem .3rem;
    transition: all .3s;

    &:hover {
      background-color: whitesmoke;
    }

    span::before {
      content: "(";
    }
    span::after {
      content: ")";
    }
  }
}

.mosaic-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.mosaic-selected-facets {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.selected-facet-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 8px;
}

.selected-facet-list li {
  display: inline-block;
  padding: 4px 8px;
  background: #ddd;
  border-radius: 4px;
}

.remove-facet {
  margin-left: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.btn-clear-facets {
  background: #d9534f;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-clear-facets:hover {
  background: #c9302c;
  color: white;
}

.card-preview-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.view-toggle {
  text-align: right;
  margin: 1em;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
  }
.selection-counter {
  text-align: end;
  margin-top: 5px;
}

s-field-video {
  width: 100%;
  display: inline-block;

  video {
    width: auto;
    height: auto;
    max-width: 500px;
  }
}

.oaiform-section {
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s, max-height 0.6s ease;
 }

.oaiform-section.show {
  opacity: 1;
  visibility: visible;
  max-height: 500px;
  transition: opacity 0.6s ease, visibility 0s linear 0s, max-height 0.6s ease;
 }

.sim-group {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #ddd;
}
.sim-group:last-child {
  border-bottom: none;
}

dialog {
  padding: 2rem;
  background: white;
  border: none;
  border-radius: 5px;
  box-shadow: 0 0 100px -20px gray;
  max-height: 100vh;
  overflow: auto;
  box-sizing: border-box;

  max-height: calc(100vh - 4rem);
  max-width: calc(100vw - 4rem);
  width: 40vw;

  opacity: 0;
  transition:
    opacity 0.3s ease-out,
    overlay 0.3s ease-out allow-discrete,
    display 0.3s ease-out allow-discrete;
}
dialog.large {
  width: 60vw;
}
dialog:open {
  opacity: 1;
}
@starting-style {

  dialog:open {
    opacity: 0;
  }
}

dialog::backdrop {
  background-color: transparent;
}
dialog:open::backdrop {
  background-color: transparent;
}

dialog > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  margin-bottom: 0px;
  margin-bottom: 1rem;
}
dialog > header > h3 {
  margin: 0;
}

dialog.confirm {
  width: 30vw;
  max-width: 100vw;
  max-height: 100vh;
  overflow: auto;
}
dialog.confirm > header {
  margin: .5rem 0 2rem;
}

.z-topbar {
  position: relative;
  z-index: 3000;
  }

.language-selector s-dropdown .s-dropdown-content {
  z-index: 3100 !important;
}

.language-selector .dropdown-overlay {
  z-index: 3090 !important;
  position: fixed;
}

/* Barcode component */
s-barcode {
  display: inline-flex;
  flex-direction: column;
  gap: 0.5rem;
}

.barcode-buttons {
  display: inline-flex;
  gap: 0.25rem;
}

.barcode-preview {
  padding: 0.5rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 0.5rem;
}

.barcode-svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.collegamento-row, .cr-row { cursor: pointer; }
.collegamento-row,
.cr-row {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  padding: 6px 0px; /* opzionale */
}

.collegamento-row:hover, .cr-row:hover { background: rgba(0,0,0,0.04); }
.collegamento-row.is-empty, .cr-row.is-empty { opacity: 0.85; }

.exportprofilelinks a {
  display: block;
  padding: 8px 10px;
  text-decoration: none;
  border-radius: 8px;
}
.exportprofilelinks a:hover {
  background: rgba(0,0,0,0.06);
}

.history-mark { font-weight: bold; margin-right: 8px; }
.history-description { display: inline; font-size: 1rem; color: #333; margin: 0; }
.history-username { font-style: italic; color: #555; margin-left: 10px; }
.history-dtins { color: #888; margin-left: 10px; font-style: italic;}
.history-header { display: flex; align-items: center; gap: 8px; }

.history-reader {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-direction: row;
}

label.required-param > span::after {
  content: " *";
  color: #c00;
  font-weight: bold;
}

.card-preview {

  &.card-preview-default {
    display: flex;
    flex-flow: row wrap;
    align-items: flex-start;
    gap: 0.8vw;

    &:has(.missing-image-placeholder) {
      .card-preview-image {
        flex: 0 0 auto;
      }
    }

    .card-preview-data {
      display: flex;
      flex-flow: column nowrap;
      gap: 0.5rem;
      flex: 1 1 auto;
    }
    .card-preview-metadata {
      display: flex;
      flex-flow: column wrap;
      gap: 0.5rem;
    }
    .card-preview-metadata-item {
      display: flex;
      flex-flow: row wrap;
      gap: .8vw
    }
    .card-preview-metadata-label {
      font-weight: 600;
    }
    .card-preview-actions {
      margin-left: auto;
    }
  }
}
#tecaPopup {
  z-index: 9999999 !important;

  #searchButton {
    width: calc(90% - 40px);
  }
}

/* ===================== CPA / Proposte AI ===================== */

/* Badge di stato proposte AI sui campi (ai-badges.js) */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: .4rem;
  vertical-align: middle;
  text-decoration: none;
  position: relative;
}
.ai-badge-icon {
  width: 32px;
  height: 32px;
  display: block;
}
.ai-badge-count {
  font-size: .65rem;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  background: #b45309;
  border-radius: 999px;
  padding: 1px 5px;
  margin-left: -4px;
}
.ai-badge.ai-V .ai-badge-count { background: #15803d; }
.ai-badge.ai-R .ai-badge-count { background: #b91c1c; }
.ai-badge.ai-A .ai-badge-count { background: #2563eb; }

/* Badge di stato ingestion iPaC in testa alla scheda (ipac-ingestion-badge.js) */
.ipac-ingestion-badge {
  display: inline-block;
  margin-left: .5rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
  color: #fff;
  background: #6b7280;
}
.ipac-ingestion-badge .ipac-ingestion-fase {
  margin-left: .35rem;
  font-weight: 400;
  opacity: .85;
}
.ipac-ingestion-badge.ipac-completed { background: #15803d; }
.ipac-ingestion-badge.ipac-in-progress { background: #2563eb; }
.ipac-ingestion-badge.ipac-warning { background: #b45309; }
.ipac-ingestion-badge.ipac-failed { background: #b91c1c; }
.ipac-ingestion-badge.ipac-unknown { background: #6b7280; }
.ipac-ingestion-badge.ipac-not-transmitted { background: #9ca3af; }

/* Modale revisione proposte AI (ai-proposals.js) */
.ai-proposals-modal {
  background: #fff;
  border-radius: 10px;
  max-width: 820px;
  width: 94vw;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: system-ui, Arial, sans-serif;
  color: #1f2937;
}
.ai-proposals-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}
.ai-proposals-head h2 { font-size: 1.1rem; margin: 0; }
.ai-proposals-x {
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}
.ai-proposals-body { padding: .4rem 1rem 1rem; overflow: auto; }
.ai-proposals-empty { color: #6b7280; font-style: italic; }
.ai-proposals-table { border-collapse: collapse; width: 100%; margin-top: .6rem; }
.ai-proposals-table th,
.ai-proposals-table td {
  border: 1px solid #e5e7eb;
  padding: .45rem .55rem;
  text-align: left;
  vertical-align: top;
}
.ai-proposals-table th { background: #f9fafb; font-weight: 600; position: sticky; top: 0; }
.ai-proposals .status { font-weight: 600; }
.ai-proposals .status-I { color: #b45309; }
.ai-proposals .status-A { color: #2563eb; }
.ai-proposals .status-V { color: #15803d; }
.ai-proposals .status-R { color: #b91c1c; }
.ai-proposals .coord { color: #6b7280; font-size: .85rem; white-space: nowrap; }
.ai-proposals-actions { white-space: nowrap; }
.ai-proposals button.btn-icon {
  cursor: pointer;
  background: none;
  border: none;
  padding: .2rem .35rem;
  margin-right: .15rem;
  font-size: 1.05rem;
  line-height: 1;
}
.ai-proposals button.validate { color: #15803d; }
.ai-proposals button.reject { color: #b91c1c; }
.ai-proposals button:disabled { opacity: .4; cursor: default; }

/* Modale richiesta CPA (ai-cpa.js) */
.ai-cpa-modal {
  background: #fff;
  border-radius: 10px;
  max-width: 560px;
  width: 92vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: system-ui, Arial, sans-serif;
  color: #1f2937;
}
.ai-cpa-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}
.ai-cpa-head h2 { font-size: 1.1rem; margin: 0; }
.ai-cpa-x {
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}
.ai-cpa-body { padding: .6rem 1rem; overflow-y: auto; }
.ai-cpa-filter {
  width: 100%;
  box-sizing: border-box;
  padding: .45rem .6rem;
  margin-bottom: .5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: .9rem;
}
.ai-cpa-filter:focus { outline: none; border-color: #2563eb; }
.ai-cpa-empty { color: #6b7280; font-size: .85rem; text-align: center; padding: .6rem 0; }
.ai-cpa-list { list-style: none; margin: 0; padding: 0; }
.ai-cpa-list li { margin: .15rem 0; }
.ai-cpa-list label {
  display: block;
  padding: .5rem .6rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
}
.ai-cpa-list label:hover { background: #f9fafb; }
.ai-cpa-op-label { font-weight: 600; margin-left: .4rem; }
.ai-cpa-op-desc { display: block; color: #6b7280; font-size: .85rem; margin-left: 1.4rem; }
.ai-cpa-foot {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1rem;
  border-top: 1px solid #e5e7eb;
}
.ai-cpa-msg { flex: 1; font-size: .85rem; color: #374151; }
.ai-cpa-foot button {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 6px;
  padding: .4rem .9rem;
  cursor: pointer;
}
.ai-cpa-submit { border-color: #2563eb !important; color: #2563eb; }
.ai-cpa-submit:disabled { opacity: .4; cursor: default; }

/* Cruscotto richieste CPA (cpa-requests.jsp) */
.cpa-st { font-weight: 600; }
.cpa-st-PENDING { color: #b45309; }
.cpa-st-RUNNING { color: #2563eb; }
.cpa-st-COMPLETED { color: #15803d; }
.cpa-st-FAILED,
.cpa-st-CANCELLED { color: #b91c1c; }
.cpa-err { color: #b91c1c; font-size: .85rem; }
.cpa-muted { color: #6b7280; font-size: .85rem; }
.cpa-status-filter { margin-left: 1rem; }
.cpa-status-filter select { margin-left: .3rem; }

#wl-metadata-loader {
  margin-top: 16px;
  margin-bottom: 12px;
}