@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

:root {
  --primary-color: #203C76;
  --sidebar-bg: #ECF0F4;
  --main-bg: #FFFFFF;
  --text-color: #1a2b4a;
  --text-muted: #667085;
  --border-color: #D8DDE6;
  --input-radius: 30px;
  --font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  font-family: var(--font-family);
  color: var(--text-color);
  background: var(--sidebar-bg);
  overflow-x: hidden;
  overflow-y: auto;
}

/* Centered split layout — both panels stay together */
.container {
  display: flex;
  width: 100%;
  max-width: 1200px;
  min-height: 100vh;
  position: relative;
}

/* Background pseudo-element for the entire left side */
.container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100vw;
  width: calc(100vw + 420px);
  background-color: var(--sidebar-bg);
  z-index: -1;
}

/* Left Sidebar */
.sidebar {
  width: 420px;
  min-width: 380px;
  flex-shrink: 0;
  padding: 40px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
}

.logo {
  margin-bottom: 60px;
}

.logo img {
  width: 200px;
  max-width: 100%;
}

/* Vertical Stepper */
.stepper {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 10px;
}

/* Connector Line Container */
.stepper::before {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 55px;
  /* Matches last step item height */
  left: 29px;
  /* Center of the 40px circle + padding */
  width: 2px;
  background-color: #D0D5DD;
  z-index: 0;
}

.step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 55px;
  position: relative;
  z-index: 1;
}

.step:last-child {
  margin-bottom: 0;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  background-color: #fff;
  border: 2px solid #D0D5DD;
  color: var(--text-color);
  margin-right: 16px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.step.active .step-circle {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.step.completed .step-circle {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.step-content {
  padding-top: 8px;
}

.step-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: #98a2b3;
  margin: 0 0 4px;
}

.step-content p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.step.active .step-content h3,
.step.completed .step-content h3 {
  color: var(--primary-color);
}

/* Checkmark & Arrow Icons */
.step-circle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* DigiCert Badge */
.digicert-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 60px;
}

.digicert-badge svg {
  flex-shrink: 0;
}

.digicert-text {
  font-family: var(--font-family);
}

.dc-name {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  font-style: italic;
}

.dc-name sup {
  font-size: 7px;
  vertical-align: super;
}

.dc-label {
  font-size: 9px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
}

/* Right Content Panel — agent info stays visible, only iframe scrolls */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--main-bg);
  overflow-y: visible;
}

/* Agent Info - Top Right */
.agent-info {
  padding: 30px 40px 0;
  text-align: right;
  flex-shrink: 0;
  min-height: 72px;
}

.agent-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.agent-details {
  display: flex;
  flex-direction: column;
}

.agent-name {
  font-weight: 700;
  color: var(--text-color);
  font-size: 16px;
}

.agent-contact {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.agent-contact a {
  color: var(--text-muted);
  text-decoration: none;
}

.agent-avatar {
  width: 42px;
  height: 42px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

/* Form Container */
.form-wrapper {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 40px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-wrapper iframe {
  width: 100%;
  min-height: 600px;
  border: none;
  background: transparent;
  overflow: hidden;
}

/* Responsive Design */
@media (max-width: 900px) {
  .sidebar {
    width: 300px;
    min-width: 280px;
    padding: 30px;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
    overflow-y: auto;
  }

  .container {
    flex-direction: column;
    height: auto;
  }

  /* Transform Sidebar to Top Header on Mobile */
  .sidebar {
    width: 100%;
    min-width: auto;
    max-width: none;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    overflow-y: visible;
  }

  .logo {
    margin-bottom: 0;
  }

  .logo img {
    width: 150px;
  }

  /* Hide vertical stepper on mobile or convert to simpler indicator */
  .stepper {
    display: none;
  }

  /* Mobile Stepper (Simplified) */
  .mobile-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--primary-color);
  }

  .main-content {
    overflow: visible;
  }

  .agent-info {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    padding: 16px 20px;
    background-color: #f9fafb;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
  }

  .agent-profile {
    justify-content: flex-start;
  }

  .form-wrapper {
    padding: 20px;
  }

  .form-wrapper iframe {
    height: auto;
  }
}