/* Styles pour la modal de création de verset illustré */
.illustrated-verse {
  position: relative;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-top: 15px;
  display: flex;
  flex-direction: column;
}

.illustrated-verse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  background: white;
  z-index: 200;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.illustrated-verse-header h3 {
  margin: 0;
  color: #255e89;
  font-size: 18px;
  font-weight: 600;
}

.close-button {
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  padding: 0;
  transition: all 0.2s ease;
  z-index: 201;
}

.close-button:hover {
  background-color: #e0e0e0;
  color: #333;
  transform: scale(1.05);
}

.close-button svg {
  width: 16px;
  height: 16px;
}

/* Contenu principal */
.illustrated-verse-content {
  padding: 20px;
  padding-top: 5px;
  flex-grow: 1;
  overflow-y: auto;
}

.illustrated-verse
  > *:not(.illustrated-verse-header):not(.illustrated-verse-content) {
  padding: 0;
}

.illustrated_verse_preview {
  margin: 15px auto;
  max-width: 400px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.custom_illustrated_verse {
  margin-top: 20px;
  padding: 15px 20px 20px;
  border-top: 1px solid #eee;
}

.custom_illustrated_verse h4 {
  color: #255e89;
  margin-top: 20px;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 600;
}

.choose_img {
  overflow-x: auto;
  padding: 10px 0;
  margin-bottom: 15px;
  -webkit-overflow-scrolling: touch;
}

.choose_img .carousel-inner {
  display: flex;
  flex-wrap: nowrap;
}

.choose_img a {
  display: inline-block;
  margin: 0 5px;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.choose_img a.selected {
  border-color: #255e89;
}

.choose_img img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.verse_align a,
.verse_valign a {
  display: inline-block;
  padding: 5px;
  color: #666;
  text-decoration: none;
}

.verse_align a.selected,
.verse_valign a.selected {
  color: #255e89;
  font-weight: bold;
}

.verse_size,
.ref_size {
  margin: 15px 0;
}

#verse_size_cursor,
#ref_size_cursor {
  margin: 10px 0;
  background: #eee;
  border-radius: 10px;
}

.ui-slider-handle {
  background: #255e89 !important;
  border-color: #255e89 !important;
  border-radius: 50% !important;
}

.verse_color input,
.ref_color input {
  width: 80px;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.verse_font select,
.ref_font select {
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  max-width: 200px;
}

.hide {
  display: none !important;
}

/* Bouton de téléchargement */
.illustrated-verse center {
  text-align: center;
  display: block;
  width: 100%;
  margin: 20px 0 10px;
  position: relative;
  z-index: 10;
}

.illustrated_verse_img {
  margin-top: 5px;
  display: inline-block;
  position: relative;
  z-index: 10;
}

/* Styles pour les réseaux sociaux */
.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
  justify-content: center;
}

.article-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: transform 0.2s;
}

.article-actions a:hover {
  transform: scale(1.1);
}

/* Style général pour les icônes de réseaux sociaux */
.article-actions a i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 20px;
  margin: 0;
}

/* Centrage spécifique pour l'icône Telegram */
.article-actions a[href*="telegram"] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-actions a[href*="telegram"] svg,
.article-actions a[href*="telegram"] img,
.article-actions a[href*="telegram"] i.icon-telegram {
  position: relative;
  top: 0;
  left: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 20px;
}

/* Styles responsifs */
@media (max-width: 768px) {
  .illustrated-verse-content {
    padding: 15px;
    padding-top: 5px;
  }

  .illustrated_verse_preview {
    max-width: 100%;
  }

  .verse_align,
  .verse_valign {
    display: block;
    margin-bottom: 10px;
  }

  .verse_font select,
  .ref_font select {
    max-width: 100%;
  }
}

/* Styles responsifs spécifiques aux mobiles */
@media (max-width: 480px) {
  .illustrated-verse {
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border-radius: 0;
    overflow: hidden;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  .illustrated-verse-header {
    padding: 15px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 200;
  }

  .illustrated-verse-content {
    padding: 15px;
    padding-top: 5px;
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .close-button {
    width: 32px;
    height: 32px;
  }

  .close-button svg {
    width: 20px;
    height: 20px;
  }

  .illustrated_verse_preview {
    margin-top: 15px;
  }

  .btn-base.btn-sm {
    padding: 12px 20px;
    font-size: 16px;
    height: auto;
  }

  .custom_illustrated_verse {
    padding: 15px 0;
  }
}
