.mabible-dictionary-container {
  /*max-width: 1200px;*/
  margin: 20px auto;
  padding: 20px;
  font-family: "Poppins", sans-serif;
}

/* Recherche */
.mabible-dictionary-search {
  margin-bottom: 30px;
}

.mabible-search-input-container {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 90%;
  margin: 0 auto;
  position: relative;
}

.mabible-dictionary-search-input {
  -moz-appearance: none !important;
  appearance: none !important;
  border: 1px solid #ddd !important;
  border-radius: 6px !important;
  padding: 16px 18px !important;
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif !important;
  font-size: 14px !important;
  background: white !important;
  color: #333 !important;
  box-sizing: border-box !important;
  outline: none !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  flex: 1 !important;
  min-width: 200px !important;
  transition: all 0.2s ease !important;
}

.mabible-dictionary-search-input:focus {
  border-color: #51483f;
  outline: none;
  box-shadow: 0 0 0 3px rgba(81, 72, 63, 0.1);
}

.mabible-dictionary-search-button {
  padding: 18px 19px;
  background: #51483f;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  min-width: 50px;
}

.mabible-dictionary-search-button:hover {
  background: #3d342c;
}

.mabible-dictionary-search-button .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

/* Alphabet */
.mabible-dictionary-alphabet {
  margin-bottom: 30px;
  text-align: center;
}

.mabible-dictionary-alphabet h3 {
  color: #51483f;
  font-size: 20px;
  margin-bottom: 15px;
}

.alphabet-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.alphabet-btn {
  padding: 8px 12px;
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  color: #51483f;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 40px;
}

.alphabet-btn:hover,
.alphabet-btn.active {
  background: #51483f;
  color: white;
  border-color: #51483f;
}

.alphabet-btn.show-all {
  background: #867769;
  color: white;
  border-color: #867769;
}

.alphabet-btn.show-all:hover {
  background: #51483f;
  border-color: #51483f;
}

/* Résultats */
.mabible-dictionary-results {
  min-height: 300px;
}

.dictionary-welcome {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.dictionary-welcome h3 {
  color: #51483f;
  font-size: 24px;
  margin-bottom: 10px;
}

.dictionary-loading {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.dictionary-entry {
  margin-bottom: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #51483f;
  transition: all 0.3s ease;
}

.dictionary-entry:hover {
  background: #f2e4d7;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dictionary-term {
  font-size: 20px;
  font-weight: 600;
  color: #51483f;
  margin-bottom: 10px;
  display: block;
}

.dictionary-definition {
  color: #2c3e50;
  line-height: 1.6;
  font-size: 16px;
}

.dictionary-definition p {
  margin-bottom: 10px;
}

.dictionary-definition p:last-child {
  margin-bottom: 0;
}

/* Styles pour le contenu HTML dans les définitions */
.dictionary-definition strong,
.dictionary-definition b {
  font-weight: 600;
  color: #51483f;
}

.dictionary-definition em,
.dictionary-definition i {
  font-style: italic;
  color: #6c757d;
}

.dictionary-definition u {
  text-decoration: underline;
}

.dictionary-definition small {
  font-size: 14px;
  color: #6c757d;
}

.dictionary-definition br {
  line-height: 1.8;
}

.dictionary-definition ul,
.dictionary-definition ol {
  margin: 10px 0;
  padding-left: 20px;
}

.dictionary-definition li {
  margin-bottom: 5px;
  line-height: 1.5;
}

.dictionary-definition blockquote {
  margin: 15px 0;
  padding: 10px 15px;
  border-left: 4px solid #51483f;
  background: #f8f9fa;
  font-style: italic;
}

.dictionary-definition code {
  background: #f8f9fa;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 14px;
}

/* Styles pour les liens des références bibliques */
.dictionary-definition .bible-reference-link {
  color: #51483f;
  text-decoration: none;
  font-weight: 500;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(81, 72, 63, 0.1);
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(81, 72, 63, 0.3);
}

.dictionary-definition .bible-reference-link:hover {
  background: #51483f;
  color: white;
  text-decoration: none;
  border-bottom-color: #51483f;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(81, 72, 63, 0.2);
}

.dictionary-definition .bible-reference-link:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(81, 72, 63, 0.2);
}

/* Styles pour les liens internes du dictionnaire */
.dictionary-definition .dictionary-internal-link {
  color: #867769;
  text-decoration: none;
  font-weight: 500;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(134, 119, 105, 0.1);
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(134, 119, 105, 0.3);
  cursor: pointer;
}

.dictionary-definition .dictionary-internal-link:hover {
  background: #867769;
  color: white;
  text-decoration: none;
  border-bottom-color: #867769;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(134, 119, 105, 0.2);
}

.dictionary-definition .dictionary-internal-link:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(134, 119, 105, 0.2);
}

/* Icône pour distinguer les liens internes */
.dictionary-definition .dictionary-internal-link:before {
  content: "🔍";
  font-size: 12px;
  margin-right: 2px;
  opacity: 0.7;
}

/* Pagination */
.mabible-dictionary-pagination {
  margin-top: 30px;
  text-align: center;
}

.pagination-info {
  margin-bottom: 15px;
  color: #6c757d;
  font-size: 14px;
}

.pagination-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #51483f;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
  min-width: 40px;
}

.pagination-btn:hover,
.pagination-btn.active {
  background: #51483f;
  color: white;
  border-color: #51483f;
}

.pagination-btn:disabled {
  background: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
  border-color: #dee2e6;
}

.pagination-btn:disabled:hover {
  background: #e9ecef;
  color: #6c757d;
  border-color: #dee2e6;
}

/* Messages d'erreur */
.mabible-error {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #f5c6cb;
  margin: 20px 0;
  text-align: center;
}

.dictionary-no-results {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.dictionary-no-results h4 {
  color: #51483f;
  margin-bottom: 10px;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .mabible-dictionary-container {
    padding: 15px;
    margin: 15px;
  }

  .mabible-search-input-container {
    flex-direction: column;
    gap: 12px;
  }

  .mabible-dictionary-search-input,
  .mabible-dictionary-search-button {
    width: 100%;
  }

  .alphabet-buttons {
    gap: 6px;
  }

  .alphabet-btn {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 35px;
  }

  .dictionary-entry {
    padding: 15px;
    margin-bottom: 20px;
  }

  .dictionary-term {
    font-size: 18px;
  }

  .dictionary-definition {
    font-size: 15px;
  }

  .pagination-buttons {
    gap: 6px;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 35px;
  }

  /* Autocomplétion responsive */
  .autocomplete-dropdown {
    right: 0; /* Utiliser toute la largeur sur mobile */
    left: 0;
  }

  .autocomplete-item {
    padding: 12px 16px;
    font-size: 15px;
  }
}

@media screen and (max-width: 480px) {
  .mabible-dictionary-container {
    padding: 10px;
    margin: 10px;
  }

  .alphabet-buttons {
    gap: 4px;
  }

  .alphabet-btn {
    padding: 5px 8px;
    font-size: 12px;
    min-width: 30px;
  }

  .dictionary-entry {
    padding: 12px;
  }

  .dictionary-term {
    font-size: 16px;
  }

  .dictionary-definition {
    font-size: 14px;
  }
}

/* Autocomplétion */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 50px; /* Laisser de la place pour le bouton de recherche */
  background: white;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.autocomplete-item {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: #f8f9fa;
  color: #51483f;
}

.autocomplete-item:active {
  background: #51483f;
  color: white;
}

/* Options de recherche */
.mabible-search-options {
  margin-top: 10px;
  padding: 8px 0;
}

.search-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #555;
  transition: color 0.2s ease;
}

.search-option-label:hover {
  color: #51483f;
}

.search-option-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #51483f;
  cursor: pointer;
}

.search-option-text {
  user-select: none;
  font-family: "Poppins", sans-serif;
}

/* Responsive pour les options de recherche */
@media (max-width: 768px) {
  .mabible-search-options {
    margin-top: 12px;
    padding: 10px 0;
  }

  .search-option-label {
    font-size: 13px;
    gap: 10px;
  }

  .search-option-checkbox {
    width: 18px;
    height: 18px;
  }
}

/* Surlignage des termes recherchés */
.search-highlight {
  background-color: #ffeb3b;
  color: #333;
  padding: 1px 2px;
  border-radius: 2px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.search-highlight:hover {
  background-color: #ffc107;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Surlignage dans les titres */
.dictionary-term .search-highlight {
  background-color: #4caf50;
  color: white;
  font-weight: bold;
}

.dictionary-term .search-highlight:hover {
  background-color: #388e3c;
}

/* Animation d'apparition du surlignage */
@keyframes highlightFadeIn {
  from {
    background-color: #ff9800;
    transform: scale(1.05);
  }
  to {
    background-color: #ffeb3b;
    transform: scale(1);
  }
}

.search-highlight {
  animation: highlightFadeIn 0.3s ease-out;
}

/* Responsive pour le surlignage */
@media (max-width: 768px) {
  .search-highlight {
    padding: 2px 3px;
    font-size: inherit;
  }
}
