* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #f5f5f7;
  color: #1e1e1e;
  overflow: hidden;
}
body {
  display: flex;
  flex-direction: column;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: white;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
  font-size: 1.2rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
}
#header-buttons {
  display: flex;
  gap: 0.75rem;
}
#chat {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bubble {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  max-width: 75%;
  line-height: 1.5;
  white-space: pre-wrap;
  font-size: 1rem;
}
.bubble.user {
  align-self: flex-end;
  background-color: #d1ecf1;
}
.bubble.bot {
  align-self: flex-start;
  background-color: white;
  border: 1px solid #e0e0e0;
}
form {
  display: flex;
  padding: 1rem 2rem;
  border-top: 1px solid #ddd;
  background: white;
  flex-shrink: 0;
}
input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #ccc;
  outline: none;
}
button {
  margin-left: 1rem;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border-radius: 0.75rem;
  border: none;
  background: #007aff;
  color: white;
  cursor: pointer;
}
#pay-button {
  background: #007aff;
  color: white;
  font-size: 1rem;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
}

/* Modal styling */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 999;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  text-align: left;
}
.modal-content h2 {
  text-align: center;
  margin-top: 0;
}
.modal-content p {
  margin-bottom: 1rem;
}
.confirm-button {
  display: block;
  margin: 2rem auto 0 auto;
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  background: #007aff;
  color: white;
  border: none;
  cursor: pointer;
}
.close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1rem;
  background: #ccc;
  color: #333;
  border: none;
  border-radius: 50%;
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}
