
  
  /* ================================
     Contenitore Principale
  ================================ */
  .crm-automations-wrapper {
    padding: 24px;
    background-color: var(--background);
  }
  
  .crm-automations-wrapper h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
  }
  
  /* ================================
     Layout Cards
  ================================ */
  .automation-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
  }
  
  /* ================================
     Card Automazione
  ================================ */
  .automation-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 20px;
    border: 1px solid var(--light-border);
    transition: transform 0.2s ease;
    position: relative;
  }
  
  .automation-card:hover {
    transform: translateY(-2px);
  }
  
  .automation-card h3 {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 12px;
  }
  
  .automation-card p {
    margin: 6px 0;
    font-size: 0.95rem;
    color: var(--text);
  }
  
  .automation-card p strong {
    color: var(--primary);
  }
  
  .automation-card i {
    font-size: 1.2rem;
    margin-right: 6px;
    vertical-align: middle;
  }

  .message-card-left .automation-stats {
  font-size: 0.85em;
  color: #666;
  margin-top: 4px;
}
.message-card-left .automation-stats span {
  display: block;
}

  

  /* ================================
     Pulsanti Azione Automazione
  ================================ */
  .automation-controls {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 20;
  }
  
  .automation-controls button {
    padding: 8px 16px !important;
    font-size: 14px;
    border-radius: 4px !important;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  /* Pulsante Modifica (sempre visibile) */
  .automation-controls .btn-edit {
    background-color: #007bff;
    color: white;
    z-index: 10;
    position: relative;
  }
  
  .automation-controls .btn-edit:hover {
    background-color: #0056b3;
  }
  
  /* Salva */
  .automation-controls .btn-save {
    background-color: #28a745;
    color: white;
    display: none !important;
  }
  
  .automation-controls .btn-save:hover {
    background-color: #218838;
  }
  
  /* Reset */
  .automation-controls .btn-reset {
    background-color: #ffc107 !important;
    color: #212529;
    display: none;
  }
  
  .automation-controls .btn-reset:hover {
    background-color: #e0a800 !important;
  }
  
  /* Annulla */
  .automation-controls .btn-cancel {
    background-color: #b3b3b3 !important;
    color: white;
    display: none;
  }
  
  .automation-controls .btn-cancel:hover {
    background-color: #a09f9f !important;
  }
  


  /* Pulsante ATTIVA / DISATTIVA */
  .automation-controls .btn-toggle-staus-db {
    display: none ;
    color: white;
    padding: 6px 12px;
    font-size: 0.875rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  /* Stato Disattiva (arancio) */
  .automation-controls .btn-toggle-staus-db.disattiva {
    background-color: #17a2b8;
  
  }
  .automation-controls .btn-toggle-staus-db.disattiva:hover {
    background-color: #138496;
  }
  
  /* Stato Attiva (acqua) */
  .automation-controls .btn-toggle-staus-db.attiva {
    background-color: #fd7e14;
  }
  .automation-controls .btn-toggle-staus-db.attiva:hover {
 
    background-color: #e8590c;
  }
  
  
  /* Quando in modalità modifica */
  .automation-controls.edit-mode .btn-reset,
  .automation-controls.edit-mode .btn-save,
  .automation-controls.edit-mode .btn-cancel,
  .automation-controls.edit-mode .btn-toggle-staus-db {
    display: inline-flex !important ;
  }
  
  .automation-controls.edit-mode .btn-edit {
    display: none;
  }



/* ================================
   Layout flessibile per modifica
================================ */
.edit-columns {
  display: flex;
  gap: 20px;
  width: 100%;
  flex-wrap: wrap;
}

.message-column {
  flex: 1 1 70%;
  min-width: 260px;
}

.options-column {
  flex: 1 1 25%;
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* Responsive */
@media (max-width: 768px) {
  .edit-columns {
    flex-direction: column;
  }

  .options-column {
    justify-content: flex-start;
  }
}

/* ================================
   Style di base esistente
================================ */
.automation-edit-wrapper.automation-disabled {
  pointer-events: none;
  opacity: 0.6;
  filter: blur(1px);
  transition: all 0.3s ease;
  position: relative;
}

.automation-edit-wrapper.editing {
  pointer-events: auto;
  opacity: 1;
  filter: none;
}


  

      /* ================================
        Overlay Blocker sopra l’editor
      ================================ */
      .automation-blocker {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 10;
        pointer-events: all;
        border-radius: 12px;

        /* Effetto visivo sfocato */
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        background-color: rgba(255, 255, 255, 0.3);
        transition: all 0.3s ease;
      }

      .automation-wrapper.editing .automation-blocker {
        display: none;
      }


  .is-hidden {
    display: none !important;
  }
  

  .cont-option {
    flex: 1 !important;
    background-color: #ffffff !important;
    /* border: 1px solid #e2e8f0 !important; */
    border-radius: 10px !important;
    padding: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column-reverse;
  }