/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/* 
    Created on : 10-feb-2021, 16.29.25
    Author     : daneel
*/

pre {
    overflow: auto;
    word-wrap: normal;
    white-space: pre-wrap;
    background: #eaeaea;
    padding: 2%;
}

.messaggio-segnalazioni {
    clear: both;
    padding: 12px 20px;
    background-color: #fafafa;
    border-top: 1px solid #ddd;
    overflow: hidden;
}

.messaggio-segnalazioni ul{
    list-style: disc;
    padding-left: 18px;
}

#wp-new-com-message-editor-tools{
    display: none;
}

#segnalazione_meta_box_ambito select {
    max-width: 80%;
}

table {
  border-collapse: collapse;
}

tr.stati-in-lavorazione td {
  border: 1px solid white;
  
}

tr.stati-nuova-segnalazione td {
  border: 1px solid white;
  
}

tr.stati-chiusa td {
  border: 1px solid gray;
  
}


.email-with-picker {
  display: flex;
  align-items: center;
  gap: 6px;
}
.email-with-picker .rubrica-open .dashicons {
  line-height: 1.2;
  vertical-align: middle;
  font-size: 16px;
}

/* Modal */
.rubrica-no-scroll { overflow: hidden; }
.rubrica-modal {
  position: fixed; inset: 0; z-index: 100000; /* sopra admin notices */
}
.rubrica-modal__backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.4);
}
.rubrica-modal__dialog {
  position: relative; z-index: 1;
  width: min(640px, 92vw);
  margin: 8vh auto; background: #fff; border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  display: flex; flex-direction: column; max-height: 80vh;
}
.rubrica-modal__header, .rubrica-modal__footer {
  padding: 12px 16px; border-bottom: 1px solid #e2e4e7;
}
.rubrica-modal__footer { border-top: 1px solid #e2e4e7; border-bottom: 0; }
.rubrica-modal__body { padding: 12px 16px; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
#rubricaSearch { width: 100%; }
.rubrica-list { overflow: auto; border: 1px solid #e2e4e7; border-radius: 6px; max-height: 50vh; background: #fff; }
.rubrica-item {
  width: 100%; text-align: left; border: 0; background: #fff; padding: 12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  border-bottom: 1px solid #f0f0f1;
  transition: background-color 0.2s;
}
.rubrica-item:last-child { border-bottom: 0; }
.rubrica-item:hover { background: #f6f7f7; }
.rubrica-item-main {
  display: flex; flex-direction: column; gap: 4px;
}
.rubrica-item strong {
  font-weight: 600;
  font-size: 15px;
  color: #23282d;
}
.rubrica-email {
  color: #2271b1;
  font-family: monospace;
  font-size: 13px;
}
.rubrica-item-details {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f1;
  font-size: 12px;
  color: #646970;
  line-height: 1.6;
}
.rubrica-detail {
  display: inline-block;
  margin-right: 12px;
}
.rubrica-detail strong {
  font-weight: 600;
  color: #50575e;
  font-size: 12px;
}
.rubrica-empty { padding: 20px; color: #646970; text-align: center; }
.rubrica-modal__header { display: flex; justify-content: space-between; align-items: center; }
.rubrica-modal__header .rubrica-close {
  font-size: 20px; line-height: 20px; padding: 4px 8px; cursor: pointer;
}

/* Galleria Allegati Segnalazioni */
.dms-attachments-gallery {
  margin-bottom: 20px;
}

.dms-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.dms-gallery-item {
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  background: #fff;
}

.dms-gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.dms-gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.dms-gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dms-gallery-item:hover .dms-gallery-overlay {
  opacity: 1;
}

#dms-image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 100000;
  align-items: center;
  justify-content: center;
}

#dms-image-modal > div {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#dms-modal-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

#dms-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  padding: 5px 15px;
  z-index: 100001;
  line-height: 1;
  transition: color 0.2s;
}

#dms-modal-close:hover {
  color: #f0f0f1;
}

#dms-modal-prev,
#dms-modal-next {
  position: absolute;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 15px 20px;
  border-radius: 4px;
  z-index: 100001;
  transition: background 0.2s;
  top: 50%;
  transform: translateY(-50%);
}

#dms-modal-prev {
  left: -70px;
}

#dms-modal-next {
  right: -70px;
}

#dms-modal-prev:hover,
#dms-modal-next:hover {
  background: rgba(255,255,255,0.3);
}

#dms-modal-info {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  text-align: center;
  background: rgba(0,0,0,0.5);
  padding: 8px 16px;
  border-radius: 4px;
}

.dms-other-files {
  margin-top: 30px;
}

.dms-other-files .dashicons {
  flex-shrink: 0;
}