/* TextP2P Text Us widget */

.tp2p-root {
  --tp2p-green: #7ac143;
  --tp2p-green-dark: #68a938;
  --tp2p-red: #e53935;
  --tp2p-text: #333333;
  --tp2p-muted: #8a8a8a;
  --tp2p-line: #cfcfcf;
  --tp2p-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  font-family: Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}

.tp2p-root *,
.tp2p-root *::before,
.tp2p-root *::after {
  box-sizing: border-box;
}

.tp2p-launcher {
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: var(--tp2p-green);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
  position: relative;
  z-index: 2;
}

.tp2p-launcher:hover {
  background: var(--tp2p-green-dark);
  transform: scale(1.04);
}

.tp2p-launcher:focus-visible {
  outline: 3px solid rgba(122, 193, 67, 0.45);
  outline-offset: 3px;
}

.tp2p-launcher-close {
  display: none;
}

.tp2p-root.is-open .tp2p-launcher {
  background: var(--tp2p-red);
}

.tp2p-root.is-open .tp2p-launcher-open {
  display: none;
}

.tp2p-root.is-open .tp2p-launcher-close {
  display: inline-flex;
}

.tp2p-hover-bubble {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(320px, calc(100vw - 40px));
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--tp2p-shadow);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.tp2p-hover-bubble::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.06);
}

.tp2p-root.show-hover:not(.is-open) .tp2p-hover-bubble {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.tp2p-hover-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: 0 0 48px;
  background: #5eb3e8;
  object-fit: cover;
}

.tp2p-hover-text {
  margin: 0;
  color: #111;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.tp2p-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(320px, calc(100vw - 40px));
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--tp2p-shadow);
  overflow: hidden;
  display: none;
}

.tp2p-root.is-open .tp2p-panel {
  display: block;
}

.tp2p-panel-header {
  background: var(--tp2p-green);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.tp2p-panel-icon {
  display: inline-flex;
}

.tp2p-form {
  padding: 16px 18px 14px;
}

.tp2p-field {
  display: block;
  margin-bottom: 14px;
}

.tp2p-field span {
  display: block;
  color: #9a9a9a;
  font-size: 13px;
  margin-bottom: 4px;
}

.tp2p-field input,
.tp2p-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--tp2p-line);
  border-radius: 0;
  padding: 6px 2px 8px;
  font-size: 15px;
  color: var(--tp2p-text);
  background: transparent;
  outline: none;
  font-family: inherit;
  resize: vertical;
}

.tp2p-field input:focus,
.tp2p-field textarea:focus {
  border-bottom-color: var(--tp2p-green);
}

.tp2p-field-message textarea {
  min-height: 64px;
}

.tp2p-disclaimer {
  margin: 6px 0 14px;
  color: var(--tp2p-muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.tp2p-submit {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: var(--tp2p-green);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tp2p-submit:hover:not(:disabled) {
  background: var(--tp2p-green-dark);
}

.tp2p-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.tp2p-status {
  margin: 10px 0 0;
  font-size: 13px;
  text-align: center;
  line-height: 1.35;
}

.tp2p-status.is-success {
  color: var(--tp2p-green-dark);
}

.tp2p-status.is-error {
  color: var(--tp2p-red);
}

.tp2p-powered {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #888;
  font-size: 11px;
}

.tp2p-powered img {
  width: 18px;
  height: 18px;
}

@media (max-width: 480px) {
  .tp2p-root {
    right: 14px;
    bottom: 14px;
  }

  .tp2p-panel,
  .tp2p-hover-bubble {
    width: min(300px, calc(100vw - 28px));
  }
}
