.hidden {
    display: none !important;
}

.chat-widget {
  font-family: 'Noto Sans', sans-serif;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  font-family: Arial, sans-serif;
}

.contact-options {
    background: white;
    display: grid;
    gap: 8px;
}

.contact-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3B82F6;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    border: 1px solid #3B82F6;
    border-radius: 8px 8px 8px 4px;
    padding: 4px 8px;
    font-family: 'Noto Sans';
}

.contact-link:hover {
    background: #f0f5ff;
}

.contact-link .icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-link .icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.floating-button {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #0F52BA;          /* ваш цвет */
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 10001;
}

.floating-button span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Размер иконки чата */
.floating-button svg {
  width: 32px;
  height: 32px;
  fill: none;                   /* если используете stroke или fill внутри SVG */
}

/* Крестик */
.floating-button .close-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 32px;
  color: white;
  line-height: 1;
}

.greeting {
  position: relative;
  overflow: visible;
  font-family: 'Noto Sans', sans-serif;
  background: #fff;
  padding: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  margin: 8px 0px;
  font-size: 14px;
  line-height: 1.44;
}

.greeting .close {
    position: absolute;
    top: 0;
    right: 0;
    width: 16px;
    height: 16px;
    transform: translate(50%, -50%);
    background: white;
    box-shadow: 0 0px 10px rgba(0, 0, 0, .2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.greeting .close:hover, .variants button:hover {
    background: #3B82F6;
    border-color: #3B82F6;
}

.greeting .close:hover .close-inner, .variants button:hover {
    color: white;
}

.variants button,
.variants a {
    font-family: 'Noto Sans', sans-serif;
    float: right;
    background: #fff;
    padding: 8px 16px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #3B82F6;
    color: #3B82F6;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

/* Для ссылок-мессенджеров можно сделать инвертированные цвета, как было раньше */
.variants a {
    background: #0F52BA;
    color: white;
}

.greeting-popup {
  position: fixed;
  bottom: 112px;
  right: 35px;
  width: 320px;
  z-index: 10000;
}

.chat-window {
  position: fixed;
  bottom: 112px;
  right: 32px;
  width: 370px;
  height: 620px;
  background: #0F52BA;
  border-radius: 16px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  z-index: 10002;
}

@media (max-width: 768px) {
  .chat-window {
    background: #0F52BA;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  .close-btn-mobile {
      display: block!important; /* показываем кнопку закрытия */
  }

    /* Отступ кружка 8px */
    .floating-button {
        bottom: 8px;
        right: 8px;
    }

    /* chat-messages может иметь дополнительные стили для мобильных */
    .chat-messages {
      border-bottom-left-radius: 0 !important;
      border-bottom-right-radius: 0 !important;
    }
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 16px;
    color: white;
    border-radius: 16px 16px 0 0;
}
.avatar { width: 48px; height: 48px; border-radius: 16px; margin-right: 16px; }
.close-btn { margin-left: auto; background: none; border: none; color: white; font-size: 20px; cursor: pointer; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
}

.message-bubble {
  max-width: 80%;
  padding: 8px 16px;
  word-wrap: break-word;
  font-family: 'Noto Sans';
  font-size: 14px;
  line-height: 1.44;
}
.operator { align-self: flex-start; background: #F5F5F5;border-radius: 16px 16px 16px 8px; }
.user { align-self: flex-end; background: #3B82F6; color: white;border-radius: 16px 16px 8px 16px; }

.input-area {
    display: flex;
    padding: 16px 0 0 0;
    margin-top: auto; /* прижимаем к низу */
}
.input-area input {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #c6c6c9;
    border-radius: 16px;
    font-size: 14px;
}
.input-area button {
  margin-left: 8px;
  padding: 8px 16px;
  background: #0F52BA;
  color: white;
  border: none;
  border-radius: 16px;
  cursor: pointer;
}
.input-area button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Обёртка иконки */
.floating-button .icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* sway-x – покачивание влево-вправо */
.floating-button .icon-wrapper.sway-x svg {
    animation: swayX 2s ease-in-out infinite;
}

/* sway-y – покачивание вверх-вниз */
.floating-button .icon-wrapper.sway-y svg {
    animation: swayY 2s ease-in-out infinite;
}

/* shake – встряхивание */
.floating-button .icon-wrapper.shake svg {
    animation: shake 2s ease-in-out infinite;
}

@keyframes swayX {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

@keyframes swayY {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-3px); }
    75% { transform: translateY(3px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.header-text {
  display: grid;
  gap: 4px;
}

.header-name {
  font-family: 'Noto Sans';
  font-weight: 600;
}

.header-role {
  font-family: 'Noto Sans';
  font-size: 12px;
}

.close-btn-mobile {
    display: none; /* скрыта на десктопе */
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
}
