/* AIMC WordPress — header Ask AI + full chat.html embed above footer */

.aimc-header-ask-ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 8px 16px;
  border: none;
  border-radius: 9999px;
  background: #0066cc;
  color: #fff !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.25);
  transition: background 0.15s ease, transform 0.15s ease;
}

.aimc-header-ask-ai:hover,
.aimc-header-ask-ai:focus {
  background: #0052a3;
  color: #fff !important;
  transform: translateY(-1px);
  outline: none;
}

.aimc-header-ask-ai--fixed {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 100000;
}

@media (max-width: 1024px) {
  .aimc-header-ask-ai--fixed {
    top: auto;
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
    right: max(12px, env(safe-area-inset-right, 12px));
    padding: 10px 14px;
    font-size: 13px;
  }
}

.aimc-page-chat,
.aimc-page-chat--full {
  width: 100%;
  max-width: 1100px;
  margin: 48px auto 40px;
  padding: 16px 16px 12px;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.aimc-page-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.aimc-page-chat__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.aimc-page-chat__badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 9999px;
  padding: 4px 10px;
}

.aimc-page-chat__frame {
  display: block;
  width: 100%;
  height: min(78vh, 720px);
  min-height: 520px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f5f7fa;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .aimc-page-chat,
  .aimc-page-chat--full {
    width: calc(100% - 24px);
    max-width: none;
    margin: 28px 12px 32px;
    padding: 12px;
    border-radius: 12px;
  }

  .aimc-page-chat__header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .aimc-page-chat__title {
    font-size: 16px;
  }

  .aimc-page-chat__frame {
    width: 100%;
    height: min(70vh, 560px);
    min-height: 380px;
  }
}

@media (max-width: 640px) {
  .aimc-page-chat__frame {
    height: min(65vh, 480px);
    min-height: 320px;
    border-radius: 10px;
  }

  .aimc-page-chat__badge {
    font-size: 10px;
  }
}
