
.chatForm__page-header {
  text-align: center;
  max-width: 1600px;
  margin: 0 auto 0;
  padding: 0 20px;
}

.chatForm__page-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
}

.chatForm__page-subtitle {
  font-size: 15px;
  color: #64748b;
  margin: 0;
}

/* --- Форма и обёртки --- */
.chatTable-wrapper {
  margin: 24px 0 32px;
  font-family: "Montserrat";
  position: relative;
  overflow: visible;
}

.consultationDate {
  background: transparent !important;
}
.chatTable-form-wrapper {
  max-width: 1600px;
  margin: 0 auto 24px;
}

.chatTable-form-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.chatTable-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.chatTable-status {
  font-size: 14px;
  color: #64748b;
}

.chatTable-status--info {
  color: #64748b;
}

.chatTable-status--success {
  color: #16a34a;
}

.chatTable-status--warning {
  color: #ea580c;
}

.chatTable-status--error {
  color: #b91c1c;
}

.chatTable-section {
  margin-bottom: 8px;
}

.chatTable-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
  align-items: flex-start;
}

.chatTable-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

/* Inline layout для формы контактных данных */
.chatTable-form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  position: relative;
  overflow: visible;
}

.chatTable-form-group--inline {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: visible;
}

.chatTable-form-group--inline .chatTable-input {
  height: 42px;
}

.chatTable-button-group--inline {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 0;
}

.chatTable-button-group--inline .chatTable-button {
  width: auto;
  white-space: nowrap;
  padding: 10px 16px;
  height: 42px;
  margin-top: 14px;
}

#contactSaveBtn {
  width: 167px;
}

.chatTable-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  position: relative;
  overflow: visible;
}

.chatTable-form-group--channel {
  margin: 12px 0;
}

.chatTable-label {
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  margin-left: 10px;
  position: relative;
  overflow: visible;
}

.chatTable-input,
.chatTable-select,
.chatTable-textarea {
  border-radius: 0px;
  width: 100%;
  border: 1.5px solid #cbc9c9 !important;
  padding: 3px 12px;
  margin: 0;
  font-size: 14px !important;
  font-family: inherit;
  min-height: 40px;
  background: white !important;
  color: #0f172a;
  transition: all 0.2s ease;
}

.chatTable-input::placeholder,
.chatTable-textarea::placeholder {
  color: #94a3b8;
  font-size: 13px;
  opacity: 1;
}
.chatTable-textarea {
  height: 96px;
}

.chatTable-input:focus,
.chatTable-select:focus,
.chatTable-textarea:focus {
  outline: none;
  border-color: #fc7a22;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(252, 122, 34, 0.12);
}

.required {
  color: #ef4444;
}

.error-msg {
  color: #ef4444;
  font-size: 12px;
  min-height: 16px;
  display: block;
  margin-top: 2px;
}

.hint {
  color: #64748b;
  font-size: 12px;
  margin-top: 2px;
}

/* Подсказки в форме */
.chatTable-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 8px;
  animation: fadeInHint 0.3s ease-out;
}

.chatTable-hint__icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.4;
}

.chatTable-hint__text {
  line-height: 1.5;
  color: inherit;
}

.chatTable-hint--warning {
  background: linear-gradient(135deg, #fef3cd 0%, #fff3e0 100%);
  border: 1px solid #f59e0b;
  color: #92400e;
}

.chatTable-hint--info {
  background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
  border: 1px solid #3b82f6;
  color: #1e40af;
}

@keyframes fadeInHint {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chatTable-input.invalid,
.chatTable-select.invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18);
}

.chatTable-input:disabled,
.chatTable-select:disabled,
.chatTable-textarea:disabled,
.chatTable-input--readonly,
.chatTable-select--readonly {
  background: #f8fafc !important;
  color: #475569;
  cursor: not-allowed;
  opacity: 0.85;
  border-color: #e2e8f0 !important;
}

.chatTable-input:disabled::placeholder,
.chatTable-textarea:disabled::placeholder {
  color: #94a3b8;
}

.chatTable-form-wrapper--editing .chatTable-select#chatTable-city:disabled {
  background: #f1f5f9 !important;
  cursor: default;
  opacity: 0.7;
}

.phone-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.phone-code-select {
  width: 90px;
  flex-shrink: 0;
  cursor: pointer;
}

.phone-input {
  flex: 1;
}

/* --- Телефон (intl-tel-input) --- */
.phone-input-wrapper--intl {
  display: block;
  gap: 0;
}

.phone-input-wrapper--intl .iti {
  width: 100%;
}

.phone-input-wrapper--intl .iti__tel-input {
  width: 100%;
  border-radius: 0px;
  border: 1.5px solid #cbc9c9 !important;
  padding: 10px 12px 10px 115px;
  font-size: 14px !important;
  font-family: inherit;
  min-height: 40px;
  background: white !important;
  color: #0f172a;
  transition: all 0.2s ease;
}

.phone-input-wrapper--intl .iti__tel-input:focus {
  outline: none;
  border-color: #fc7a22 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(252, 122, 34, 0.12);
}

.phone-input-wrapper--intl .iti__tel-input:disabled,
.phone-input-wrapper--intl .iti__tel-input.chatTable-input--readonly {
  background: #f8fafc !important;
  color: #64748b !important;
  cursor: not-allowed;
  opacity: 1;
  border-color: #e2e8f0 !important;
}

/* Disabled state for country selector */
.phone-input-wrapper--intl
  .iti__tel-input:disabled
  + .iti__country-container
  .iti__selected-country-primary,
.phone-input-wrapper--intl
  .iti__country-container:has(+ input:disabled)
  .iti__selected-country-primary {
  background: #f8fafc;
  cursor: not-allowed;
  pointer-events: none;
}

.phone-input-wrapper--intl
  .iti__tel-input:disabled
  ~ .iti__country-container
  .iti__selected-dial-code,
.phone-input-wrapper--intl
  .chatTable-input--readonly
  ~ .iti__country-container
  .iti__selected-dial-code {
  color: #64748b !important;
}

.phone-input-wrapper--intl .iti__country-container {
  border-right: 1px solid #e2e8f0;
}

.phone-input-wrapper--intl .iti__selected-country-primary {
  padding: 0 8px 0 12px;
  background: #f8fafc;
  border-radius: 0;
}

.phone-input-wrapper--intl .iti__selected-country-primary:hover {
  background: #f1f5f9;
}

.phone-input-wrapper--intl .iti__dropdown-content {
  border: 1.5px solid #cbc9c9;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  max-height: 300px;
}

.phone-input-wrapper--intl .iti__search-input {
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px 8px 32px;
  font-size: 13px;
  margin: 8px;
  width: calc(100% - 16px);
}

.phone-input-wrapper--intl .iti__search-input:focus {
  outline: none;
  border-color: #fc7a22;
  box-shadow: 0 0 0 2px rgba(252, 122, 34, 0.1);
}

.phone-input-wrapper--intl .iti__country {
  padding: 10px 12px;
  font-size: 13px;
}

.phone-input-wrapper--intl .iti__country:hover,
.phone-input-wrapper--intl .iti__country.iti__highlight {
  background-color: #fff7ed;
}

.phone-input-wrapper--intl .iti__dial-code {
  color: #64748b;
}

.phone-input-wrapper--intl .iti__flag {
  margin-right: 6px;
}

.phone-input-wrapper--intl .iti__selected-dial-code {
  color: #64748b;
  font-size: 15px;
}

/* Fix for dropdown attached to body */
.iti--container {
  z-index: 9999 !important;
}

.iti--container .iti__dropdown-content {
  border: 1.5px solid #cbc9c9;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.15);
  background: white;
  min-width: 300px;
  max-width: 350px;
}

.iti--container .iti__country-list {
  display: block !important;
  max-height: 280px;
  overflow-y: auto;
  white-space: normal !important;
}

.iti--container .iti__country {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  width: 100% !important;
  box-sizing: border-box;
}

.iti--container .iti__country:hover,
.iti--container .iti__country.iti__highlight {
  background-color: #fff7ed;
}

.iti--container .iti__flag {
  flex-shrink: 0;
  margin-right: 8px;
}

.iti--container .iti__country-name {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iti--container .iti__dial-code {
  color: #64748b;
  font-size: 12px;
  flex-shrink: 0;
  margin-left: 8px;
}

.iti--container .iti__search-input {
  width: calc(100% - 16px);
  margin: 8px;
  padding: 8px 12px 8px 32px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
}

.iti--container .iti__search-input:focus {
  outline: none;
  border-color: #fc7a22;
}

/* --- Кнопки --- */
.chatTable-button-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.chatTable-button-cancel {
  background-color: #475569;
  color: white;
}
.chatTable-button {
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.chatTable-button-submit {
  background: #fc7a22;
  width: 60%;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(252, 122, 34, 0.25);
}

.chatTable-button-submit:hover {
  background: #fc7a22;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(252, 122, 34, 0.35);
}

.chatTable-button-submit:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(148, 163, 184, 0.4);
}

.chatTable-button-secondary {
  width: 70%;
  background: #fc7a22;
  color: #ffffff;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.25);
}

.chatTable-button-warning {
  background: #fee2e2;
  color: #b91c1c;
}

.chatTable-button-warning:hover {
  background: #fecaca;
}

.chatTable-button-ghost {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  box-shadow: none;
  margin-top: 0px;
}

.chatTable-button-ghost:hover {
  background: #e2e8f0;
}

/* Кнопка переноса консультации */
.chatTable-button-reschedule {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  box-shadow: none;
  margin-top: 0px;
  font-weight: 500;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.chatTable-button-reschedule:hover {
  background: #fde68a;
  border-color: #d97706;
}

.chatTable-button-reschedule:disabled {
  background: #fef9c3;
  color: #a16207;
  border-color: #fcd34d;
  cursor: not-allowed;
  opacity: 0.7;
}

.chatForm__orderBtn {
  display: flex;
  justify-content: flex-end;
}

.chatTable-button-order {
  width: auto;
  white-space: nowrap;
  padding-inline: 20px;
  margin-bottom: 0;
}

/* --- Основной блок chatForm и таблица --- */
.chatForm {
  background: transparent;
  font-family:
    "Montserrat",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    sans-serif;
  margin-top: 40px;
}

.chatForm__canvas {
  max-width: 1600px;
  margin: 0 auto;
  border-radius: 16px;
  background: #ffffff;
}

.chatForm__table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  table-layout: fixed;
}

.chatForm__table-headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

/* Блок контактных данных внутри chatForm__table-headline - на всю ширину */
.chatForm__table-headline .chatTable-wrapper {
  width: 100%;
  flex-basis: 100%;
  margin: 16px 0 0;
}

.chatForm__table-headline h2 {
  font-size: 18px;
  font-weight: 500;
  color: #0f172a;
  margin-bottom: 4px;
}
.chat-csat-container {
  padding: 0 !important;
}

/* Обёртка для кнопки создания заявки - по центру */
.chatForm__create-btn-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0px 0;
}

.chatForm__no-subscription {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 70%;
  margin: 12px auto 0;
  padding: 14px 20px;
  background: linear-gradient(135deg, #fef3cd 0%, #fff3e0 100%);
  border: 1px solid #ffc107;
  border-radius: 12px;
  color: #856404;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
  animation: fadeInWarning 0.3s ease-out;
}

.chatForm__no-subscription-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.chatForm__no-subscription-text {
  line-height: 1.4;
}

@keyframes fadeInWarning {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chatTable-button-order:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #94a3b8;
  border-color: #94a3b8;
}

.chatTable-button-order:disabled:hover {
  background: #94a3b8;
  border-color: #94a3b8;
  transform: none;
  box-shadow: none;
}

.chatForm__table-wrapper--disabled .chatForm__body {
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.chatForm__table-wrapper--disabled .chatForm__row {
  cursor: not-allowed;
}

.chatForm__table-wrapper--disabled .chatForm__toggle-btn {
  pointer-events: none;
  opacity: 0.5;
}

.chatForm__table-wrapper {
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  padding: 0px 20px 20px 20px;
  margin-bottom: 24px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  transition: all 0.3s ease;
}

.chatForm__table-wrapper:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
}

.chatForm__table thead {
  background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid #cbd5e1;
}

.chatForm__head-cell {
  padding: 18px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-right: 1px solid #e2e8f0;
  white-space: nowrap;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.chatForm__head-cell:last-child {
  border-right: none;
  text-align: center;
}

.chatForm__head-cell--toggle {
  width: 40px;
}

.chatForm__cell {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  font-size: 14px;
  color: #0f172a;
  vertical-align: middle;
}

.chatForm__cell:last-child {
  border-right: none;
  text-align: start;
}

.chatForm__row:nth-child(even) {
  background: #fafbfc;
}

.chatForm__row:nth-child(even):hover {
  background: #f0f4f8;
}

.chatForm__row {
  cursor: pointer;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.chatForm__row:hover {
  background: #f0f4f8;
}

.chatForm__row--active {
  background: #e0f2fe !important;
  box-shadow: inset 3px 0 0 #0ea5e9;
}

.chatForm__row--active:hover {
  background: #bae6fd !important;
}

.chatForm__row--empty .chatForm__cell {
  padding: 40px 16px;
}

.empty-state {
  padding: 20px;
  text-align: center;
}

.empty-state__icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.empty-state__title {
  color: #0f172a;
  font-size: 16px;
  margin-bottom: 4px;
  font-weight: 600;
}

.empty-state__text {
  color: #64748b;
  font-size: 14px;
}

.chatForm__period {
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
}

.chatForm__period-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.chatForm__client-name {
  font-weight: 600;
  color: #0f172a;
}

.chatForm__client-id {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.chatForm__contact-name {
  font-size: 13px;
  color: #475569;
}

.chatForm__contact-phone {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.chatForm__manager {
  font-size: 13px;
  color: #0f172a;
  font-weight: 500;
}

.chatForm__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
}

.chatForm__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chatForm__badge--active {
  background: #dcfce7;
  color: #166534;
}

.chatForm__badge--active .chatForm__badge-dot {
  background: #22c55e;
}

.chatForm__badge--draft {
  background: #e5e7eb;
  color: #374151;
}

.chatForm__badge--draft .chatForm__badge-dot {
  background: #9ca3af;
}

.chatForm__badge--new {
  background: #dbeafe;
  color: #1e40af;
}

.chatForm__badge--new .chatForm__badge-dot {
  background: #3b82f6;
}

.chatForm__badge--pending {
  background: #fef3c7;
  color: #92400e;
}

.chatForm__badge--pending .chatForm__badge-dot {
  background: #f59e0b;
}

.chatForm__badge--resolved {
  background: #dbeafe;
  color: #1e40af;
}

.chatForm__badge--resolved .chatForm__badge-dot {
  background: #60a5fa;
}

.chatForm__badge--closed {
  background: #dbeafe;
  color: #1e40af;
}

.chatForm__badge--closed .chatForm__badge-dot {
  background: #60a5fa;
}

.chatForm__badge--cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.chatForm__badge--cancelled .chatForm__badge-dot {
  background: #ef4444;
}

.chatForm__status-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

.chatForm__delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chatForm__delete-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.chatForm__delete-btn:active {
  background: #fecaca;
  transform: scale(0.95);
}

.chatForm__delete-icon {
  font-size: 20px;
  line-height: 1;
  font-weight: bold;
  display: inline-block;
}

.chatForm__source {
  font-size: 13px;
  color: #475569;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.chatForm__cell--source {
  max-width: 250px;
  min-width: 150px;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  padding: 8px 12px;
}

.chatForm__appeal-type {
  font-size: 13px;
  color: #475569;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.chatForm__cell--appeal-type {
  max-width: 250px;
  min-width: 150px;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  padding: 8px 12px;
}

.chatForm__rating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.chatForm__cell--toggle {
  text-align: center;
  vertical-align: middle;
  padding: 4px;
  position: relative;
  overflow: visible;
}

.chatForm__toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.chatForm__toggle-btn:hover {
  background: #f0f4f8;
  border-color: #fc7a22;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.chatForm__toggle-icon {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-left: 2px solid #4b5563;
  border-bottom: 2px solid #4b5563;
  transform: rotate(-136deg);
  transition: transform 0.15s ease;
}

.chatForm__toggle-btn[aria-expanded="true"] .chatForm__toggle-icon {
  transform: rotate(-45deg);
}

.chatForm__unread-badge {
  background-color: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
  animation: badge-pulse 2s infinite;
  pointer-events: none;
  margin-left: 6px;
  flex-shrink: 0;
}

@keyframes badge-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* --- Детали заявки (чат + форма) --- */
.chatForm__details {
  margin-top: 0px;
}

.chatForm__details-grid {
  display: flex;
  gap: 0;
  align-items: stretch;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  max-height: 880px;
}

.chatForm__details-chat {
  position: relative;
  flex: 2;
  height: 100%;
  min-height: 740px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e5e7eb;
}

.chatForm__chat-host {
  height: 100%;
  min-height: 740px;
  display: flex;
  flex-direction: column;
}

.chatForm__chat-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.chatForm__details-form {
  position: relative;
  flex: 1;
  width: 100%;
  padding: 20px 20px 0px 20px;
  background: #ffffff;
  font-family:
    "Montserrat",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Helvetica",
    "Arial",
    sans-serif !important;
}

.chatForm__details-form input,
.chatForm__details-form select,
.chatForm__details-form button,
.chatForm__details-form label {
  font-family:
    "Montserrat",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Helvetica",
    "Arial",
    sans-serif !important;
}

.chat-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 14px;
  gap: 12px;
}

.chat-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: chat-spin 0.8s linear infinite;
}

@keyframes chat-spin {
  to {
    transform: rotate(360deg);
  }
}
/* --- Медиа-запросы (адаптив) --- */
@media (max-width: 1200px) {
  .chatTable-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chatForm__details-chat,
  .chatForm__details-form {
    width: 100%;
  }

  .chatForm__details-chat {
    min-height: 600px;
  }

  .chatForm__chat-host {
    min-height: 600px;
  }

  .chatForm__details-form {
    width: 70%;
    margin: 0 auto;
  }
}

@media (max-width: 1114px) {
  .chatTable-form-header {
    justify-content: center !important;
  }
  #consultationLimitsInfo {
    padding: 0 !important;
  }
}
@media (max-width: 1028px) {
  .chatForm__canvas {
    padding: 12px;
  }

  .chatForm__table-wrapper {
    padding: 16px;
  }

  .chatForm__head-cell,
  .chatForm__cell {
    padding: 10px 8px;
    font-size: 13px;
  }

  .chatForm__head-cell {
    font-size: 11px;
  }

  .chatForm__client-name {
    font-size: 13px;
  }

  .chatForm__client-id,
  .chatForm__contact-phone,
  .chatForm__period-sub {
    font-size: 12px;
  }

  .chatForm__table-headline {
    flex-wrap: wrap;
    gap: 12px;
  }

  .chatTable-button-order {
    align-self: flex-end;
  }
}

.chatForm__cell,
.chatForm__head-cell {
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  min-width: 0;
}
.chatTable-col--buttons {
  display: flex;
  align-items: flex-end;
}

.chatTable-button-group--bottom {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
@media (max-width: 992px) {
  .chatTable-button-group--inline .chatTable-button {
    width: 30%;
  }
  .chatForm__head-row {
    display: none !important;
  }
  .chatForm__canvas {
    padding: 16px;
  }
  .chatTable-button-cancel {
    margin: 0 auto;
  }
  .chatForm__details-grid {
    display: flex;
    flex-direction: column-reverse;
    gap: 16px;
    align-items: stretch;
    padding-bottom: 20px;
    width: 100%;
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
  }

  .chatForm__details-chat {
    flex: none;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
  }

  .chatForm__details-form {
    flex: none;
    width: 80%;
    max-width: 100%;
    min-width: 0;
  }

  .chatForm__chat-host .chat-widget {
    width: 100%;
    max-width: 100%;
  }
  .chatTable-form-group--half {
    display: flex !important;
  }
  .form_toggle {
    width: 60% !important;
    margin: 0 auto;
  }
  .chatForm__skeleton-create-btn {
    top: 30px !important;
  }

  .chatForm__create-buttons-wrapper {
    top: 30px !important;
    flex-direction: row;
    gap: 8px;
    left: 50% !important;
  }

  .chatForm__create-buttons-wrapper .chatForm__skeleton-create-btn {
    width: 180.94px;
    min-width: auto;
  }

  .chatTable-button-secondary {
    width: 50%;
    margin: 0 auto;
  }

  /* Responsive chatTable-form-inline */
  .chatTable-form-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: end;
  }

  .chatTable-form-group--inline {
    width: 100%;
    min-width: 0;
    margin: 0;
    flex: none; /* Disable flex behavior from desktop styles */
  }

  /* Make the button group span full width and center */
  .chatTable-button-group--inline {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
  }

  /* Reset button margins for this layout */
  .chatTable-button-group--inline .chatTable-button {
    margin-top: 0;
  }
}

@media (max-width: 970px) {
  .chatForm__appeal-type {
    font-size: 11px;
  }
  .chatForm__badge {
    font-size: 10px;
    padding: 6px 8px;
  }
  .chatForm__manager {
    font-size: 11px;
  }
  .chatForm__contact-name {
    font-size: 12px;
  }
  .chatForm__client-id,
  .chatForm__contact-phone,
  .chatForm__period-sub {
    font-size: 11px;
  }
  .chatForm__client-name {
    font-size: 11px;
  }
  .chatForm__period {
    font-size: 12px;
  }
  .chatForm__period-time {
    font-size: 11px;
  }
  .chatForm__head-cell {
    font-size: 10px;
    padding: 10px 0;
    text-align: center;
  }
}

@media (max-width: 850px) {
  .chatForm__badge {
    font-size: 9px;
    padding: 6px 6px;
  }
  .chatForm__appeal-type {
    font-size: 10px;
  }
  .chatForm__client-id,
  .chatForm__contact-phone,
  .chatForm__period-sub {
    font-size: 10px;
  }
  .chatForm__manager {
    font-size: 10px;
  }
  .chatForm__period {
    font-size: 11px;
  }
  .chatForm__head-cell {
    font-size: 8px;
  }
}
@media (max-width: 785px) {
  .chatForm__cell--details {
    display: block;
    padding: 0;
    border-bottom: none;
  }
  .chatTable-form-header {
    flex-direction: column;
    gap: 0px;
  }
  .chatTable-form-header h2 {
    font-size: 16px;
    margin: 0;
    line-height: 20px;
  }
  .chat-widget {
    min-height: 490px;
  }

  .chatForm__details-grid {
    padding-bottom: 0;
  }
  .chatForm__details-form {
    padding: 10px 20px;
  }

  .chatForm__cell--details::before {
    content: "";
    display: none;
  }

  .chatForm__table-wrapper {
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  }

  .chatForm__table-headline {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .subscr__wrapper {
    padding: 0px;
  }
  .chatForm__canvas {
    padding: 0;
  }
  .chatForm__table-headline h2 {
    font-size: 18px;
  }

  .chatTable-button-order {
    width: 200px;
    margin: 0 auto;
    padding: 10px;
    align-self: stretch;
  }

  .chatForm__table {
    display: block;
    width: 100%;
    border: 0;
    overflow-x: visible;
  }

  .chatForm__thead,
  .chatForm__table thead {
    display: none;
  }

  .chatForm__body {
    display: block;
    width: 100%;
  }

  .chatForm__row {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    cursor: default;
  }

  .chatForm__row:nth-child(even),
  .chatForm__row:hover {
    background: #ffffff;
  }

  .chatForm__row--active {
    background: #eff6ff !important;
    box-shadow: 0 0 0 2px #0ea5e9;
  }

  .chatForm__row--empty .chatForm__cell {
    display: block;
    border-bottom: none;
  }

  .chatForm__row--empty .chatForm__cell::before {
    content: "";
  }

  .chatForm__row:not(.chatForm__row--details) .chatForm__cell {
    display: flex;
    justify-content: normal;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
    position: relative;
  }

  .chatForm__toggle-btn {
    position: absolute;
    right: 20px;
  }

  .chatForm__row:not(.chatForm__row--details) .chatForm__cell:last-child {
    border-bottom: none;
  }

  .chatForm__row:not(.chatForm__row--details) .chatForm__cell::before {
    content: attr(data-label);
    flex: 0 0 40%;
    max-width: 40%;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    padding: 6px 0;
    text-align: start;
  }

  .chatForm__cell span,
  .chatForm__cell div,
  .chatForm__cell p {
    font-size: 13px;
  }

  .chatForm__cell--source,
  .chatForm__cell--appeal-type {
    max-width: 100%;
  }

  .chatForm__source,
  .chatForm__appeal-type {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .chatForm__status-wrapper {
    justify-content: flex-end;
  }

  .chatForm__cell--toggle {
    justify-content: center;
  }

  .chatForm__cell--toggle::before {
    content: "";
  }

  .chatForm__expand-wrapper {
    padding-top: 12px;
  }

  .chatForm__expand-btn {
    width: 100%;
    justify-content: center;
    font-size: 13px;
  }
}

@media (max-width: 550px) {
  .chatForm__details-form {
    width: 100%;
  }
  .chatTable-form-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .form_toggle {
    width: 100% !important;
  }

  .chatTable-form-inline {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .chatTable-button-group--inline {
    flex-direction: column;
    width: 100%;
  }

  .chatTable-button-group--inline .chatTable-button {
    width: 54%;
  }
  .chatTable-col {
    width: 100%;
  }

  .chatTable-col--buttons {
    width: 100%;
  }

  .chatTable-button-group--bottom {
    flex-direction: column;
    align-items: stretch;
    margin-top: 4px;
  }

  .chatTable-button-group--bottom .chatTable-button {
    width: 100%;
  }
}

@media (max-width: 410px) {
  .chatForm__create-buttons-wrapper {
    flex-direction: column;
    padding-bottom: 30px;
    width: 100%;
  }
  #duplicateStartConsultationBtn {
    width: 54%;
  }
  .chatForm__skeleton-create-btn.cancel-mode {
    width: 54% !important;
  }
}

@media (max-width: 380px) {
  .chatForm__row:not(.chatForm__row--details) .chatForm__cell::before {
    padding: 6px 6px;
  }
  .chatTable-input,
  .chatTable-select,
  .chatTable-textarea {
    font-size: 12px !important;
  }
  .chatTable-button-secondary {
    width: 100%;
  }
}

@media (max-width: 360px) {
  /* Адаптив для chatTable-form-inline */
  .chatTable-form-inline {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  #duplicateStartConsultationBtn {
    width: 100%;
  }
  .chatForm__skeleton-create-btn.cancel-mode {
    width: 100% !important;
  }
  .chatTable-form-group--inline {
    min-width: 0;
    width: 100%;
    flex: none;
  }

  .chatTable-form-group--inline .chatTable-label {
    font-size: 12px;
    margin-left: 8px;
    margin-bottom: 4px;
  }

  .chatTable-form-group--inline .chatTable-input {
    height: 40px;
    font-size: 13px !important;
    padding: 8px 10px;
  }

  .phone-input-wrapper {
    width: 100%;
  }

  .chatTable-button-group--inline {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    margin-top: 8px;
    width: 100%;
  }

  .chatTable-button-group--inline .chatTable-button {
    width: 100%;
    margin-top: 0;
    height: 40px;
    padding: 10px 16px;
    font-size: 13px;
    justify-content: center;
  }

  #contactSaveBtn {
    width: 100%;
  }
}

.chatForm__row--hidden {
  display: none !important;
}

.chatForm__expand-wrapper {
  display: flex;
  justify-content: center;
  padding: 20px 0 0;
  margin-top: 8px;
}

.chatForm__expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chatForm__expand-btn:hover {
  background: #f0f4f8;
  border-color: #fc7a22;
  color: #fc7a22;
  box-shadow: 0 2px 8px rgba(252, 122, 34, 0.15);
}

.chatForm__expand-btn:active {
  transform: translateY(1px);
}

.chatForm__expand-icon {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.chatForm__expand-btn--expanded .chatForm__expand-icon {
  transform: rotate(135deg);
}

.subscr__wrapper {
  position: relative;
  width: 100%;
}

/* --- Блокировка и предупреждения --- */
.blocking-container {
  position: absolute;
  top: 15vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  z-index: 2000;
  pointer-events: none;
}

.blocking-warning-header {
  display: none;
  padding: 24px 32px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  animation: scaleFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  pointer-events: auto;
  text-align: center;
}

@keyframes scaleFadeIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideDownFade {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.blocking-warning-header--danger {
  background: rgba(254, 242, 242, 0.9);
  border-color: #fca5a5;
  color: #991b1b;
}

.blocking-warning-header--warning {
  background: rgba(255, 251, 235, 0.9);
  border-color: #fcd34d;
  color: #92400e;
}

.blocking-warning-header h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.blocking-warning-header p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
}

.chatTable-wrapper.is-blocked-all,
.chatForm.is-blocked-all {
  position: relative;
}

.blocking-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.45);
  z-index: 50;
  border-radius: inherit;
  pointer-events: all;
  cursor: not-allowed;
  display: none;
  backdrop-filter: grayscale(0.7) blur(1px);
}

.is-blocked-all .blocking-overlay {
  display: block;
}

@media (max-width: 768px) {
  .blocking-container {
    top: 10vh;
  }
  .blocking-warning-header {
    padding: 18px 20px;
  }
  .blocking-warning-header h3 {
    font-size: 17px;
  }
  .blocking-warning-header p {
    font-size: 14px;
  }
}

/* --- Вложения (файлы, превью) --- */
.chat-file-attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  max-width: 100%;
  margin-top: 4px;
}

.chat-file-attachment:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.chat-file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 8px;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  color: #64748b;
}

.chat-file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.chat-file-name {
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-file-type {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
}

.chat-message-user .chat-file-attachment {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.chat-message-user .chat-file-attachment:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.chat-message-user .chat-file-icon {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.chat-message-user .chat-file-name {
  color: #ffffff;
}

.chat-message-user .chat-file-type {
  color: rgba(255, 255, 255, 0.8);
}

.chat-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 12px;
  display: block;
  margin-top: 0px !important;
  cursor: pointer;
  object-fit: contain;
}

.chat-file-preview {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.chat-image-preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: 12px;
  display: block;
  object-fit: contain;
}

/* --- Переключатель формы (каналы и т.п.) --- */
.form_toggle {
  display: flex;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 10px;
}

.form_toggle-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form_toggle-item input[type="radio"] {
  display: none;
}

.form_toggle-item label {
  display: flex;
  width: 100%;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  height: 100%;
  max-width: 100%;
  padding: 2px 4px;
  line-height: 1.1;
  text-align: center;
  font-size: 13px;
  border: 1px solid #999;
  border-right: none;
  cursor: pointer;
  user-select: none;
  background: #fff;
  transition:
    background 0.2s ease,
    color 0.2s ease;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.form_toggle .item-1 label {
  border-radius: 6px 0 0 6px;
}

.form_toggle .item-2 label {
  border-radius: 0 6px 6px 0;
  border-right: 1px solid #999;
}

.form_toggle .item-1 input[type="radio"]:checked + label {
  background: #e6f0ff;
  color: #1a4fd8;
  border-color: #1a4fd8;
}

.form_toggle .item-2 input[type="radio"]:checked + label {
  background: #e6f0ff;
  color: #1a4fd8;
  border-color: #1a4fd8;
}

.form_toggle-item input[type="radio"]:disabled + label {
  background: #f8fafc !important;
  color: #64748b !important;
  border-color: #e2e8f0 !important;
  cursor: not-allowed;
  opacity: 0.85;
}

.form_toggle-item input[type="radio"]:disabled:checked + label {
  background: #e8f4fd !important;
  color: #64748b !important;
  border-color: #94a3b8 !important;
  cursor: not-allowed;
}

.chatTable-form-main {
  display: flex;
  gap: 6px;
  justify-content: space-evenly;
  align-items: flex-end;
}

.preferred-time-group {
  margin: 12px 0;
}

.preferred-time-toggle {
  margin-bottom: 12px;
}

.preferred-time-fields {
  margin-top: 8px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.preferred-time-fields .chatTable-form-group {
  margin-bottom: 0;
}

.preferred-time-fields .hint {
  display: block;
  margin-top: 4px;
  color: #64748b;
  display: none;
}

.preferred-time-fields .chatTable-input[type="time"],
.preferred-time-fields .chatTable-input[type="date"] {
  max-width: 200px;
}

@media (max-width: 620px) {
  .form_toggle {
    width: 80% !important;
  }
}
@media (max-width: 550px) {
  .preferred-time-fields .chatTable-form-main {
    flex-direction: column;
    gap: 12px;
  }

  .preferred-time-fields .chatTable-input[type="time"],
  .preferred-time-fields .chatTable-input[type="date"] {
    max-width: 100%;
  }
  .form_toggle {
    width: 100% !important;
  }
  .chatTable-form-main {
    align-items: stretch;
  }
}

.channel-disabled-message {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  font-size: 12px;
  color: #92400e;
}

.form_toggle-item.channel-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.form_toggle-item.channel-disabled label {
  cursor: not-allowed;
}

@media (max-width: 380px) {
  .chatTable-button {
    padding: 8px 12px;
    font-size: 12px;
  }

  .chatTable-button-group {
    gap: 6px;
    margin-top: 8px;
  }

  .chatForm__details-grid {
    padding-bottom: 0;
  }

  .chatForm__details-form {
    padding: 10px 12px;
  }

  .chatForm__details-header {
    padding: 0 12px;
    margin-bottom: 10px;
  }

  .chatForm__details-header h3 {
    font-size: 16px;
  }

  .chat-widget {
    min-height: 420px;
  }
}

.consultation-skeleton-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  padding: 24px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: skeleton-fade-in 0.3s ease-out;
}

.consultation-skeleton-overlay--active {
  display: flex;
}

@keyframes skeleton-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Скелетон (загрузка) --- */
.skeleton-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.skeleton-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #fc7a22;
  border-radius: 50%;
  animation: skeleton-spin 0.8s linear infinite;
}

@keyframes skeleton-spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.skeleton-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}

.skeleton-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skeleton-row {
  display: flex;
  gap: 16px;
}

.skeleton-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-label {
  height: 12px;
  width: 80px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-input {
  height: 40px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.1s;
}

.skeleton-textarea {
  height: 80px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  border-radius: 8px;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.2s;
}

.skeleton-button {
  height: 44px;
  width: 180px;
  background: linear-gradient(90deg, #fed7aa 25%, #ffedd5 50%, #fed7aa 75%);
  background-size: 200% 100%;
  border-radius: 10px;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.3s;
  margin-top: 8px;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-progress {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.skeleton-progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.skeleton-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #fc7a22, #f97316);
  border-radius: 3px;
  animation: skeleton-progress 2s ease-in-out infinite;
}

@keyframes skeleton-progress {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

.skeleton-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: #64748b;
}

.skeleton-status-dot {
  width: 8px;
  height: 8px;
  background: #fc7a22;
  border-radius: 50%;
  animation: skeleton-pulse 1s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.9);
  }
}

.chatForm__row--skeleton {
  pointer-events: none;
  background: #fafbfc;
  cursor: default !important;
}

.chatForm__row--skeleton .chatForm__toggle-icon {
  display: none;
}

.chatForm__row--skeleton:hover {
  background: #fafbfc !important;
}

.chatForm__table-skeleton-wrapper {
  position: relative;
}

.chatForm__skeleton-create-btn {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
  white-space: nowrap;
  padding: 0;
  width: 167.94px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatForm__create-buttons-wrapper {
  position: absolute;
  top: 90px;
  left: 51.5%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: auto;
}

.chatForm__create-buttons-wrapper .chatForm__skeleton-create-btn {
  position: static;
  transform: none;
}

#duplicateStartConsultationBtn {
  min-width: 180.94px;
  background: #fc7a22 !important;
  color: white !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

#duplicateStartConsultationBtn:hover {
  background: #f0853d !important;
}

.duplicate-start-consultation-hidden {
  display: none !important;
}

#duplicateStartConsultationBtn:active {
  background: #e6731a !important;
}

.chatForm__skeleton-create-btn.cancel-mode {
  width: 180.94px;
  background: #64748b;
  color: white;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.15);
}

.chatForm__skeleton-create-btn.cancel-mode:hover {
  transform: translateY(-1px);
}

.chatForm__skeleton-create-btn.cancel-mode:active {
  transform: translateY(0);
}

.chatForm__skeleton-create-btn:hover {
  transform: translateY(-1px);
}

.chatForm__skeleton-create-btn:active {
  transform: translateY(0);
}

.chatForm__create-buttons-wrapper
  .chatForm__skeleton-create-btn.cancel-mode:hover {
  transform: translateY(-1px);
}

.chatForm__create-buttons-wrapper
  .chatForm__skeleton-create-btn.cancel-mode:active {
  transform: translateY(0);
}

.chatForm__create-buttons-wrapper .chatForm__skeleton-create-btn:hover {
  transform: translateY(-1px);
}

.chatForm__create-buttons-wrapper .chatForm__skeleton-create-btn:active {
  transform: translateY(0);
}

.chatForm__skeleton-btn {
  opacity: 0.5;
  cursor: default !important;
  display: none;
}

.chatForm__row--skeleton .chatForm__cell {
  vertical-align: top !important;
  padding-top: 16px;
  border-right: none;
}

.chatForm__skeleton-text {
  display: flex;
  align-items: center;
}

.chatForm__skeleton-badge {
  background: #fafbfc !important;
  color: transparent !important;
}

.skeleton-dot {
  background: #fafbfc !important;
}

.skeleton-line {
  display: inline-block;
  height: 12px;
  background: #fafbfc;
  border-radius: 4px;
}

.skeleton-line--date {
  width: 75px;
  height: 13px;
}

.skeleton-line--time {
  width: 40px;
  height: 11px;
  margin-top: 3px;
}

.skeleton-line--short {
  width: 50px;
  height: 10px;
  margin-top: 3px;
}

.skeleton-line--name {
  width: 85px;
  height: 14px;
}

.skeleton-line--inn {
  width: 140px;
  height: 11px;
  margin-top: 4px;
}

.skeleton-line--company {
  width: 130px;
  height: 12px;
}

.skeleton-line--phone {
  width: 100px;
  height: 11px;
  margin-top: 3px;
}

.skeleton-line--manager {
  width: 90px;
  height: 13px;
}

.skeleton-line--status {
  width: 65px;
  height: 11px;
}

.skeleton-line--appeal {
  width: 140px;
  height: 12px;
}

.skeleton-line--appeal-sub {
  width: 90px;
  height: 10px;
  margin-top: 4px;
}

@keyframes telegram-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes telegram-skeleton-pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.chatForm__cell--period .skeleton-line {
  animation-delay: 0s;
}

.chatForm__cell--client .skeleton-line {
  animation-delay: 0.1s;
}

.chatForm__cell--contacts .skeleton-line {
  animation-delay: 0.2s;
}

.chatForm__cell--manager .skeleton-line {
  animation-delay: 0.3s;
}

.chatForm__cell--status .skeleton-line {
  animation-delay: 0.4s;
}

.chatForm__cell--appeal-type .skeleton-line {
  animation-delay: 0.5s;
}

@media (max-width: 785px) {
  .chatForm__row--skeleton {
    display: block !important;
    margin-bottom: 10px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fafbfc;
  }

  .chatForm__row--skeleton .chatForm__cell {
    display: flex !important;
    justify-content: normal;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
  }

  .chatForm__row--skeleton .chatForm__cell:last-child {
    border-bottom: none;
  }

  .chatForm__row--skeleton .chatForm__cell::before {
    content: attr(data-label);
    flex: 0 0 40%;
    max-width: 40%;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    padding: 6px 0;
    text-align: start;
  }

  .chatForm__row--skeleton .chatForm__cell--toggle {
    justify-content: center;
  }

  .chatForm__row--skeleton .chatForm__cell--toggle::before {
    content: "";
  }
}

@media (min-width: 320px) and (max-width: 785px) {
  .chatForm__row--skeleton {
    display: none !important;
  }

  .chatForm__skeleton-create-btn {
    display: flex !important;
  }

  .duplicate-start-consultation-hidden {
    display: none !important;
  }
}

@media (max-width: 785px) {
  .chatForm__skeleton-create-btn {
    top: 0px !important;
    transform: translate(-50%, 0);
  }

  .chatForm__body {
    padding-top: 72px;
  }

  .chatForm__skeleton-create-btn:hover {
    transform: translate(-50%, -1px);
  }

  .duplicate-start-consultation-hidden {
    display: none !important;
  }

  .chatForm__skeleton-create-btn:active {
    transform: translate(-50%, 0);
  }

  .chatForm__skeleton-create-btn.cancel-mode:hover {
    transform: translate(-50%, -1px);
  }

  .chatForm__skeleton-create-btn.cancel-mode:active {
    transform: translate(-50%, 0);
  }
}

.phone-tooltip-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: color 0.2s ease;
  margin-left: 6px;
  vertical-align: middle;
  cursor: help;
  line-height: 1;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.phone-tooltip-trigger:hover {
  color: #3b82f6;
}

.phone-tooltip-trigger img.phone-tooltip-icon {
  display: block;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(58%) sepia(8%) saturate(750%)
    hue-rotate(177deg) brightness(93%) contrast(88%);
  transition: filter 0.2s ease;
}

.phone-tooltip-trigger:hover img.phone-tooltip-icon {
  filter: brightness(0) saturate(100%) invert(48%) sepia(96%) saturate(2000%)
    hue-rotate(200deg) brightness(98%) contrast(96%);
}

.phone-tooltip-trigger::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  background: #1e293b;
  color: #ffffff;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0s 0.2s;
  visibility: hidden;
  z-index: 10000;
  min-width: 280px;
  max-width: 380px;
  width: max-content;
  white-space: pre-line;
  text-align: left;
  word-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
}

.phone-tooltip-trigger::before {
  content: "";
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #1e293b;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0s 0.2s;
  visibility: hidden;
  z-index: 10001;
}

.phone-tooltip-trigger:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(4px);
  visibility: visible;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.phone-tooltip-trigger:hover::before {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease;
}

@media (max-width: 768px) {
  .phone-tooltip-trigger {
    position: relative;
  }

  .phone-tooltip-trigger::after {
    display: block !important;
    min-width: 200px !important;
    max-width: calc(100vw - 32px) !important;
    width: fit-content !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-size: 12px;
    padding: 10px 14px;
    white-space: pre-line;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }

  .phone-tooltip-trigger:hover::after {
    transform: translateX(-50%) translateY(4px) !important;
    max-width: calc(100vw - 32px) !important;
  }

  .phone-tooltip-trigger::before {
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}

@media (max-width: 480px) {
  .phone-tooltip-trigger::after {
    display: block !important;
    min-width: 180px !important;
    max-width: calc(100vw - 24px) !important;
    width: fit-content !important;
    font-size: 11px;
    padding: 8px 12px;
    line-height: 1.5;
    white-space: pre-line;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }
}

@media (max-width: 360px) {
  .phone-tooltip-trigger::after {
    display: block !important;
    min-width: 160px !important;
    max-width: calc(100vw - 20px) !important;
    width: fit-content !important;
    font-size: 10px;
    padding: 6px 10px;
    line-height: 1.4;
    white-space: pre-line;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

@media (max-width: 320px) {
  .phone-tooltip-trigger::after {
    display: block !important;
    min-width: 140px !important;
    max-width: calc(100vw - 16px) !important;
    width: fit-content !important;
    font-size: 10px;
    padding: 6px 8px;
    line-height: 1.3;
    white-space: pre-line;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
  }
}
