/* Base styles */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  min-height: 100vh;
  background-color: #f5f5f5;
}

/* Top Navigation Bar */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  background-color: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  height: 60px;
  margin-bottom: 24px;
}

.logo-section {
  display: flex;
  align-items: center;
}

.cloudflare-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.divider {
  width: 1px;
  height: 24px;
  background-color: #e5e7eb;
  margin: 0 16px;
}

.logo-section h3 {
  font-weight: 500;
  color: #1d1e20;
  margin: 0;
  font-size: 18px;
}

.user-actions {
  display: flex;
  align-items: center;
}

.plan-badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: #f0f0f0;
  color: #5a5a5a;
  font-weight: 500;
}

/* Main container */
.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Two-column layout */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 20px 40px 20px;
}

/* Three-column layout */
.three-column-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 20px 40px 20px;
}

/* Demo panel styling */
.demo-panel {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 24px;
}

.demo-panel h4 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #1d1e20;
  margin-top: 0;
}

.demo-content {
  font-size: 14px;
}

.demo-description {
  margin-bottom: 24px;
}

.demo-description h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #1d1e20;
}

.demo-description p {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 0;
}

.demo-instructions {
  margin-bottom: 24px;
}

.demo-instructions h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #1d1e20;
}

.instruction-steps {
  color: #6b7280;
  line-height: 1.6;
  padding-left: 20px;
}

.config-section {
  margin: 24px 0;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.config-section h4 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #1d1e20;
}

.config-section p {
  color: #6b7280;
  margin: 0;
}

.form-features-section {
  margin: 24px 0;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.form-features-section h4 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #1d1e20;
}

.toggle-container {
  margin-bottom: 0;
  margin-top: 12px;
}

.toggle-label {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0;
  gap: 12px;
}

.toggle-text {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.4;
}

.toggle-text div:first-child {
  color: #1d1e20;
  margin-bottom: 4px;
  font-weight: 500;
}

.custom-checkbox {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: white;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.custom-checkbox input:checked ~ .checkmark {
  background-color: #3f83f8;
  border-color: #3f83f8;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
}

.custom-checkbox input:focus ~ .checkmark {
  box-shadow: 0 0 0 2px rgba(63, 131, 248, 0.2);
}

/* Form container */
.signup-form-container {
  background: transparent;
  padding: 0;
}

.checkout-form {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 40px;
}

/* Form actions */
.form-actions-centered {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.reset-link, .demo-link {
  color: #4299e1;
  text-decoration: none;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
}

.reset-link:hover, .demo-link:hover {
  background-color: #f1f3f4;
  color: #1a73e8;
  text-decoration: none;
}

/* Form section styling */
.form-section {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #4a5568;
}

.form-control {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 4px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  color: #495057;
  background-color: #fff;
  border-color: #a3bffa;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.25);
}

.analyze-link-container {
  text-align: right;
  margin-top: 8px;
  margin-bottom: 0;
}

.analyze-btn {
  color: #4299e1;
  text-decoration: none;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.analyze-btn:hover {
  background-color: #f1f3f4;
  color: #1a73e8;
  text-decoration: none;
}

/* Make the Turnstile widget centered */
.cf-turnstile {
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

/* Checkout button styling */
.checkout-button {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #4299e1;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.checkout-button:hover {
  background-color: #3182ce;
}

.checkout-button:disabled {
  background-color: #a0aec0;
  cursor: not-allowed;
}

/* Status message styling */
.error-message {
  padding: 10px;
  margin-top: 15px;
  border-radius: 4px;
  color: #842029;
  background-color: #f8d7da;
  border: 1px solid #f5c2c7;
  display: none;
}

.error-message.show {
  display: block;
}

/* Info Column Styling */
.info-section {
  margin-bottom: 24px;
}

.info-section .card {
  border: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: #ffffff;
}

.info-section .card-header {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e9ecef;
}

.info-section .card-header h4 {
  margin: 0;
  color: #1a202c;
  font-size: 1.1rem;
  font-weight: 500;
}

.info-section .card-body {
  padding: 1.25rem;
}

.section-container {
  margin-bottom: 20px;
}

.section-container:last-child {
  margin-bottom: 0;
}

.section-container h5 {
  margin-bottom: 16px;
  color: #1a202c;
  font-size: 1rem;
  font-weight: 500;
}

.info-grid {
  display: grid;
  gap: 12px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item strong {
  display: block;
  margin-bottom: 4px;
  color: #4a5568;
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 100px;
}

.info-item .detail-value {
  color: #1a202c;
  font-size: 0.875rem;
  font-weight: 500;
  flex: 1;
  text-align: right;
}

.visit-count-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.new-device-badge {
  background: #10B981;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-block;
  margin-left: 8px;
}

#device-ephemeral-id {
  word-break: break-all;
  font-family: monospace;
  font-size: 0.75rem;
  background-color: #f8f9fa;
  padding: 0.5rem;
  border-radius: 4px;
  max-width: 200px;
  overflow-wrap: break-word;
}

/* Email risk analysis styling */
.email-complexity-section .spinner-border {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  vertical-align: text-bottom;
  border: 0.2em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border .75s linear infinite;
}

@keyframes spinner-border {
  to { transform: rotate(360deg); }
}

/* Badge styling */
.badge {
  display: inline-block;
  padding: 4px 8px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  border-radius: 4px;
  font-size: 0.875rem;
}

/* Updated Risk badges */
.badge.risk-low {
  background-color: #198754;
  color: white;
}

.badge.risk-medium {
  background-color: #fd7e14;
  color: white;
}

.badge.risk-high {
  background-color: #dc3545;
  color: white;
}

.badge.risk-unknown {
  background-color: #6c757d;
  color: white;
}

/* Legacy complexity classes for backward compatibility */
.badge.complexity-very-low {
  background-color: #dc3545;
  color: white;
}

.badge.complexity-low {
  background-color: #198754;
  color: white;
}

.badge.complexity-normal {
  background-color: #fd7e14;
  color: white;
}

.badge.complexity-high {
  background-color: #dc3545;
  color: white;
}

/* Alert styling */
.alert {
  position: relative;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

/* Utility classes */
.d-none {
  display: none !important;
}

.d-flex {
  display: flex !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.text-center {
  text-align: center !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: 0.25rem !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mt-2 {
  margin-top: 0.5rem !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.py-3 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

.text-break {
  word-break: break-word !important;
}

.font-monospace {
  font-family: monospace !important;
}

.text-muted {
  color: #6b7280 !important;
}

/* Animation for content update */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .two-column-layout {
    grid-template-columns: 1fr 2fr;
    gap: 16px;
  }

  .three-column-layout {
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 992px) {
  .two-column-layout {
    grid-template-columns: 1fr;
  }

  .three-column-layout {
    grid-template-columns: 1fr 1fr;
  }

  .info-section {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .two-column-layout {
    grid-template-columns: 1fr;
    padding: 20px 12px;
  }

  .three-column-layout {
    grid-template-columns: 1fr;
    padding: 20px 12px;
  }

  .checkout-form {
    padding: 20px;
  }

  .info-section {
    grid-column: 1;
    margin-bottom: 24px;
  }

  .top-nav {
    padding: 0 12px;
  }

  .logo-section h3 {
    font-size: 16px;
  }
}