/* =========================================================
   MEBLEKUCHENNE.PL - LIVE CHAT
   Kolor przewodni: #a44644
   ========================================================= */

#wlc-widget,
#wlc-widget * {
  box-sizing: border-box;
}

#wlc-widget {
  --wlc-accent: #a44644;
  --wlc-accent-hover: #963e3c;

  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #111827;
  line-height: 1.35;
}


/* =========================================================
   RESET
   ========================================================= */

#wlc-widget button,
#wlc-widget input,
#wlc-widget textarea {
  font-family: inherit;
  line-height: 1.35;
  box-shadow: none;
  outline: none;
}


/* =========================================================
   OKRĄGŁY PRZYCISK CZATU
   ========================================================= */

#wlc-bubble {
  appearance: none !important;
  -webkit-appearance: none !important;

  position: relative !important;

  width: 54px !important;
  height: 54px !important;

  min-width: 54px !important;
  min-height: 54px !important;

  max-width: 54px !important;
  max-height: 54px !important;

  margin: 0 !important;
  padding: 0 !important;

  border: none !important;
  border-radius: 50% !important;

  background: #a44644 !important;
  background-color: #a44644 !important;

  cursor: pointer !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  font-size: 0 !important;
  line-height: 0 !important;

  overflow: visible !important;

  box-shadow:
    0 6px 16px rgba(164, 70, 68, 0.28) !important;

  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease !important;
}


/* Hover */

#wlc-bubble:hover {
  background: #963e3c !important;
  background-color: #963e3c !important;

  transform: translateY(-2px);

  box-shadow:
    0 9px 22px rgba(164, 70, 68, 0.34) !important;
}


/* Kliknięcie */

#wlc-bubble:active {
  transform: translateY(0);
}


/* Focus */

#wlc-bubble:focus-visible {
  box-shadow:
    0 0 0 4px rgba(164, 70, 68, 0.15),
    0 8px 20px rgba(164, 70, 68, 0.30) !important;
}


/* =========================================================
   UKRYCIE STAREJ IKONY / EMOJI
   ========================================================= */

#wlc-bubble > span:not(.wlc-bubble-dot) {
  display: none !important;
}

#wlc-bubble > svg,
#wlc-bubble > img,
#wlc-bubble > i {
  display: none !important;
}


/* =========================================================
   NOWA BIAŁA IKONA CHATU
   JEDEN KSZTAŁT - DYMEK + OGONEK
   ========================================================= */

#wlc-bubble::before {
  content: "" !important;

  position: absolute !important;

  left: 50% !important;
  top: 50% !important;

  width: 29px !important;
  height: 29px !important;

  transform: translate(-50%, -50%) !important;

  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;

  /*
   * Dymek jest jednym wektorowym kształtem SVG.
   * Dzięki temu ogonek jest integralną częścią ikony.
   */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath fill='%23ffffff' d='M25.5 12.8c0 4.9-5.25 8.9-11.75 8.9-1.25 0-2.48-.15-3.6-.43L6.3 23.9c-.88.6-1.95-.18-1.64-1.2l1.18-3.72C3.43 17.37 2 15.2 2 12.8 2 7.9 7.25 3.9 13.75 3.9s11.75 4 11.75 8.9z'/%3E%3C/svg%3E") !important;

  z-index: 2 !important;

  pointer-events: none !important;
}


/* Nie używamy drugiego pseudo-elementu na ogonek */

#wlc-bubble::after {
  content: none !important;
  display: none !important;
}


/* =========================================================
   KROPKA POWIADOMIENIA
   Ukryta, żeby ikona była czysta jak na wzorze
   ========================================================= */

#wlc-bubble-dot,
.wlc-bubble-dot {
  display: none !important;
}


/* =========================================================
   PANEL CZATU
   ========================================================= */

#wlc-panel {
  display: none;

  width: 390px;
  max-width: calc(100vw - 24px);

  height: 590px;
  max-height: calc(100vh - 34px);

  background: #ffffff !important;
  background-color: #ffffff !important;

  border-radius: 20px;

  overflow: hidden;

  border: 1px solid rgba(17, 24, 39, 0.08);

  box-shadow:
    0 22px 70px rgba(17, 24, 39, 0.22),
    0 4px 14px rgba(17, 24, 39, 0.08);
}


/* =========================================================
   OTWARTY CZAT
   ========================================================= */

#wlc-widget.open #wlc-bubble {
  display: none !important;
}

#wlc-widget.open #wlc-panel {
  display: flex !important;
  flex-direction: column;
}


/* =========================================================
   NAGŁÓWEK
   ========================================================= */

#wlc-panel .wlc-panel-header {
  flex: 0 0 auto;

  min-height: 72px;
  padding: 14px 16px;

  background: #a44644 !important;
  background-color: #a44644 !important;

  color: #ffffff !important;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;
}

#wlc-panel .wlc-panel-header strong {
  display: block;

  margin: 0;

  color: #ffffff !important;

  font-size: 15px;
  font-weight: 800;
}

#wlc-panel .wlc-panel-header span {
  display: block;

  margin-top: 3px;

  color: rgba(255, 255, 255, 0.82) !important;

  font-size: 12px;
}


/* =========================================================
   PRZYCISK ZAMKNIĘCIA
   ========================================================= */

#wlc-close {
  appearance: none !important;
  -webkit-appearance: none !important;

  width: 34px !important;
  height: 34px !important;

  min-width: 34px !important;
  min-height: 34px !important;

  max-width: 34px !important;
  max-height: 34px !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 50% !important;

  background: rgba(255, 255, 255, 0.16) !important;

  color: #ffffff !important;

  cursor: pointer;

  font-size: 26px !important;
  font-weight: 400 !important;
  line-height: 1 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  box-shadow: none !important;
}

#wlc-close:hover {
  background: rgba(255, 255, 255, 0.27) !important;
}


/* =========================================================
   CIAŁO CZATU
   ========================================================= */

#wlc-body {
  padding: 14px;

  flex: 1 1 auto;
  min-height: 0;

  display: flex;
  flex-direction: column;

  background: #ffffff !important;
  background-color: #ffffff !important;
}


/* =========================================================
   INTRO
   ========================================================= */

.wlc-intro {
  margin: 2px 0 14px;

  color: #4b5563;

  font-size: 14px;
}


/* =========================================================
   FORMULARZ STARTOWY
   ========================================================= */

.wlc-form {
  display: flex;
  flex-direction: column;

  gap: 11px;
}

.wlc-form label {
  display: block;

  margin: 0;

  color: #374151;

  font-size: 12px;
  font-weight: 800;
}


/* =========================================================
   POLA FORMULARZA
   ========================================================= */

#wlc-widget .wlc-form input,
#wlc-widget .wlc-message-form textarea {
  width: 100%;
  max-width: 100%;

  padding: 11px 12px;

  border: 1px solid #d1d5db !important;

  background: #ffffff !important;
  background-color: #ffffff !important;

  color: #111827 !important;

  border-radius: 12px !important;

  font-size: 14px !important;

  box-shadow: none !important;
  outline: none !important;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

#wlc-widget .wlc-form input {
  height: 44px;
  margin: 6px 0 0;
}

#wlc-widget .wlc-form input::placeholder,
#wlc-widget .wlc-message-form textarea::placeholder {
  color: #9ca3af !important;
  opacity: 1;
}

#wlc-widget .wlc-form input:focus,
#wlc-widget .wlc-message-form textarea:focus {
  border-color: #a44644 !important;

  box-shadow:
    0 0 0 3px rgba(164, 70, 68, 0.12) !important;
}


/* =========================================================
   GŁÓWNE PRZYCISKI
   ========================================================= */

#wlc-widget .wlc-primary,
#wlc-widget .wlc-message-form button {
  appearance: none !important;
  -webkit-appearance: none !important;

  border: 0 !important;

  border-radius: 14px !important;

  background: #a44644 !important;
  background-color: #a44644 !important;

  color: #ffffff !important;

  cursor: pointer;

  font-size: 14px !important;
  font-weight: 800 !important;

  text-decoration: none !important;

  box-shadow: none !important;

  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}

#wlc-widget .wlc-primary:hover,
#wlc-widget .wlc-message-form button:hover {
  background: #963e3c !important;
  background-color: #963e3c !important;

  color: #ffffff !important;
}

#wlc-widget .wlc-primary:active,
#wlc-widget .wlc-message-form button:active {
  transform: translateY(1px);
}

#wlc-widget .wlc-primary {
  width: 100%;
  height: 46px;

  margin-top: 2px;

  padding: 0 16px;
}


/* =========================================================
   DISABLED
   ========================================================= */

#wlc-widget button:disabled,
#wlc-widget textarea:disabled,
#wlc-widget input:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}


/* =========================================================
   STATUS
   ========================================================= */

.wlc-status {
  flex: 0 0 auto;

  margin: 8px 0 0;
  padding: 9px 11px;

  border-radius: 10px;

  background: #f3f4f6;

  color: #374151;

  font-size: 12px;
}

.wlc-status.is-error {
  background: #fff1f1;

  color: #991b1b;

  border: 1px solid rgba(164, 70, 68, 0.15);
}


/* =========================================================
   LISTA WIADOMOŚCI
   ========================================================= */

.wlc-messages {
  flex: 1 1 auto;
  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 2px 4px 10px 0;

  display: flex;
  flex-direction: column;

  gap: 8px;

  scroll-behavior: smooth;

  scrollbar-width: thin;
  scrollbar-color: rgba(164, 70, 68, 0.55) #f3f4f6;
}


/* Chrome / Edge / Safari */

.wlc-messages::-webkit-scrollbar {
  width: 6px;
}

.wlc-messages::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 999px;
}

.wlc-messages::-webkit-scrollbar-thumb {
  background: rgba(164, 70, 68, 0.55);
  border-radius: 999px;
}

.wlc-messages::-webkit-scrollbar-thumb:hover {
  background: #a44644;
}


/* =========================================================
   POJEDYNCZA WIADOMOŚĆ
   ========================================================= */

.wlc-message {
  display: flex;
  flex-direction: column;

  max-width: 88%;
}

.wlc-message span {
  display: inline-block;

  padding: 10px 12px;

  border-radius: 16px;

  line-height: 1.38;

  white-space: pre-wrap;
  overflow-wrap: anywhere;

  font-size: 14px;
}

.wlc-message small {
  display: block;

  margin-top: 3px;

  color: #6b7280;

  font-size: 10px;
}


/* =========================================================
   WIADOMOŚĆ KLIENTA
   ========================================================= */

.wlc-message.mine {
  align-self: flex-end;
  align-items: flex-end;
}

#wlc-widget .wlc-message.mine span {
  background: #a44644 !important;
  background-color: #a44644 !important;

  color: #ffffff !important;

  border-bottom-right-radius: 5px;
}


/* =========================================================
   WIADOMOŚĆ OBSŁUGI
   ========================================================= */

.wlc-message.theirs {
  align-self: flex-start;
  align-items: flex-start;
}

#wlc-widget .wlc-message.theirs span {
  background: #f3f4f6 !important;
  background-color: #f3f4f6 !important;

  color: #111827 !important;

  border-bottom-left-radius: 5px;
}


/* =========================================================
   WIADOMOŚĆ OCZEKUJĄCA
   ========================================================= */

.wlc-message.is-pending {
  opacity: 0.72;
}


/* =========================================================
   OBSŁUGA PISZE
   ========================================================= */

.wlc-typing {
  flex: 0 0 auto;

  align-self: flex-start;

  margin: 0 0 7px;
  padding: 7px 10px;

  border-radius: 999px;

  background: #f3f4f6;

  color: #4b5563;

  font-size: 12px;
}


/* =========================================================
   FORMULARZ WIADOMOŚCI
   ========================================================= */

.wlc-message-form {
  flex: 0 0 auto;

  display: grid;

  grid-template-columns: minmax(0, 1fr) 78px;

  gap: 8px;

  align-items: end;

  margin: 0;

  padding-top: 10px;

  border-top: 1px solid #eef0f3;
}

#wlc-widget .wlc-message-form textarea {
  display: block;

  height: 44px;

  min-height: 44px !important;
  max-height: 110px;

  margin: 0;

  resize: none;

  overflow-y: auto;

  border-radius: 16px !important;
}

#wlc-widget .wlc-message-form button {
  display: block;

  width: 78px;

  height: 44px;
  min-height: 44px;

  margin: 0;
  padding: 0;

  background: #a44644 !important;
  background-color: #a44644 !important;

  color: #ffffff !important;
}


/* =========================================================
   ROZPOCZNIJ NOWĄ ROZMOWĘ
   ========================================================= */

#wlc-widget .wlc-link-button {
  appearance: none !important;
  -webkit-appearance: none !important;

  flex: 0 0 auto;

  width: 100%;
  min-height: 44px;

  margin: 10px 0 0;
  padding: 0 16px;

  border: 1px solid #a44644 !important;

  border-radius: 14px !important;

  background: #a44644 !important;
  background-color: #a44644 !important;

  color: #ffffff !important;

  cursor: pointer;

  font-size: 13px !important;
  font-weight: 800 !important;

  letter-spacing: 0.01em;

  text-decoration: none !important;

  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.wlc-link-button::before {
  content: "＋";

  display: inline-block;

  margin-right: 6px;

  font-size: 16px;
  line-height: 1;

  vertical-align: -1px;
}

#wlc-widget .wlc-link-button:hover {
  background: #963e3c !important;
  background-color: #963e3c !important;

  border-color: #963e3c !important;

  color: #ffffff !important;

  transform: translateY(-1px);

  box-shadow:
    0 8px 20px rgba(164, 70, 68, 0.18);
}

#wlc-widget .wlc-link-button:focus-visible {
  box-shadow:
    0 0 0 4px rgba(164, 70, 68, 0.14) !important;
}


/* =========================================================
   MUTED
   ========================================================= */

.wlc-muted {
  margin: auto;

  padding: 18px 12px;

  color: #6b7280;

  text-align: center;

  font-size: 14px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 480px) {

  #wlc-widget {
    right: 12px;
    bottom: 12px;
  }

  #wlc-bubble {
    width: 54px !important;
    height: 54px !important;

    min-width: 54px !important;
    min-height: 54px !important;

    max-width: 54px !important;
    max-height: 54px !important;
  }

  #wlc-bubble::before {
    width: 29px !important;
    height: 29px !important;
  }

  #wlc-panel {
    width: calc(100vw - 20px);

    height: min(620px, calc(100vh - 20px));

    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);

    border-radius: 16px;
  }

  .wlc-message-form {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  #wlc-widget .wlc-message-form button {
    width: 72px;
  }
}