/* Import Google Font for the Title */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap');

.tt-widget-modern {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  padding: 32px 24px;
  /* Soft, modern shadow */
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

/* Yellow Brand Line at the top */
.tt-widget-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: #F9D342;
}

.tt-widget-header {
  text-align: center;
  margin-bottom: 24px;
}

.tt-widget-logo {
  max-width: 140px;
  width: 100%;
  height: auto;
  margin-bottom: 16px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.tt-widget-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: #111827;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.tt-widget-description {
  font-size: 0.95rem;
  color: #6b7280; /* Softer grey text */
  margin: 0;
  line-height: 1.6;
}

.tt-widget-form {
  margin-top: 0;
}

.tt-widget-input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Targeting the Django form input generically */
.tt-widget-input-group input[type="email"],
.tt-widget-input-group input[type="text"],
.tt-widget-input-group #id_email {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px; /* Prevents auto-zoom on iPhone */
  color: #374151;
  background-color: #f9fafb;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.tt-widget-input-group input:focus,
.tt-widget-input-group #id_email:focus {
  outline: none;
  border-color: #F9D342;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(249, 211, 66, 0.15); /* Focus ring */
}

.tt-widget-button {
  width: 100%;
  background-color: #F9D342;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(249, 211, 66, 0.2);
}

.tt-widget-button:hover {
  background-color: #e6c300;
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(249, 211, 66, 0.3);
}

.tt-widget-button:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* Messages */
.tt-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  text-align: center;
  font-weight: 500;
}

.tt-message-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.tt-message-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.tt-message-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Responsive: Side-by-side on larger screens */
@media (min-width: 450px) {
  .tt-widget-input-group {
    flex-direction: row;
  }
  .tt-widget-input-group input[type="email"],
  .tt-widget-input-group input[type="text"],
  .tt-widget-input-group #id_email {
    flex: 1;
  }
  .tt-widget-button {
    width: auto;
    white-space: nowrap;
  }
}
