/**
 * NC Softphone Engine styles (NET.5)
 * Uses --nc-sp-* with fallbacks to .one (--nc-one-*) or .net (--nc-primary).
 */
.nc-softphone-container {
  --nc-sp-primary: var(--nc-primary, var(--nc-one-primary, #0f52ba));
  --nc-sp-primary-deep: var(--nc-primary-deep, var(--nc-one-primary-deep, #0a3d8f));
  --nc-sp-text: var(--nc-ink, var(--nc-one-text, #0b1b33));
  --nc-sp-muted: var(--nc-muted, var(--nc-one-muted, #5a6b82));
  --nc-sp-border: var(--nc-line, var(--nc-one-border, rgba(15, 82, 186, 0.18)));
  --nc-sp-surface: var(--nc-panel, var(--nc-one-surface, #ffffff));
  --nc-sp-bg: var(--nc-surface, var(--nc-one-bg, #f3f6fb));
  --nc-sp-radius: var(--nc-one-radius, 16px);
  --nc-sp-display: var(--nc-one-font-display, "Segoe UI", "Helvetica Neue", sans-serif);

  width: 100%;
  min-height: min(640px, calc(100svh - 8.5rem));
  background: var(--nc-sp-surface);
  border-radius: var(--nc-sp-radius);
  border: 1px solid var(--nc-sp-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--nc-sp-text);
}

.nc-phone-header {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--nc-sp-border);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #fff;
}

.nc-sp-conn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.nc-sp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}
.nc-sp-dot.ok {
  background: #10b981;
}
.nc-sp-dot.warn {
  background: #f59e0b;
}
.nc-sp-dot.err {
  background: #ef4444;
}

.nc-sp-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--nc-sp-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nc-sp-line-val {
  font-family: var(--nc-sp-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--nc-sp-primary);
}

.nc-sp-line-val--sms {
  color: var(--nc-sp-primary-deep);
  font-size: 1.1rem;
}

.nc-sp-modes {
  display: flex;
  gap: 0.35rem;
}

.nc-sp-mode {
  flex: 1;
  border: 1px solid var(--nc-sp-border);
  background: var(--nc-sp-bg);
  border-radius: 8px;
  padding: 0.45rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--nc-sp-text);
}
.nc-sp-mode.is-active {
  background: var(--nc-sp-primary);
  border-color: var(--nc-sp-primary);
  color: #fff;
}

.nc-phone-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0 0;
}

.call-display {
  padding: 1.25rem 1rem 0.75rem;
  text-align: center;
}

.dial-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1.65rem;
  font-weight: 700;
  font-family: var(--nc-sp-display);
  text-align: center;
  color: var(--nc-sp-text);
  outline: none;
}

.call-timer {
  font-size: 0.8rem;
  color: var(--nc-sp-muted);
  margin-top: 0.25rem;
}

.numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  padding: 0.75rem 1.75rem 1rem;
  justify-items: center;
}

.num-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--nc-sp-border);
  background: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--nc-sp-text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.num-btn:active {
  background: var(--nc-sp-primary);
  color: #fff;
  border-color: var(--nc-sp-primary);
}

.nc-sp-sms {
  width: calc(100% - 2rem);
  margin: 0.5rem 1rem 0.35rem;
  padding: 0.75rem;
  border: 1px solid var(--nc-sp-border);
  border-radius: 10px;
  font: inherit;
  resize: vertical;
  min-height: 6rem;
}

.nc-sp-select {
  width: calc(100% - 2rem);
  margin: 0.35rem 1rem 0.25rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--nc-sp-border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.nc-sp-sms-status {
  margin: 0 1rem 1rem;
  font-size: 0.78rem;
  color: var(--nc-sp-muted);
  line-height: 1.35;
}

.nc-phone-footer {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--nc-sp-border);
  background: #fff;
  display: flex;
  justify-content: center;
  margin-top: auto;
}

.action-buttons-idle,
.action-buttons-active {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-call,
.btn-hangup {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
}
.btn-call {
  background: var(--nc-sp-primary);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--nc-sp-primary) 35%, transparent);
}
.btn-call::after {
  content: '';
  position: absolute;
  inset: 18px;
  background: #fff;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 15.5c-1.2 0-2.4-.2-3.6-.6-.3-.1-.7 0-1 .2l-2.2 2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c.3-.3.4-.7.2-1-.3-1.1-.5-2.3-.5-3.5 0-.6-.4-1-1-1H4c-.6 0-1 .4-1 1 0 9.4 7.6 17 17 17 .6 0 1-.4 1-1v-3.5c0-.6-.4-1-1-1z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 15.5c-1.2 0-2.4-.2-3.6-.6-.3-.1-.7 0-1 .2l-2.2 2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c.3-.3.4-.7.2-1-.3-1.1-.5-2.3-.5-3.5 0-.6-.4-1-1-1H4c-.6 0-1 .4-1 1 0 9.4 7.6 17 17 17 .6 0 1-.4 1-1v-3.5c0-.6-.4-1-1-1z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.btn-hangup {
  background: #ef4444;
}
.btn-hangup::after {
  content: '';
  position: absolute;
  inset: 18px;
  background: #fff;
  border-radius: 2px;
  transform: rotate(135deg);
}

.btn-tool {
  background: #fff;
  border: 1px solid var(--nc-sp-border);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--nc-sp-muted);
}
.btn-tool.active {
  background: var(--nc-sp-primary-deep);
  color: #fff;
  border-color: var(--nc-sp-primary-deep);
}

.nc-softphone-container .hidden {
  display: none !important;
}
