/* AmoCRM-like telephony launcher/panel for /telephony route */
.amo-tp-launcher {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(140deg, #1f7aff, #34b3ff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(7, 62, 154, 0.35);
  font-size: 20px;
}

.amo-tp-launcher .amo-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.amo-tp-panel {
  position: fixed;
  left: 16px;
  bottom: 84px;
  width: 380px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 108px);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.2);
  transform: translateY(22px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
  z-index: 9998;
  display: flex;
  flex-direction: column;
}

.amo-tp-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.amo-tp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f7faff;
  border-bottom: 1px solid #e6edf8;
}

.amo-tp-title {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
}

.amo-tp-sub {
  font-size: 11px;
  color: #64748b;
}

.amo-tp-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  background: #e8eef7;
  color: #1e293b;
}

.amo-tp-body {
  overflow: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.amo-box {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.amo-box h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: #0f172a;
}

.amo-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.amo-row:last-child {
  margin-bottom: 0;
}

.amo-input,
.amo-select {
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 10px;
  outline: none;
  width: 100%;
}

.amo-btn {
  height: 34px;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  cursor: pointer;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.amo-btn.alt {
  background: #e2e8f0;
  color: #0f172a;
}

.amo-btn.warn {
  background: #ef4444;
}

.amo-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.amo-pad button {
  height: 34px;
  border: 1px solid #d5deea;
  border-radius: 10px;
  background: #f8fbff;
  cursor: pointer;
}

.amo-in-call {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.amo-in-call .amo-btn {
  width: 100%;
}

.amo-tp-panel .telephony-page {
  margin: 0;
}

.amo-tp-panel .telephony-head {
  display: none !important;
}

.amo-tp-panel .tp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.amo-tp-panel .tp-card {
  border-radius: 12px;
}

@media (max-width: 768px) {
  .amo-tp-launcher {
    left: 12px;
    bottom: 12px;
  }

  .amo-tp-panel {
    left: 10px;
    right: 10px;
    width: auto;
    bottom: 78px;
    max-height: calc(100vh - 92px);
  }

  .amo-in-call {
    grid-template-columns: 1fr;
  }
}
