/* ASE Custom Chatbot - Clean UI CSS
   Includes v2.8+ product/brand/form UI and launcher hint card style */

:root {
  --ase-dark: #111827;
  --ase-dark-2: #26364f;
  --ase-gold: #ffb81c;
  --ase-bg: #f8fafc;
  --ase-border: #e5e7eb;
  --ase-text: #111827;
  --ase-muted: #64748b;
  --ase-shadow: 0 24px 70px rgba(15, 23, 42, .24);
  --ase-radius: 22px;
}

.ase-hidden { display: none !important; }

/* Launcher button */
.ase-launcher {
    position: fixed;
    right: 31px;
    bottom: 105px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #ffffff;
    background-size: 30px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .28);
    cursor: pointer;
    z-index: 999999;
    overflow: hidden;
    display: block !important;
}

.ase-launcher::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 184, 28, .38) 0%, rgba(255, 184, 28, 0) 65%);
  animation: aseLauncherPulse 2s ease-in-out infinite;
}

@keyframes aseLauncherPulse {
  0%, 100% { transform: scale(.9); opacity: .35; }
  50% { transform: scale(1.08); opacity: .75; }
}

/* Launcher hint like screenshot */
.ase-launcher-hint {
    position: fixed;
    right: 104px;
    bottom: 130px;
    width: 360px;
    max-width: calc(100vw - 130px);
    min-height: 70px;
    background: #fff;
    color: #747474;
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: 46px;
    padding: 15px 40px 15px 80px;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 400;
    letter-spacing: -.2px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, .16);
    z-index: 999998;
    opacity: 0;
    transform: translateX(16px) scale(0.98);
    pointer-events: auto;
    white-space: normal;
}

.ase-launcher-hint::before {
    content: "AI";
    position: absolute;
    left: 30px;
    top: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.3px;
}



.ase-launcher-hint .dots { display: none !important; }

.ase-launcher-hint.is-visible {
  animation: aseHintIn .35s ease forwards, aseHintFloat 2.6s ease-in-out 1s infinite;
}

@keyframes aseHintIn {
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes aseHintFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Chat wrapper */
.ase-chatbot {
  position: fixed;
  right: 22px;
  bottom: 92px;
  width: 390px;
  max-width: calc(100vw - 24px);
  border: 0;
  border-radius: var(--ase-radius);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #fff;
  box-shadow: var(--ase-shadow);
  z-index: 1000000;
  overflow: hidden;
  transition: width .18s ease, height .18s ease, right .18s ease, bottom .18s ease, border-radius .18s ease;
}

.ase-chat-header {
  min-height: 54px;
  padding: 14px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--ase-dark), var(--ase-dark-2));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ase-chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 650;
  letter-spacing: .2px;
}

.ase-chat-title::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, .16);
}

.ase-chat-actions { display: flex; gap: 6px; }
.ase-chat-actions button,
.ase-chat-header .ase-close {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, .12) !important;
  border-radius: 10px !important;
  cursor: pointer;
  line-height: 1;
  padding: 7px 9px;
}

.ase-banner {
  background: #fee2e2;
  color: #991b1b;
  border-bottom: 1px solid #fecaca;
  padding: 8px 12px;
  font-size: 13px;
}

.ase-chat-body {
  height: 500px;
  max-height: 68vh;
  overflow-y: auto;
  padding: 16px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  scroll-behavior: smooth;
}

.ase-chat-body::-webkit-scrollbar { width: 7px; }
.ase-chat-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 999px; }

.ase-chat-input {
  position: relative;
  display: flex;
  padding: 12px 14px 14px;
  background: #fff;
  border-top: 1px solid #eef2f7;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, .04);
}

.ase-chat-input input {
  width: 100%;
  height: 46px;
  padding: 0 88px 0 15px;
  border: 1px solid var(--ase-border);
  border-radius: 999px;
  outline: none;
  background: #fff !important;
  color: #333 !important;
  box-shadow: none;
}

.ase-chat-input .send-btn {
  position: absolute;
  right: 20px;
  top: 17px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ase-gold);
  color: var(--ase-dark);
  font-weight: 800;
  cursor: pointer;
}

.ase-chat-input .send-btn:hover { background: #f0a900; }

/* Messages */
.ase-msg { display: flex; margin: 0 0 10px; animation: aseFadeUp .25s ease both; }
.ase-msg.user { justify-content: flex-end; }
.ase-msg.bot { justify-content: flex-start; }

@keyframes aseFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ase-bubble {
  max-width: 100%;
  padding: 12px;
  border-radius: 18px;
  line-height: 1.4;
  font-size: 14px;
}

.ase-msg.bot .ase-bubble {
  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.ase-msg.user .ase-bubble {
  background: var(--ase-dark);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
}

.ase-bubble strong {
  display: block;
  color: var(--ase-dark);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.ase-bubble p { margin: 0 0 10px; }
.ase-bubble p:last-child { margin-bottom: 0; }

.ase-typing { display: inline-flex; gap: 6px; align-items: center; margin: 6px 8px; }
.ase-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
  animation: aseBounce 1s infinite ease-in-out;
}
.ase-typing span:nth-child(2) { animation-delay: .15s; }
.ase-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aseBounce {
  0%, 80%, 100% { transform: scale(.8); opacity: .6; }
  40% { transform: scale(1); opacity: 1; }
}

/* Welcome and quick actions */
.ase-welcome-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
}

.ase-welcome-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--ase-gold);
  display: grid;
  place-items: center;
  font-size: 23px;
}

.ase-welcome-card p { margin: 0; color: #475569; line-height: 1.45; }

.ase-quick-actions {
  grid-column: 1 / -1;
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.ase-quick-actions button,
.ase-cat-chip,
.ase-brand-chip,
.ase-load-more,
.ase-mini-back {
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.ase-quick-actions button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 184, 28, .38);
  background: linear-gradient(135deg, #fff7df, #fff);
  color: var(--ase-dark);
  border-radius: 16px;
  padding: 12px 40px 12px 14px;
  text-align: left;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(15, 23, 42, .06);
}

.ase-quick-actions button::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #d28c00;
  font-size: 20px;
}

.ase-quick-actions button:hover,
.ase-cat-chip:hover,
.ase-brand-chip:hover,
.ase-load-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .12);
}

/* Categories and brands */
.ase-browse-head strong { color: var(--ase-dark); font-size: 14px; }
.ase-browse-cats { display: flex !important; flex-direction: column; gap: 8px; margin-top: 10px; }

.ase-cat-chip,
.ase-brand-chip {
  width: 100%;
  text-align: left;
  border: 1px solid #e6e9ef;
  background: #fff;
  color: var(--ase-dark);
  border-radius: 14px;
  padding: 13px 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}

.ase-cat-chip:hover,
.ase-brand-chip:hover { border-color: var(--ase-gold); }

.ase-cat-chip span,
.ase-brand-chip span {
  float: right;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 650;
  color: #374151;
}

.ase-brand-panel {
  background: linear-gradient(180deg, #fff, #fffaf0);
  border: 1px solid #f3e7c6;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.ase-brand-panel > strong { font-size: 16px; color: var(--ase-dark); display: block; margin-bottom: 4px; }
.ase-brand-panel p { font-size: 13px; color: #6b7280; margin: 0 0 12px; }
.ase-brand-grid { display: grid; grid-template-columns: 1fr; gap: 9px; }

.ase-mini-back {
  border: 0;
  background: var(--ase-dark);
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.ase-mini-back:hover { background: var(--ase-gold); color: var(--ase-dark); }

/* Product cards */
.ase-products-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
}

.ase-products-head strong { color: var(--ase-dark); font-size: 16px; }
.ase-products-head span { font-size: 12px; color: #6b7280; background: #f3f4f6; border-radius: 999px; padding: 4px 9px; }

.ase-grid.ase-product-grid,
.ase-product-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ase-product-card {
  width: auto !important;
  overflow: hidden;
  border: 1px solid var(--ase-border) !important;
  border-radius: 16px !important;
  background: #fff !important;
  padding: 0 !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}

.ase-product-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15, 23, 42, .12); }
.ase-card-media { display: block; overflow: hidden; background: #f6f7f9; }
.ase-card-media img { width: 100% !important; height: 118px !important; object-fit: contain; border: 0 !important; border-radius: 0 !important; transition: transform .35s ease; }
.ase-product-card:hover .ase-card-media img { transform: scale(1.05); }

.ase-product-placeholder {
  height: 118px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  font-weight: 800;
  color: #94a3b8;
}

.ase-card-content { padding: 10px; }
.ase-product-title { display: block; color: var(--ase-dark) !important; text-decoration: none !important; font-size: 13px !important; font-weight: 800 !important; line-height: 1.25 !important; margin-bottom: 10px; }
.ase-card-content p { display: none !important; }

.ase-product-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.ase-product-actions a,
.ase-product-actions button {
  border: 0;
  border-radius: 999px;
  background: rgba(198, 120, 0, .29);
  color: var(--ase-dark) !important;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  padding: 7px 9px;
  cursor: pointer;
}
.ase-product-actions button.secondary { background: var(--ase-dark); color: #fff !important; }

.ase-load-area { text-align: center; margin: 14px 0; }
.ase-load-more { width: 100%; border: 1px solid var(--ase-dark); background: var(--ase-dark); color: #fff; border-radius: 999px; padding: 11px 14px; font-weight: 800; }
.ase-load-more:hover { background: var(--ase-gold); color: var(--ase-dark); border-color: var(--ase-gold); }

/* Support, enquiry and Forminator */
.ase-support-card,
.ase-inline-form,
.ase-sales-panel,
.ase-no-match,
.ase-suggest-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--ase-border);
  border-radius: 18px;
  background: #f8fafc;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

.ase-inline-form > strong,
.ase-support-card > strong { display: block; color: var(--ase-dark); margin-bottom: 4px; }
.ase-inline-form small { display: block; color: var(--ase-muted); margin-bottom: 10px; }
.ase-sales-panel .contact-btn { display: none !important; }
.details-contacts div:has(a[href^="tel:"]),
.details-contacts div:first-child:not(:has(a)) { display: none !important; }

.ase-form-slot { margin-top: 10px; }
.ase-inline-form .forminator-ui,
.ase-inline-form form.forminator-custom-form,
.ase-inline-form div.forminator-custom-form,
.ase-inline-form .forminator-custom-form {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  height: auto !important;
  overflow: visible !important;
}

.ase-inline-form .forminator-edit-module { display: none !important; }
.ase-inline-form .forminator-row { margin-bottom: 10px !important; }
.ase-inline-form .forminator-field { margin-bottom: 8px !important; }
.ase-inline-form .forminator-input,
.ase-inline-form .forminator-textarea,
.ase-inline-form .forminator-select2 + .select2-container .select2-selection {
  width: 100% !important;
  min-height: 42px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 12px !important;
  background: #fff !important;
}
.ase-inline-form .forminator-button-submit { width: 100% !important; border-radius: 999px !important; background: var(--ase-dark) !important; color: #fff !important; padding: 11px 16px !important; }

.ase-form-submit-status { margin: 0 0 10px; padding: 9px 11px; border-radius: 12px; font-size: 13px; line-height: 1.35; display: none; }
.ase-form-submit-status.success { display: block; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.ase-form-submit-status.error { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.ase-inline-form .forminator-response-message:empty,
.ase-inline-form .forminator-error-message:empty,
.ase-inline-form .forminator-success-message:empty,
.ase-inline-form .ase-empty-forminator-response {
  display: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  min-height: 0 !important;
  background: transparent !important;
}
.ase-inline-form .forminator-response-message:not(:empty) { display: block !important; }

/* Inactivity nudge */
.ase-nudge .ase-bubble { border: 1px solid rgba(0, 0, 0, .04); font-size: 14px; padding: 15px; background: rgba(255, 184, 28, .05); margin-bottom: 20px; }
.ase-nudge-actions,
.ase-feedback { margin-top: 8px; display: flex; gap: 8px; }
.ase-nudge-actions button,
.ase-send-feedback { padding: 8px 10px; border: 0; border-radius: 8px; cursor: pointer; }
.ase-feedback input { flex: 1; padding: 8px 10px; border: 1px solid var(--ase-border); border-radius: 8px; }
.ase-send-feedback { color: #fff; background: var(--ase-dark); }

/* Enlarged */
.ase-chatbot.ase-enlarged { width: min(920px, 96vw); height: min(70vh, 660px); display: flex; flex-direction: column; }
.ase-chatbot.ase-enlarged .ase-chat-body { height: auto; flex: 1; max-height: none; }
.ase-chatbot.ase-enlarged .ase-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Mobile */
@media (max-width: 520px) {
  .ase-chatbot { right: 8px; bottom: 72px; width: calc(100vw - 16px); border-radius: 20px; }
  .ase-chat-body { height: 70vh; max-height: 70vh; }
  .ase-product-grid,
  .ase-grid.ase-product-grid,
  .ase-chatbot.ase-enlarged .ase-product-grid { grid-template-columns: 1fr !important; }
  .ase-chatbot.ase-enlarged { right: 0; bottom: 0; width: 100vw; height: 100vh; border-radius: 0; }
  .ase-launcher { right: 20px; bottom: 86px; }
  .ase-launcher-hint {
    right: 18px;
    bottom: 154px;
    width: calc(100vw - 36px);
    max-width: calc(100vw - 36px);
    min-height: 96px;
    border-radius: 34px;
    padding: 24px 56px 22px 78px;
    font-size: 14px;
  }
  .ase-launcher-hint::before { left: 22px; top: 25px; width: 34px; height: 34px; font-size: 11px; }
  .ase-launcher-hint::after { right: 20px; top: 17px; font-size: 22px; }
}

@media (max-width: 360px) {
  .ase-launcher-hint { font-size: 15px; padding-left: 72px; }
}
