@font-face {
  font-family: 'Rockwell Std Extra Bold';
  src: url('https://tamde.org/fonts/RockwellStdExtraBold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

.tam-asistan {
  --tam-brand: #0c4b80;
  --tam-brand-dark: #08355b;
  --tam-bg: #ffffff;
  --tam-text: #1f2937;
  --tam-muted: #64748b;
  --tam-border: #dbe3ec;
  font-family: inherit;
  box-sizing: border-box;
}

.tam-asistan,
.tam-asistan * {
  box-sizing: border-box;
}

.tam-asistan.is-floating {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
}

.tam-asistan.is-embedded {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.tam-asistan-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--tam-border);
  background: #fff;
  color: var(--tam-brand);
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(12, 75, 128, 0.18);
}

.tam-asistan-launcher-text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.tam-asistan-launcher-name {
  font-size: 18px;
  font-weight: 700;
  color: #0c4b80;
  line-height: 1;
}

.tam-asistan-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tam-asistan-logo {
  font-family: 'Rockwell Std Extra Bold', serif !important;
  font-size: 30px;
  color: #0c4b80;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  letter-spacing: 0;
}

.tam-asistan-welcome {
  position: absolute;
  right: 0;
  bottom: 70px;
  max-width: min(82vw, 320px);
  z-index: 2;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.tam-asistan-welcome.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tam-asistan.is-embedded .tam-asistan-welcome {
  display: none !important;
}

.tam-asistan-welcome[hidden] {
  display: none !important;
}

.tam-asistan-welcome-bubble {
  position: relative;
  background: #fff;
  color: #0f172a;
  border: 1px solid var(--tam-border);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 10px 26px rgba(12, 75, 128, 0.18);
  font-size: 14px;
  line-height: 1.45;
}

.tam-asistan-welcome-bubble::after {
  content: '';
  position: absolute;
  right: 20px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-right: 1px solid var(--tam-border);
  border-bottom: 1px solid var(--tam-border);
  transform: rotate(45deg);
}

.tam-asistan-panel {
  width: min(92vw, 380px);
  height: min(72vh, 560px);
  margin-top: 10px;
  border: 1px solid var(--tam-border);
  border-radius: 14px;
  background: var(--tam-bg);
  box-shadow: 0 16px 48px rgba(12, 75, 128, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tam-asistan.is-floating .tam-asistan-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  margin-top: 0;
  z-index: 3;
}

.tam-asistan-panel[hidden] {
  display: none !important;
}

.tam-asistan.is-embedded .tam-asistan-panel {
  width: 100%;
  height: 560px;
}

.tam-asistan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--tam-border);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.tam-asistan-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tam-brand);
  font-size: 15px;
}

.tam-asistan-close {
  border: 0;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}

.tam-asistan-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #ffffff;
}

.tam-asistan-msg {
  max-width: 90%;
  border-radius: 10px;
  padding: 9px 10px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.tam-asistan-msg.user {
  margin-left: auto;
  background: #eaf4ff;
  color: #0f172a;
  border: 1px solid #cfe3fb;
}

.tam-asistan-msg.assistant {
  margin-right: auto;
  background: #f8fafc;
  color: var(--tam-text);
  border: 1px solid #e2e8f0;
}

.tam-asistan-msg.typing {
  color: var(--tam-muted);
  font-style: italic;
}

.tam-asistan-form {
  border-top: 1px solid var(--tam-border);
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #fff;
}

.tam-asistan-form textarea {
  flex: 1;
  border: 1px solid #cdd7e3;
  border-radius: 10px;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  padding: 10px;
  font-size: 14px;
  line-height: 1.35;
  color: #0f172a;
  outline: none;
}

.tam-asistan-form textarea:focus {
  border-color: var(--tam-brand);
  box-shadow: 0 0 0 2px rgba(12, 75, 128, 0.12);
}

.tam-asistan-form button {
  border: 1px solid var(--tam-brand);
  background: var(--tam-brand);
  color: #fff;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tam-asistan-form button:hover {
  background: var(--tam-brand-dark);
  border-color: var(--tam-brand-dark);
}

@media (max-width: 767px) {
  .tam-asistan.is-floating {
    right: 10px;
    bottom: 10px;
  }

  .tam-asistan-panel {
    width: min(95vw, 380px);
    height: min(76vh, 560px);
  }

  .tam-asistan-logo {
    font-size: 26px;
  }

  .tam-asistan-launcher-name {
    font-size: 16px;
  }
}
