/* css/4ai-theme.css */

.chat .messages {
  font-weight: var(--bs-body-font-weight);
  line-height: var(--bs-body-line-height);
  text-align: var(--bs-body-text-align);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  color: #161c2d;
  padding: 1rem !important;
  scrollbar-color: #000000 #e0e0e0;
  scrollbar-width: thin;
  max-height: 100%;
  margin-right: 10px;
  margin-left: 10px;
  flex-grow: 1;
  overflow-y: auto;
  bottom: 10% !important;
  top: 2% !important;
  position: absolute;
  width: 100%;
}
.chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
  color: #212529;
}

/* Header */
header {
  background: #fff;
  padding: 20px 0;
  border-bottom: 1px solid #ddd;
}
.logo {
  height: 60px;
}
nav a {
  margin-right: 1rem;
  color: #333;
  font-weight: 500;
}
button.btn.btn-light.text-white {
    background: none;
    border: none;
}

/* Chat Preview */
.chat-preview {
  background: #fff;
  border: 1px solid #ccc;
  padding: 30px;
  border-radius: 10px;
  margin-top: 30px;
  position: relative;
}
.chat-inner {
  position: relative;
}
.chat-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  z-index: 10;
  text-align: center;
  padding: 20px;
}

/* Text Zone, FAQ, Pricing, Advantages */
.text-zone,
.service-details,
.footer-info {
  background: #fff;
  border-radius: 10px;
  padding: 30px;
  margin-top: 40px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.faq-section h5 {
  margin-top: 40px;
  font-size: 1.5rem;
}
.accordion-button:not(.collapsed) {
  background: #007bff;
  color: #fff;
}

/* Footer */
footer {
  background: #f1f1f1;
  padding-top: 20px;
  text-align: center;
}
.footer-nav a {
  margin: 0 10px;
  color: #6c757d;
  font-weight: 500;
}
.powered-by img {
  margin-top: 10px;
}
.customer-reviews {
  background: #fff;
  border-radius: 10px;
  padding: 40px 30px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.section-background{
  background: #fff;
  border-radius: 10px;
  padding: 40px 30px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.review-slider {
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
}

.review-card {
  flex: 0 0 auto;
  width: 220px;
  border-radius: 10px;
  scroll-snap-align: start;
  background: #f9f9f9;
}

.review-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ddd;
}

.stars {
  font-size: 1.2rem;
  color: #f1c40f;
  margin-top: 8px;
}
.service-advantages {
  background: #fff;
  border-radius: 10px;
  padding: 40px 30px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.advantage-card {
  background-color: #fafafa;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advantage-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.advantage-card i {
  font-size: 2.5rem;
}
#contact h2 i {
  color: #0d6efd;
}

#contact .form-control {
  border-radius: 8px;
}

#contact .btn {
  border-radius: 8px;
  font-weight: 500;
}
#parallax {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 60px 15px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-banner .row {
  width: 100%;
  align-items: center;
  height: 100%;
}

.hero-banner .col-lg-6 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.hero-banner .bg-white,
.hero-banner .p-4 {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.btn {
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.modal-header .btn-close {
  filter: grayscale(50%);
}
.editor-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  flex-wrap: wrap;
}
.editor-toolbar button {
  border: none;
  background: #fff;
  padding: 4px 8px;
  font-size: 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s;
}
.editor-toolbar button:hover {
  background-color: #e2e6ea;
}
.editor-toolbar input[type="color"] {
  width: 30px;
  height: 30px;
  border: none;
  padding: 0;
  cursor: pointer;
}
.editor-toolbar select {
  font-size: 14px;
  border-radius: 4px;
}
.accordion-button {
  background-color: #f8f9fa;
  color: #333;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-weight: 500;
}

.accordion-button:not(.collapsed) {
  background-color: #e8f0ff;
  color: #0d6efd;
  border-bottom: 2px solid #0d6efd;
}

.accordion-button:focus {
  box-shadow: none;
}

.editor-toolbar button {
  border: none;
  background: #f1f1f1;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.editor-toolbar {
  display: flex;
  gap: 5px;
  align-items: center;
}
.object-fit-cover {
  object-fit: cover;
}
#extraFields .btn-outline-danger {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}
/* === Chat Modal & Iframe Responsiveness Fix === */
#chatModal {
  width: 100%;
  max-width: 526px;
  max-height: 508px;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
  margin: 0 auto;
  display: block;
  z-index: 1017;
}

/* Optional: floating behavior for desktop only */
@media (min-width: 768px) {
  #chatModal.floating-left {
    position: absolute;
    top: 165px;
    left: 50px;
  }
  #chatModal.floating-right {
    position: absolute;
    top: 165px;
    right: 16%;
  }
}

/* Iframe inside modal should fill container */
#chatModal iframe {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  border: none;
  margin: 0;
  display: block;
  box-sizing: border-box;
}

/* Mobile override for full screen */
@media (max-width: 767px) {
  #chatModal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
  }

  #chatModal iframe {
    border-radius: 0 !important;
  }
}
#chatModal {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 508px;
  max-height: 508px;
  background: white;
  border-top-right-radius: 15px;
}

#chatModal iframe {
  flex: 1;
  height: 100% !important;
  width: 100% !important;
  max-height: 100%;
  overflow: hidden;
}
.chat-modal {
  position: relative;
  width: 100%;
  max-width: 526px;
  height: 500px;
  overflow: hidden;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.embedded-chat-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  box-sizing: border-box;
  border-radius: 10px;
}

@media (max-width: 768px) {
  .chat-modal {
    height: 90vh;
    max-width: 100%;
    border-radius: 0;
  }
  .embedded-chat-iframe {
    border-radius: 0;
  }
}
/* 🛠️ Final Mobile Layout Fix for Chat Block under 768px */
@media (max-width: 767.98px) {

  .hero-banner .row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1.5rem;
  }
    

  .hero-banner .col-lg-6 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 12px !important;
    margin-bottom: 1rem;
  }

  #chatContainer {
    width: 100% !important;
    padding: 0 !important;
  }

  #chatModal {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: unset !important;
    margin: 0 auto !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  #chatModal iframe {
    width: 100% !important;
    height: 500px !important;
    max-height: 500px !important;
    border: none !important;
    display: block !important;
  }

  .chat .messages {
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    max-height: 50vh !important;
    overflow-y: auto !important;
    padding: 1rem !important;
    position: relative !important;
  }

  .bottom {
    position: relative !important;
    width: 100% !important;
    bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-top: 1px solid #e0e0e0 !important;
    padding: 10px !important;
  }

}
@media (max-width: 767.98px) {

  #chatModal {
    position: relative !important;
    top: unset !important;
    bottom: unset !important;
    height: 500px !important;
    max-height: none !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background-color: #fff !important;
    margin: 1rem !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.1) !important;
  }

  #chatModal iframe {
    width: 100% !important;
    height: 500px !important;
    max-height: 500px !important;
    border-radius: 16px !important;
    border: none !important;
    display: block !important;
    overflow: hidden !important;
  }

  .chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
  }

  .chat .messages {
    position: relative !important;
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    max-height: 50vh !important;
    overflow-y: auto !important;
    padding: 1rem !important;
  }

  .bottom {
    position: relative !important;
    bottom: 0 !important;
    width: 100% !important;
    padding: 10px 16px !important;
    border-top: 1px solid #e0e0e0 !important;
    background-color: #fff !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 -1px 4px rgba(0,0,0,0.05) !important;
  }

  .chat-container {
    display: flex;
    align-items: center;
    background: #f8f8f8;
    border: 1px solid #ccc;
    border-radius: 40px;
    padding: 6px 12px;
  }

  #message {
    flex-grow: 1;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 40px;
    background-color: #fff;
    outline: none;
  }

  button#sendBtn,
  #record-button {
    background: none;
    border: none;
    margin-left: 8px;
    width: 44px !important;
    height: 44px !important;
  }

  #record-button svg {
    width: 32px;
    height: 32px;
  }

}

.ck-editor__editable_inline {
    min-height: 300px !important;
    max-height: 300px !important;
    overflow-y: auto;
}

.resizable-image-wrapper {
    display: inline-block;
    resize: both;
    overflow: auto;
    user-select: none;
}

.resizable-image-wrapper img {
    max-width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
}

#formLoader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.percent-loader {
    width: 300px;
    height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.percent-loader svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.percent-loader .bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.percent-loader .progress {
    fill: none;
    stroke: #4f8cff;
    stroke-width: 3.8;
    stroke-linecap: round;
    stroke-dasharray: 100.48;
    stroke-dashoffset: 100.48;
    transition: stroke-dashoffset 0.1s ease;
}

.percent-text {
    position: absolute;
    width: 100%;
    top: 50%;
    left: 0;
    text-align: center;
    font-size: 4rem;
    font-weight: bold;
    color: #4f8cff;
    transform: translateY(-50%);
}


