/* Clone overrides — Manrope fallback when local font missing */
body {
  font-family: "Manrope", manrope, "Segoe UI", sans-serif;
}

/* Fix absolute fill images in relative containers */
.size-\[40px\] img,
.size-\[134px\] img,
.size-\[230px\] img,
.relative > img[style*="position:absolute"] {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.relative.rounded-\[14px\] > img,
.relative.h-\[234px\] > img {
  object-fit: cover;
}

/* Mobile menu panel layout and positioning overrides */
.mobile-menu-panel {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  top: -100vh !important;
  z-index: 10 !important;
  background-color: #ffffff !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

.mobile-menu-panel.is-open {
  top: 0 !important;
}

.mobile-menu-panel.is-open menu {
  opacity: 1 !important;
}

/* Ensure mobile header buttons are beautiful and perfectly aligned */
nav article {
  display: flex !important;
  align-items: center !important;
}

/* Language selector wrapper adjustment */
.esse-lang-wrapper {
  order: 1 !important;
}

/* Make "Подать заявку" header button visible and premium on mobile */
nav article button.hidden.lg\:inline-block {
  display: inline-flex !important; /* Visible on mobile */
  padding: 8px 16px !important;     /* Smaller padding for mobile */
  font-size: 13px !important;       /* Smaller font size */
  font-weight: 700 !important;
  border-radius: 8px !important;    /* Clean border radius */
  max-height: 38px !important;
  align-items: center !important;
  justify-content: center !important;
  order: 2 !important;              /* Place it between language switcher and hamburger */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease-in-out !important;
}

nav article button.hidden.lg\:inline-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15), 0 3px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Hamburger button positioning on the far right */
nav article button.lg\:hidden {
  order: 3 !important;
}

/* On desktop, restore original styling for "Подать заявку" button */
@media (min-width: 1024px) {
  nav article button.hidden.lg\:inline-block {
    display: inline-block !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
    max-height: 60px !important;
    order: unset !important;
    box-shadow: none !important;
  }
  nav article button.hidden.lg\:inline-block:hover {
    transform: none;
    box-shadow: none;
  }
}

/* Extra-small screens optimization to avoid wrapping or truncation */
@media (max-width: 375px) {
  nav div.max-w-\[1440px\] {
    padding-left: 8px !important;
    padding-right: 8px !important;
    gap: 6px !important;
  }
  nav article {
    gap: 8px !important;
  }
  nav article button.hidden.lg\:inline-block {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }
}

/* Accordion */
[data-slot="accordion-item"] [data-slot="accordion-content"] {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

[data-slot="accordion-item"].is-open [data-slot="accordion-content"] {
  max-height: 500px;
  padding-top: 12px;
}

[data-slot="accordion-item"].is-open [data-slot="accordion-trigger"] svg {
  transform: rotate(45deg);
}

/* Native selects for form */
.esse-select {
  width: 100%;
  border: 1px solid var(--color-neutral-400, #a3a3a3);
  background: var(--color-neutral-100, #f5f5f5);
  border-radius: 6px;
  padding: 12px;
  font-size: 14px;
  color: #525252;
}

.esse-form-message {
  padding: 8px 12px;
  border-radius: 8px;
  background: #f5f5f5;
}

button:disabled {
  cursor: not-allowed;
}

/* Dynamically shift green PNG illustrations to a luxury premium blue */
img[src*="explore_turkey"],
img[src*="offer_letter"],
img[src*="one_time_payment"] {
  filter: hue-rotate(140deg) saturate(1.1) brightness(0.95) !important;
}

/* Premium Chatbot Operator Widget */
.esse-chatbot-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  font-family: "Manrope", sans-serif;
}

/* Chat bubble styling */
.esse-chat-bubble {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0F1E36 0%, #1E3A8A 100%);
  border: 2px solid #FFD700; /* Gold touch */
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(15, 30, 54, 0.4), 0 8px 16px -6px rgba(15, 30, 54, 0.3);
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.esse-chat-bubble:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 30px -5px rgba(15, 30, 54, 0.5), 0 10px 20px -6px rgba(15, 30, 54, 0.4);
}

/* Pulse animation for bubble */
.esse-chat-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(30, 58, 138, 0.4);
  animation: esse-pulse 2s infinite;
  z-index: -1;
}

@keyframes esse-pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(0.95);
    opacity: 0;
  }
}

/* Chat window card */
.esse-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 48px);
  height: 480px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1001;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.8) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transform-origin: bottom right;
}

.esse-chat-window.is-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Chat Header */
.esse-chat-header {
  background: #0F1E36;
  color: #ffffff;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.esse-operator-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.esse-avatar-wrapper {
  position: relative;
  width: 40px;
  height: 40px;
}

.esse-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: #ffffff;
}

.esse-online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #10B981;
  border: 2px solid #0F1E36;
  border-radius: 50%;
  animation: esse-online-pulse 2s infinite;
}

@keyframes esse-online-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.esse-operator-name {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.esse-operator-status {
  font-size: 11px;
  color: #9CA3AF;
  margin: 0;
}

.esse-chat-close {
  background: transparent;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.esse-chat-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Chat Body */
.esse-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.esse-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Message items */
.esse-message {
  max-width: 85%;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 14px;
  word-wrap: break-word;
  animation: esse-msg-appear 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes esse-msg-appear {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.esse-message.bot {
  background: #ffffff;
  color: #374151;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.esse-message.user {
  background: #1E3A8A;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 4px rgba(30, 58, 138, 0.15);
}

/* Typing Indicator */
.esse-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #ffffff;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.esse-typing-indicator span {
  width: 6px;
  height: 6px;
  background: #9CA3AF;
  border-radius: 50%;
  display: inline-block;
  animation: esse-typing 1.4s infinite ease-in-out both;
}

.esse-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.esse-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes esse-typing {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Quick option chips */
.esse-chat-quick-options {
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.esse-quick-chip {
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #1E3A8A;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.esse-quick-chip:hover {
  background: #1E3A8A;
  border-color: #1E3A8A;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Input Form */
.esse-chat-input-form {
  display: flex;
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid #E5E7EB;
  align-items: center;
  gap: 8px;
}

.esse-chat-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  color: #374151;
  background: transparent;
}

.esse-chat-send {
  background: transparent;
  border: none;
  color: #1E3A8A;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.esse-chat-send:hover {
  transform: scale(1.1) translateX(2px);
}

.esse-bot-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background: #EAB308;
  color: #0F1E36 !important;
  font-weight: 700;
  border-radius: 6px;
  font-size: 12px;
  text-decoration: none !important;
  text-align: center;
  transition: all 0.2s;
}

.esse-bot-btn:hover {
  background: #CA8A04;
  transform: translateY(-1px);
}

/* Premium Mobile Responsiveness for Leyla Chatbot */
@media (max-width: 480px) {
  .esse-chatbot-container {
    bottom: 16px;
    right: 16px;
  }
  .esse-chat-bubble {
    width: 52px;
    height: 52px;
  }
  .esse-chat-window {
    bottom: 68px;
    width: calc(100vw - 32px);
    max-width: 380px;
    height: 70vh;
    max-height: 450px;
    border-radius: 16px;
  }
  .esse-chat-header {
    padding: 12px 14px;
  }
  .esse-avatar-wrapper {
    width: 34px;
    height: 34px;
  }
  .esse-message {
    font-size: 12.5px;
    padding: 8px 12px;
  }
  .esse-quick-chip {
    padding: 5px 10px;
    font-size: 11px;
  }
  .esse-chat-input-form {
    padding: 10px 12px;
  }
}

