/* Style général du conteneur */
#block-theme-mc-content {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 30px 20px;
  color: #333;
  max-width: 1200px;
  margin: 0 auto;
}

/* Formulaires */
form.webform-filter-form,
form.webform-submission-bulk-form {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 25px 30px;
  margin-bottom: 40px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.05);
}

/* Détails (Filtrer les soumissions) */
details.container-inline {
  margin-bottom: 30px;
}

details summary {
  font-weight: 600;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 10px 0;
  border-bottom: 2px solid #ccc;
  color: #1a73e8;
}

details[open] summary {
  color: #155ab6;
}

/* Champs de formulaire */
.js-form-item {
  margin-bottom: 18px;
}

.form-search {
  width: 100%;
  padding: 10px 14px;
  font-size: 1rem;
  border: 1.8px solid #bbb;
  border-radius: 6px;
  transition: border-color 0.3s ease;
}

.form-search:focus {
  border-color: #1a73e8;
  outline: none;
  box-shadow: 0 0 6px rgba(26, 115, 232, 0.4);
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 1rem;
  border: 1.8px solid #bbb;
  border-radius: 6px;
  background: white;
  transition: border-color 0.3s ease;
}

.form-select:focus {
  border-color: #1a73e8;
  outline: none;
  box-shadow: 0 0 6px rgba(26, 115, 232, 0.4);
}

/* Boutons */
.button,
input.button {
  background-color: #1a73e8;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.4);
}

.button:hover,
input.button:hover {
  background-color: #155ab6;
  box-shadow: 0 4px 12px rgba(21, 90, 182, 0.6);
}

/* Bouton lien Personnaliser */
a.button.button-action {
  display: inline-block;
  margin-bottom: 40px;
  background-color: #f0f0f0;
  color: #333;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #ccc;
  transition: background-color 0.3s ease;
}

a.button.button-action:hover {
  background-color: #ddd;
}

/* Texte des soumissions */
#block-theme-mc-content > div:last-child {
  font-size: 1.1rem;
  margin-bottom: 40px;
  font-weight: 600;
  color: #555;
}

/* Tableaux */
table.webform-results-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  font-size: 0.95rem;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgb(0 0 0 / 0.1);
}

table.webform-results-table th,
table.webform-results-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: middle;
}

table.webform-results-table thead {
  background-color: #1a73e8;
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

table.webform-results-table tbody tr:hover {
  background-color: #f0f8ff;
}

table.webform-results-table th.select-all,
table.webform-results-table td.select-all {
  width: 40px;
  text-align: center;
}

.webform-results-table__icon {
  text-align: center;
  width: 40px;
}

/* Signatures images */
.webform-signature-image {
  max-height: 50px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Tables imbriqués pour bons de livraison */
table.responsive-enabled {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.9rem;
}

table.responsive-enabled th,
table.responsive-enabled td {
  padding: 8px 10px;
  border: 1px solid #ddd;
  text-align: left;
  background-color: #fafafa;
}

table.responsive-enabled thead th {
  background-color: #e2e8f0;
  font-weight: 600;
}

/* Dropbutton actions */
.webform-dropbutton-wrapper {
  min-width: 150px;
  text-align: center;
}

.webform-dropbutton ul.dropbutton {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.webform-dropbutton ul.dropbutton li {
  margin: 0;
}

.webform-dropbutton ul.dropbutton li a,
.webform-dropbutton ul.dropbutton li button {
  background: #e1e7f3;
  border: 1px solid #a0aad4;
  color: #333;
  padding: 6px 12px;
  font-size: 0.9rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.25s ease;
  text-decoration: none;
}

.webform-dropbutton ul.dropbutton li a:hover,
.webform-dropbutton ul.dropbutton li button:hover {
  background: #c7d1f5;
}

/* Responsive : ajout d'espace vertical entre les blocs dans les petits écrans */
@media (max-width: 768px) {
  #block-theme-mc-content {
    padding: 20px 10px;
  }
  form.webform-filter-form,
  form.webform-submission-bulk-form {
    padding: 20px 15px;
    margin-bottom: 30px;
  }
  table.webform-results-table th,
  table.webform-results-table td {
    padding: 10px 8px;
  }
}

/* Force la modale Webform au-dessus de tout */
.ui-dialog.webform-ui-dialog {
  z-index: 501 !important;
}

/* Important : overlay aussi */
.ui-widget-overlay {
  z-index: 500 !important;
}
