/* Text Us Modern — Standalone widget CSS */

:root {
  --tum-accent: #0f1446;
  --tum-accent-hover: #1a1f5e;
  --tum-foreground: #101828;
  --tum-text: #364153;
  --tum-muted: #6a7282;
  --tum-subtle: #4a5565;
  --tum-border: #e5e7eb;
  --tum-input-bg: #f3f3f5;
  --tum-input-placeholder: #717182;
  --tum-card-bg: #fff;
  --tum-error: #ef4444;
}

/* ---- Reset scoping ---- */
.tum-overlay,
.tum-overlay *,
.tum-fab,
.tum-fab * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- Floating action button ---- */
.tum-fab {
  position: fixed;
  bottom: 5%;
  right: 10px;
  z-index: 45; /* below full-page overlays (filter=50), above normal content */
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 20px;
  border: none;
  border-radius: 28px;
  background: var(--tum-accent);
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease, transform 0.15s ease;
}

.tum-fab:hover {
  background: var(--tum-accent-hover);
  transform: translateY(-2px);
}

.tum-fab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tum-fab-icon svg {
  width: 18px;
  height: 18px;
}

/* ---- Modal overlay ---- */
.tum-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 1rem;
}

.tum-overlay.open {
  opacity: 1;
  visibility: visible;
}

.tum-overlay.open .tum-card {
  transform: scale(1);
  opacity: 1;
}

/* ---- Card ---- */
.tum-card {
  font-family: 'Roboto', sans-serif;
  background-color: var(--tum-card-bg);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  width: 100%;
  max-width: 448px;
  max-height: 90vh;
  overflow-y: auto;
  color: var(--tum-foreground);
  position: relative;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---- Header ---- */
.tum-header {
  padding: 24px 24px 16px;
}

.tum-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.tum-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: var(--tum-foreground);
  letter-spacing: 0.07px;
}

.tum-subtitle {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--tum-subtle);
  letter-spacing: -0.15px;
  margin-top: 4px;
}

/* ---- Close button ---- */
.tum-close {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--tum-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tum-close:hover {
  color: var(--tum-foreground);
}

.tum-close svg {
  width: 20px;
  height: 20px;
}

/* ---- Form body ---- */
.tum-body {
  padding: 0 24px 24px;
}

.tum-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---- Field group (label + input) ---- */
.tum-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tum-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.15px;
  color: var(--tum-text);
}

.tum-label svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--tum-text);
}

.tum-input,
.tum-textarea {
  width: 100%;
  height: 48px;
  padding: 4px 12px;
  background-color: var(--tum-input-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.15px;
  color: var(--tum-foreground);
  outline: none;
  transition: border-color 0.15s ease;
}

.tum-input::placeholder,
.tum-textarea::placeholder {
  color: var(--tum-input-placeholder);
}

.tum-input:focus,
.tum-textarea:focus {
  border-color: var(--tum-accent);
}

.tum-textarea {
  height: 128px;
  padding: 8px 12px;
  resize: vertical;
  line-height: 20px;
}

/* ---- Error text ---- */
.tum-error {
  font-size: 12px;
  color: var(--tum-error);
  min-height: 16px;
  line-height: 16px;
  margin-top: -12px;
}

/* ---- Send button ---- */
.tum-send {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 14px;
  background-color: var(--tum-accent);
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.31px;
  line-height: 24px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.15s ease;
  margin-top: 4px;
}

.tum-send:hover {
  background-color: var(--tum-accent-hover);
}

.tum-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Disclaimer ---- */
.tum-disclaimer {
  text-align: center;
  font-size: 12px;
  line-height: 16px;
  color: var(--tum-muted);
  padding: 0 10px;
  margin-top: 4px;
}

.tum-disclaimer a {
  color: var(--tum-accent);
  text-decoration: underline;
}

/* ---- Powered by ---- */
.tum-powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.15px;
  color: var(--tum-subtle);
}

.tum-powered-img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.tum-powered strong {
  font-weight: 600;
  color: var(--tum-foreground);
}

.tum-powered-link {
  color: inherit;
  text-decoration: underline;
}

/* ---- Success state ---- */
.tum-success {
  text-align: center;
  padding: 40px 20px;
}

.tum-success svg {
  display: block;
  margin: 0 auto 16px;
}

.tum-success-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: var(--tum-foreground);
  margin-bottom: 4px;
}

.tum-success-text {
  font-size: 14px;
  color: var(--tum-subtle);
  margin-bottom: 24px;
}

/* ---- Mobile responsive ---- */
@media (max-width: 480px) {
  .tum-overlay {
    padding: 0;
    align-items: stretch;
  }

  .tum-card {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    height: 100%;
  }

  .tum-fab {
    bottom: 16px;
    right: 8px;
    height: 48px;
    padding: 0 16px;
    font-size: 14px;
  }
}
