/* Import base styles from leads-flow */
@import url("./leads-flow-styles.css");

/* Override action button styles for better centering and sizing */
.action-button {
  background: #7C29C4;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 45px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(100, 44, 194, 0.3);
  text-align: center;
  min-width: 250px;
  max-width: 400px;
  width: 100%;
}

.action-button:hover {
  background: #2730B9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(94, 158, 149, 0.4);
}

.action-button:active {
  transform: translateY(0);
}

.action-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* SMS Container Styles */
.sms-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
}

/* Phone Mockup Styles */
.phone-mockup {
  width: 375px;
  height: 812px;
  background: #000;
  border-radius: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
  border: 8px solid #1a1a1a;
}

.phone-header {
  height: 44px;
  background: #f8f8f8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  position: relative;
}

.time {
  font-size: 14px;
  font-weight: 600;
  color: #000;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 30px;
  background: #000;
  border-radius: 0 0 20px 20px;
}

.phone-icons {
  display: flex;
  gap: 5px;
  font-size: 12px;
}

.phone-screen {
  height: calc(100% - 44px - 34px);
  background: #fff;
  display: flex;
  flex-direction: column;
}

.messages-header {
  background: #f8f8f8;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e5e5e5;
}

.back-arrow {
  font-size: 20px;
  color: #007aff;
  cursor: pointer;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.contact-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #7C29C4, #2730B9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.contact-details {
  flex: 1;
}

.contact-name {
  font-size: 14px;
  font-weight: 600;
  color: #000;
}

.contact-number {
  font-size: 12px;
  color: #666;
}

.messages-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #fff;
}

.message-bubble {
  max-width: 80%;
  padding: 12px 15px;
  border-radius: 18px;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.4;
  animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-bubble.received {
  background: #e5e5ea;
  color: #000;
  border-radius: 18px 18px 18px 4px;
}

.message-bubble.sent {
  background: #007aff;
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  margin-left: auto;
}

.message-bubble p {
  margin: 0 0 8px 0;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.jotform-link {
  color: #007aff;
  text-decoration: none;
  word-break: break-all;
  display: block;
  margin-top: 8px;
  font-weight: 500;
}

.jotform-link:hover {
  text-decoration: underline;
}

.phone-footer {
  height: 34px;
  background: #f8f8f8;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-indicator {
  width: 134px;
  height: 5px;
  background: #000;
  border-radius: 100px;
}

.sms-action {
  text-align: center;
  display: flex;
  justify-content: center;
}

.sms-action .action-button {
  max-width: 400px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sms-action .action-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Iframe Container Styles */
.iframe-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.loading-container {
  text-align: center;
  padding: 3rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.iframe-wrapper {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 2px solid #e5e5e5;
}

.iframe-action {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.action-note {
  font-size: 16px;
  color: #5f5f5f;
  font-weight: 500;
  margin: 0;
}

.iframe-action .action-button {
  max-width: 400px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iframe-action .action-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Verification Status */
.verification-status {
  margin-top: 2rem;
  animation: fadeIn 0.5s ease;
}

.verification-success {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border: 3px solid #2730B9;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 6px 30px rgba(94, 158, 149, 0.2);
}

.verification-success .success-icon {
  font-size: 64px;
  margin-bottom: 1rem;
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.verification-success h3 {
  font-size: 28px;
  font-weight: 700;
  color: #2e7d32;
  margin: 0 0 0.5rem 0;
}

.verification-success p {
  font-size: 18px;
  color: #5f5f5f;
  margin: 0 0 1.5rem 0;
}

.verified-info {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #2730B9;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  text-align: left;
}

.verified-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e5e5;
}

.verified-field:last-child {
  border-bottom: none;
}

.field-label {
  font-size: 14px;
  color: #5f5f5f;
  font-weight: 600;
}

.field-value {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.token-display {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #2730B9;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  text-align: left;
}

.token-label {
  font-size: 14px;
  color: #5f5f5f;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.token-display code {
  font-family: "Courier New", monospace;
  font-size: 13px;
  color: #333;
  word-break: break-all;
  display: block;
}

/* Eligibility Summary Styles */
.eligibility-summary {
  padding: 2rem;
  background: #f8f8f8;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.eligibility-summary .summary-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.eligibility-summary .summary-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.eligibility-summary .summary-icon {
  font-size: 32px;
  background: #e8f5e9;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.eligibility-summary .summary-text {
  font-size: 18px;
  color: #333;
  font-weight: 600;
  flex: 1;
}

.completion-message {
  font-size: 18px;
  color: #5f5f5f;
  margin: 1rem 0 2rem 0;
  font-weight: 500;
  text-align: center;
}

.leads-action {
  display: flex;
  justify-content: center;
  align-items: center;
}

.leads-action .action-button {
  margin: 0 auto;
}

/* Processing Container Override for Consent Flow */
.processing-container .leads-preview {
  border: 3px solid #2730B9;
}

.processing-container .leads-header {
  background: linear-gradient(135deg, #2730B9 0%, #1F2596 100%);
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
  .phone-mockup {
    width: 320px;
    height: 693px;
  }

  .iframe-wrapper iframe {
    height: 600px !important;
  }

  .eligibility-summary .summary-item {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .eligibility-summary .summary-text {
    font-size: 16px;
  }
}

@media screen and (max-width: 480px) {
  .phone-mockup {
    width: 280px;
    height: 607px;
  }

  .sms-container {
    padding: 1rem;
  }

  .message-bubble {
    font-size: 14px;
  }

  /* Ensure consistent button width on mobile */
  .sms-action,
  .iframe-action,
  .leads-action {
    width: 100%;
    padding: 0 1rem;
  }

  .sms-action .action-button,
  .iframe-action .action-button,
  .leads-action .action-button {
    max-width: 100%;
    width: 100%;
  }
}
