/* Reset ciblé uniquement pour le plugin Botami */
.btm-bot-global {
   box-sizing: border-box;
}

.btm-bot-global *,
.btm-bot-global *::before,
.btm-bot-global *::after {
   box-sizing: inherit;
}

/* Fix pour les bordures noires des images causées par Tailwind preflight */
.btm-bot-global img {
   border-style: none !important;
   outline: none !important;
}

.rounded-input-color{
   border: none !important;
}

.btn_input_date{
   border-top:none !important;
   border-left: none !important;
   border-right: none !important;
   border-radius: 0px !important;
   padding-left: 29px !important;
}

.bg_btn_premium{
   content:'Pro✨';
   padding:5px;
   color:white;
   position: absolute;
   top:0px;
   right: 0px;
   background:rgb(9, 11, 30);
}

.pro-badge::after{
   content:'Pro';
   padding:5px;
   border-radius: 5px;
   color:white;
   position: relative;
   background:rgb(9, 11, 30);
}


.pro-badge {
   position: relative;
}
 
.pro-badge::after {
   content: 'Pro';
   position: absolute;
   top: -2px;
   right: -2px;
   background-color: #ffc107; /* Couleur de fond du badge */
   color: #fff; /* Couleur du texte */
   padding: 2px 6px;
   border-radius: 4px;
   font-size: 12px;
   font-weight: bold;
   text-transform: uppercase;
}
 

.premium-badge::after{
   content:'Premium';
   padding:5px;
   border-radius: 5px;
   color:white;
   position: relative;
   background:rgb(9, 11, 30);
}


.premium-badge {
   position: relative;
}
 
.premium-badge::after {
   content: 'Premium';
   position: absolute;
   top: -2px;
   right: -2px;
   background-color: #ffc107; /* Couleur de fond du badge */
   color: #fff; /* Couleur du texte */
   padding: 2px 6px;
   border-radius: 4px;
   font-size: 12px;
   font-weight: bold;
   text-transform: uppercase;
}

#champ_start_mesage_admin{
   position: relative;
   padding: 7px;
   font-size: 14px !important;
   width: 320px !important;
   background-color: #3b44ea;
   color: white;
   border-radius: 10px;
   display: block;
   box-shadow: 0 5px 15px rgba(108, 79, 244, 0.3);
}

#champ_start_mesage_btn_close_admin{
   position: absolute;
   color: black;
   background: rgba(255, 255, 255, 0.94);
   border-radius: 50%;
   width: 16px;
   height: 16px;
   font-size: 12px;
   display: flex;
   align-items: center;
   justify-content: center;
   top: -5px;
   right: -5px;
   cursor: pointer;
}

.dragging {
   opacity: 0.7;
   transform: rotate(-2deg);
}
.over {
   border: 2px dashed #3b44ea;
   background: #fff3e0;
}

/* Styles for Quick Reply Drag and Drop */
.sortable-item {
   display: inline-block;
   padding: 0.5rem 1rem;
   margin: 0.25rem;
   background-color: #f3f4f6;
   border: 1px solid #e5e7eb;
   border-radius: 0.375rem;
   cursor: move;
   position: relative;
   max-width: 100%;
   word-wrap: break-word;
   transition: all 0.2s ease;
}

.sortable-item.dragging {
   opacity: 0.5;
   background-color: #e5e7eb;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sortable-item.drag-over {
   border: 1px dashed #673DE6;
   background-color: #eff6ff;
}

.close-btn {
   color: #6b7280;
   cursor: pointer;
   font-weight: bold;
   position: relative;
   right: auto;
   display: flex;
   align-items: center;
   justify-content: center;
   opacity: 0.6;
   transition: all 0.2s ease;
}

.close-btn:hover {
   color: #ef4444;
   background-color: #f3f4f6;
   opacity: 1;
}

/* Support pour le système de group hover avec le préfixe btm- */
.sortable-item:hover .close-btn {
   opacity: 1;
}

/* Override pour rendre le bouton de suppression toujours visible */
.sortable-item .close-btn.btm-opacity-0 {
   opacity: 0.6 !important;
}

.sortable-item:hover .close-btn.btm-opacity-0,
.sortable-item .close-btn.btm-group-hover\:opacity-100:hover {
   opacity: 1 !important;
}

/* Rendre les boutons de suppression d'options visibles */
.remove-option-btn {
   display: flex !important;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   transition: all 0.2s ease;
}

.remove-option-btn.btm-opacity-0 {
   opacity: 0.6 !important;
}

.option-item:hover .remove-option-btn.btm-opacity-0,
.remove-option-btn.btm-opacity-0:hover {
   opacity: 1 !important;
}

.quick-replies-container {
   min-height: 50px;
   padding: 1rem;
   border: 1px dashed #d1d5db;
   border-radius: 0.375rem;
}

.content-bloc{
   display: grid;
}


/* Styles spécifiques pour Quick Replies */

/* Compteur d'éléments */
.items-counter {
   display: flex;
   justify-content: space-between;
   align-items: center;
   font-size: 0.875rem;
   color: #6b7280;
   margin-bottom: 0.75rem;
}

.items-counter .count {
   font-weight: 600;
   color: #1f2937;
}

/* Formulaire d'ajout */
.add-reply-form {
   display: flex;
   gap: 0.5rem;
   margin-bottom: 1rem;
}

.add-reply-form input {
   flex-grow: 1;
   transition: all 0.2s ease;
}

.add-reply-form input:focus {
   border-color: #673DE6;
   box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.add-reply-form button {
   display: flex;
   align-items: center;
   justify-content: center;
   white-space: nowrap;
}

/* Conteneur de réponses rapides */
.quick-replies-container {
   min-height: 50px;
   transition: all 0.2s ease;
}

/* État vide */
.empty-state {
   text-align: center;
   padding: 2rem;
   color: #6b7280;
   border: 2px dashed #e5e7eb;
   border-radius: 0.5rem;
   margin-bottom: 1rem;
}

.empty-state[style*="display: none"] {
   display: none !important;
}

.empty-state[style*="display: block"] {
   display: flex !important;
}

/* Élément triable */
.sortable-item {
   transition: all 0.2s ease;
   position: relative;
   margin-bottom: 0.75rem;
   width: 400px;
}

.sortable-item:hover {
   transform: translateY(-2px);
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sortable-item.dragging {
   z-index: 10;
   opacity: 0.7;
}

.sortable-item .close-btn {
   cursor: pointer;
}

.sortable-item input,
.sortable-item select {
   transition: all 0.2s ease;
}

.sortable-item input:focus,
.sortable-item select:focus {
   border-color: #673DE6;
   box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Style de la poignée de glissement */
.sortable-item .cursor-grab {
   cursor: grab;
}

.sortable-item.dragging .cursor-grab {
   cursor: grabbing;
}

/* Animations */
@keyframes fadeIn {
   from {
       opacity: 0;
       transform: translateY(10px);
   }
   to {
       opacity: 1;
       transform: translateY(0);
   }
}

@keyframes pulse {
   0% {
       box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
   }
   70% {
       box-shadow: 0 0 0 5px rgba(59, 130, 246, 0);
   }
   100% {
       box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
   }
}

.sortable-item.pulse {
   animation: pulse 1s infinite;
}

/* Animation lors de l'ajout d'un nouvel élément */
.sortable-item.new {
   animation: fadeIn 0.3s ease-out;
}

/* Zone de dépôt lors du glisser-déposer */
.drop-indicator {
   height: 2px;
   background-color: #673DE6;
   margin: 8px 0;
   transition: all 0.2s ease;
}

/* Style pour les notifications */
.notification {
   position: fixed;
   bottom: 20px;
   right: 20px;
   z-index: 50;
   padding: 1rem;
   border-radius: 0.5rem;
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
   display: flex;
   align-items: center;
   animation: fadeIn 0.3s ease-out;
}

.notification.success {
   background-color: #f0fdf4;
   color: #166534;
   border-left: 4px solid #22c55e;
}

.notification.error {
   background-color: #fef2f2;
   color: #991b1b;
   border-left: 4px solid #ef4444;
}

.notification svg {
   margin-right: 0.5rem;
}


.bg-admin-panel{
   background-color: #422699;
}

.bg-transparent-green{
   background-color: #43269976 !important;
   color: #422699 !important;
}


.text-botami-blue{
   color:#422699;
}

.text-link-admin-panel:hover{
   color: #ccff01 !important;
}


.text-link-admin-panel{
   color: white !important;
   flex-shrink: 0;
}

/* Scrollbar styles for nav tabs */
.scrollbar-thin {
   scrollbar-width: thin;
   scrollbar-color: rgba(255, 255, 255, 0.5) rgba(255, 255, 255, 0.1);
}

.scrollbar-thin::-webkit-scrollbar {
   height: 8px;
}

.scrollbar-thin::-webkit-scrollbar-track {
   background: rgba(255, 255, 255, 0.1);
   border-radius: 4px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
   background-color: rgba(255, 255, 255, 0.5);
   border-radius: 4px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
   background-color: rgba(255, 255, 255, 0.7);
}

/* Sidebar Navigation Styles */
.admin-sidebar {
   min-height: 100%;
   box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-link {
   font-size: 0.9rem;
   font-weight: 500;
   position: relative;
   color: rgba(255, 255, 255, 0.9) !important;
}

.sidebar-link span {
   color: rgba(255, 255, 255, 0.9) !important;
}

.sidebar-link svg {
   color: rgba(255, 255, 255, 0.9) !important;
   transition: color 0.2s ease;
}

.sidebar-link:hover {
   background: rgba(255, 255, 255, 0.1);
   color: #fff !important;
}

.sidebar-link:hover span,
.sidebar-link:hover svg {
   color: #fff !important;
}

.sidebar-link.active {
   background: rgba(255, 255, 255, 0.15);
   color: #ccff01 !important;
   border-left-color: #ccff01 !important;
}

.sidebar-link.active span {
   color: #ccff01 !important;
}

.sidebar-link.active svg {
   color: #ccff01 !important;
}

.text-active-link,
.btm-text-active-link{
   color: #ccff01 !important;
   border: #ccff01 !important;
   border-bottom: solid 5px !important;
}

.text-color-botami{
   color: white;
}

.text-botami{
   color: #ccff01;
}

.btn-botami{
   background-color: #ccff01 !important;
}

.clr-bg-green{
   background-color: #ccff01;
}

.clr-bg-blue{
   background-color:#422699;
}


.h-prevision{

   height: 500px !important;
}


.h-prevision2{

   height: 300px !important;
}

#preview-reload-button{
    background-color: #673DE6 !important;
    padding: 5px !important;
}


#bot-message-gradient {
    background-image:  #673DE6 !important;
}


    #send-button{
        background-color: #673DE6 !important;
        padding: 5px !important;
        border-radius: 5px !important;
        color: white !important;
    }

    /* Toggle style */
    .toggle-switch {
        position: relative;
        display: inline-block;
        width: 50px;
        height: 24px;
    }

    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .toggle-slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        transition: .4s;
        border-radius: 24px;
    }

    .toggle-slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

    input:checked+.toggle-slider {
        background-color: #673DE6;
    }

    input:checked+.toggle-slider:before {
        transform: translateX(26px);
    }

    /* Preview style */
    .preview-container {
        background-color: #F7FAFC;
        border-radius: 10px;
        padding: 15px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        height: 100%;
    }

    .chatbot-preview {
        width: 100%;
        max-width: 300px;
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        margin: 0 auto;
    }

    .chatbot-header {
        background-color: #673DE6;
        padding: 15px;
        color: white;
        display: flex;
        align-items: center;
    }

    .chatbot-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 15px;
        overflow: hidden;
    }

    .chatbot-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .chatbot-header-text h4 {
        margin: 0;
        font-size: 16px;
        font-weight: bold;
    }

    .chatbot-status {
        display: flex;
        align-items: center;
        font-size: 13px;
    }

    .online-dot {
        width: 8px;
        height: 8px;
        background-color: #4CAF50;
        border-radius: 50%;
        display: inline-block;
        margin-right: 5px;
    }

    .chatbot-messages {
        background-color: #F7FAFC;
        padding: 15px;
        min-height: 100px;
    }

    .chatbot-message {
        max-width: 80%;
        padding: 8px 12px;
        border-radius: 15px 15px 15px 0;
        background-color: white;
        color: #333;
        font-size: 13px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-bottom: 10px;
        display: inline-block;
    }

    .user-message {
        margin-left: auto;
        background: linear-gradient(90deg, #673DE6 0%, #673DE6 100%);
        color: white;
        border-radius: 15px 15px 0 15px;
        display: block;
    }

    .chatbot-reload {
        text-align: center;
        padding: 10px;
    }

    .reload-button {
        background: linear-gradient(90deg, #673DE6 0%, #673DE6 100%);
        color: white;
        border: none;
        padding: 8px 15px;
        border-radius: 5px;
        font-size: 13px;
        cursor: pointer;
    }

    .chatbot-input {
        display: flex;
        align-items: center;
        padding: 10px;
        background-color: white;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        position: relative;
    }

    .input-field {
        flex: 1;
        border: 1px solid #e2e8f0;
        padding: 8px 10px;
        border-radius: 20px;
        font-size: 14px;
        margin-right: 10px;
    }

    .send-button {
        background: linear-gradient(90deg, #673DE6 0%, #673DE6 100%);
        color: white;
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .welcome-popup {
        position: relative;
        background-color: white;
        padding: 10px 15px;
        border-radius: 10px;
        font-size: 14px;
        box-shadow: 0 5px 15px rgba(108, 79, 244, 0.3);
        margin-top: 10px;
        max-width: 80%;
    }

    .welcome-popup-close {
        position: absolute;
        top: -5px;
        right: -5px;
        background: rgba(255, 255, 255, 0.94);
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        cursor: pointer;
    }


   .size-img-welcome-message{

      width: 224px;
   }

   /* Fix pour les bordures noires des images causées par Tailwind preflight */
   .btm-bot-global img {
      border-style: none !important;
      outline: none !important;
   }

/* ============================================
   ANIMATION DE CONSTRUCTION DE BASE DE CONNAISSANCES
   ============================================ */

#botami-knowledge-animation {
   position: fixed;
   top: 32px; /* WordPress admin bar height */
   left: 160px; /* WordPress admin menu width */
   width: calc(100% - 160px);
   height: calc(100% - 32px);
   background: rgba(255, 255, 255, 0.98);
   backdrop-filter: blur(10px);
   z-index: 999999;
   display: flex;
   align-items: center;
   justify-content: center;
   opacity: 0;
   transition: opacity 0.5s ease;
}

/* Responsive pour menu WordPress rétracté */
@media screen and (max-width: 960px) {
   #botami-knowledge-animation {
      left: 36px; /* WordPress admin menu collapsed width */
      width: calc(100% - 36px);
   }
}

/* Responsive pour mobile (pas de menu latéral) */
@media screen and (max-width: 782px) {
   #botami-knowledge-animation {
      top: 46px; /* WordPress mobile admin bar */
      left: 0;
      width: 100%;
      height: calc(100% - 46px);
   }
}

#botami-knowledge-animation.active {
   opacity: 1;
}

.botami-animation-container {
   position: relative;
   width: 100%;
   height: 100%;
   display: flex;
   align-items: center;
   justify-content: center;
   overflow: hidden;
}

.botami-animation-content {
   position: relative;
   z-index: 2;
   text-align: center;
   max-width: 500px;
   padding: 30px;
   background: transparent;
   backdrop-filter: none;
   border-radius: 0;
   border: none;
   box-shadow: none;
}

.botami-emoji-wrapper {
   position: relative;
   width: 120px;
   height: 120px;
   margin: 0 auto 20px;
   display: flex;
   align-items: center;
   justify-content: center;
}

.botami-emoji {
   font-size: 64px;
   line-height: 1;
   transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
   position: relative;
   z-index: 2;
   filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.botami-emoji-glow {
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   width: 100px;
   height: 100px;
   background: radial-gradient(circle, rgba(103, 61, 230, 0.2) 0%, transparent 70%);
   border-radius: 50%;
   animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
   0%, 100% {
      transform: translate(-50%, -50%) scale(1);
      opacity: 0.3;
   }
   50% {
      transform: translate(-50%, -50%) scale(1.2);
      opacity: 0.5;
   }
}

.botami-text-wrapper {
   margin-bottom: 30px;
}

.botami-animation-title {
   font-size: 24px;
   font-weight: 700;
   color: #1f2937;
   margin: 0 0 10px 0;
   text-shadow: none;
}

.botami-animation-text {
   font-size: 16px;
   color: #6b7280;
   margin: 0;
   min-height: 50px;
   display: flex;
   align-items: center;
   justify-content: center;
   text-shadow: none;
}

.botami-progress-bar {
   width: 100%;
   height: 8px;
   background: rgba(255, 255, 255, 0.2);
   border-radius: 10px;
   overflow: hidden;
   box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.botami-progress-fill {
   height: 100%;
   background: linear-gradient(90deg, #4ade80, #22c55e);
   border-radius: 10px;
   width: 0%;
   transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
   box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
}

.botami-floating-emojis {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   overflow: hidden;
   pointer-events: none;
   z-index: 1;
}

.botami-floating-emoji {
   position: absolute;
   font-size: 24px;
   opacity: 0;
   animation: float-up 6s ease-in infinite;
}

@keyframes float-up {
   0% {
      bottom: -100px;
      opacity: 0;
      transform: translateX(0) rotate(0deg);
   }
   10% {
      opacity: 0.3;
   }
   90% {
      opacity: 0.3;
   }
   100% {
      bottom: 100%;
      opacity: 0;
      transform: translateX(100px) rotate(360deg);
   }
}

/* Responsive pour mobile */
@media (max-width: 768px) {
   .botami-animation-content {
      max-width: 90%;
      padding: 20px 15px;
   }

   .botami-emoji-wrapper {
      width: 100px;
      height: 100px;
   }

   .botami-emoji {
      font-size: 48px;
   }

   .botami-animation-title {
      font-size: 20px;
   }

   .botami-animation-text {
      font-size: 14px;
      min-height: 40px;
   }

   .botami-floating-emoji {
      font-size: 20px;
   }
}

/* ============================================
   FAQ SECTION STYLES
   ============================================ */

/* Slider avec progression visible */
.slider-container {
   position: relative;
   width: 100%;
   height: 24px;
   margin: 8px 0;
}

.slider-track {
   position: absolute;
   top: 50%;
   transform: translateY(-50%);
   left: 0;
   right: 0;
   height: 8px;
   background: #e5e7eb !important;
   border-radius: 5px;
   overflow: hidden;
   pointer-events: none;
}

.slider-progress {
   height: 100%;
   background: #9333ea !important;
   border-radius: 5px;
   width: 40%;
   transition: width 0.1s ease;
}

.slider-input {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   -webkit-appearance: none !important;
   appearance: none !important;
   background: transparent !important;
   cursor: pointer;
   margin: 0;
   padding: 0;
   z-index: 2;
}

.slider-input::-webkit-slider-runnable-track {
   -webkit-appearance: none !important;
   background: transparent !important;
   height: 8px;
}

.slider-input::-webkit-slider-thumb {
   -webkit-appearance: none !important;
   appearance: none !important;
   width: 22px !important;
   height: 22px !important;
   background: #9333ea !important;
   border-radius: 50% !important;
   box-shadow: 0 2px 6px rgba(147, 51, 234, 0.4) !important;
   cursor: pointer !important;
   border: none !important;
   margin-top: -7px;
}

.slider-input::-webkit-slider-thumb:hover {
   transform: scale(1.1);
   box-shadow: 0 4px 12px rgba(147, 51, 234, 0.5) !important;
}

.slider-input::-moz-range-track {
   background: transparent !important;
   height: 8px;
   border: none;
}

.slider-input::-moz-range-thumb {
   width: 22px !important;
   height: 22px !important;
   background: #9333ea !important;
   border-radius: 50% !important;
   box-shadow: 0 2px 6px rgba(147, 51, 234, 0.4) !important;
   cursor: pointer !important;
   border: none !important;
}

/* FAQ items container */
.faq-items-container {
   min-height: 50px;
}

.faq-item {
   transition: all 0.3s ease;
}

.faq-item:hover {
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Logo template grid spacing */
.logo-template {
   padding: 12px !important;
}

.logo-template img {
   margin-bottom: 8px;
}

/* FAQ Q/R badges - ensure circular display */
.faq-item span[class*="btm-rounded-full"] {
   width: 28px !important;
   height: 28px !important;
   min-width: 28px !important;
   min-height: 28px !important;
   flex-shrink: 0 !important;
   display: inline-flex !important;
   align-items: center !important;
   justify-content: center !important;
   border-radius: 50% !important;
   font-size: 14px !important;
   line-height: 1 !important;
}

/* FAQ empty state */
.faq-empty-state {
   transition: all 0.3s ease;
}

/* FAQ toggle switch override for purple theme */
#bot-faq .toggle-switch input:checked + .toggle-slider {
   background-color: #9333ea;
}

/* FAQ item active toggle styling */
.faq-active-toggle:checked + div {
   background-color: #9333ea !important;
}

/* Animation for FAQ items */
@keyframes faqSlideIn {
   from {
      opacity: 0;
      transform: translateY(-10px);
   }
   to {
      opacity: 1;
      transform: translateY(0);
   }
}

.faq-item.new {
   animation: faqSlideIn 0.3s ease-out;
}

/* Responsive FAQ styles */
@media (max-width: 768px) {
   .faq-item .btm-flex-1 {
      margin-right: 0.5rem;
   }

   .faq-item .faq-question,
   .faq-item .faq-answer {
      font-size: 0.8rem;
   }
}