/* Main container: two-column, balanced width */
.sgi-container {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 40px auto;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

  /* Required for sticky to work */
  overflow: visible;
}

/* Left side (Form) */
.sgi-left {
  flex: 1.2;
  padding: 50px 60px;
  box-sizing: border-box;
  border-right: 1px solid #f0f0f0;
  overflow-y: visible;
}
.sgi-left {
  background: #fffdf7;
}

/* Right side (Helper Panel) – fills full height */
.sgi-right {
  flex: 0.8;
  padding: 50px 40px;
  background: linear-gradient(to bottom, #fffef8 0%, #fafafa 50%, #ece7d9 100%);
  box-sizing: border-box;
  display: block;
}

/* Sticky helper content */
#sugarcrm-help-pane {
  width: 100%;
  color: #444;
  line-height: 1.6;
  font-size: 15px;

  /* Always visible during scroll */
  position: sticky;
  top: 120px;

  /* Allows all content types to stay inside */
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Ensure ALL dynamic HTML stays inside the panel -------------------------- */

/* Responsive images */
#sugarcrm-help-pane img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  border-radius: 6px;
  margin: 12px 0;
}

/* Responsive videos */
#sugarcrm-help-pane video {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 12px 0;
}

/* Responsive iframes (YouTube, Vimeo, dashboards, etc.) */
#sugarcrm-help-pane iframe {
  max-width: 100% !important;
  width: 100% !important;
  height: auto;
  aspect-ratio: 16/9;
  border: none;
  border-radius: 6px;
  margin: 12px 0;
}

/* Responsive tables */
#sugarcrm-help-pane table {
  width: 100% !important;
  border-collapse: collapse;
  overflow: hidden;
  display: block;
  overflow-x: auto;
}

/* Any DIV or block content stays inside */
#sugarcrm-help-pane div,
#sugarcrm-help-pane p,
#sugarcrm-help-pane section,
#sugarcrm-help-pane article {
  max-width: 100% !important;
}

/* Prevent long URLs or long words breaking layout */
#sugarcrm-help-pane a,
#sugarcrm-help-pane span {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Empty state */
.sgi-empty-state {
  text-align: center;
  color: #666;
  padding-top: 20px;
}

.sgi-empty-icon {
  font-size: 110px;
  opacity: 0.4;
  margin-bottom: 10px;
}

.sgi-empty-state h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.sgi-empty-state p {
  margin-top: 6px;
  font-size: 14px;
  color: #888;
  line-height: 1.5;
}

/* Responsive layout for smaller screens */
@media (max-width: 1024px) {
  .sgi-container {
    flex-direction: column;
    max-width: 95%;
    margin: 20px auto;
  }

  /* Sticky disabled for mobile */
  #sugarcrm-help-pane {
    position: static;
  }

  .sgi-left,
  .sgi-right {
    padding: 30px 25px;
    border-right: none;
    border-bottom: 1px solid #eee;
  }

  .sgi-right {
    background: #fff;
  }
}
/* =========================================================
   Resume Gate – Gravity-style UI
   ========================================================= */

.sgi-resume-box {
  max-width: 520px;
  margin: 40px auto;
  padding: 40px 45px;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.sgi-resume-title {
  font-size: 24px;
  font-weight: 600;
  color: #1d2327;
  margin-bottom: 8px;
}

.sgi-resume-subtitle {
  font-size: 15px;
  color: #646970;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Field wrapper */
.sgi-field {
  margin-bottom: 22px;
}

/* Labels */
.sgi-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1d2327;
  margin-bottom: 6px;
}

/* Inputs */
.sgi-field input[type="text"],
.sgi-field input[type="date"] {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  font-size: 15px;
  color: #1d2327;
  border: 1px solid #c3c4c7;
  border-radius: 6px;
  background-color: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Focus state – matches Gravity / WP admin feel */
.sgi-field input:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
}

/* Primary button */
.sgi-btn-primary {
  width: 100%;
  height: 46px;
  margin-top: 10px;
  background: #2271b1;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.sgi-btn-primary:hover {
  background: #135e96;
}

.sgi-btn-primary:active {
  transform: translateY(1px);
}

/* Error message */
.sgi-error {
  display: none;
  margin-top: 14px;
  padding: 10px 12px;
  font-size: 14px;
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f5c2c7;
  border-radius: 6px;
}

/* Show error */
.sgi-error:not(:empty) {
  display: block;
}

/* Mobile */
@media (max-width: 640px) {
  .sgi-resume-box {
    margin: 20px 0;
    padding: 30px 25px;
  }
}
/* =========================================================
   Breadcrumb Navigation
   ========================================================= */

.sgi-breadcrumbs {
  margin-bottom: 25px;
}

.sgi-breadcrumbs ul {
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sgi-step {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  padding-bottom: 6px;
  cursor: default;
  color: #8c8f94;
}

/* Completed */
.sgi-step.completed {
  color: #1d2327;
  cursor: pointer;
}

.sgi-step.completed::after {
  content: "✔";
  margin-left: 6px;
  color: #46b450;
}

/* Current */
.sgi-step.current {
  color: #2271b1;
  font-weight: 600;
  border-bottom: 2px solid #2271b1;
}

/* Locked */
.sgi-step.locked {
  color: #b1b1b1;
  cursor: not-allowed;
}
/* =========================
   CONTAINER
========================= */

.sgi-progress {
  padding: 24px 0;
}

.sgi-steps {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* =========================
   STEPS
========================= */

.sgi-step {
  width: 90px;
  text-align: center;
}

.circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #c6c6c6;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.sgi-step.active .circle {
  background: #0b1d46;
}

.label {
  margin-top: 6px;
  font-size: 13px;
  color: #6b7280;
}

/* =========================
   GAP / STRAIGHT DASH
========================= */

.line {
  flex: 1;
  position: relative;
  height: 40px; /* vertical reference zone */
}

/* straight dashed line – CENTERED */
.line::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1.5px dashed #d6d6d6;
  transform: translateY(-50%);
}

/* =========================
   CURVED ARC (ACTIVE GAP)
========================= */

.line.active .arc {
  position: absolute;
  top: -20px;                 /* ABOVE the straight line */
  left: 50%;
  width: 58px;
  height: 40px;
  transform: translateX(-50%);
  pointer-events: none;
}

.line.active .arc path {
  stroke: #d6d6d6;
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  fill: none;
}

/* =========================
   PLANE
========================= */

.line.active .plane {
  position: absolute;
  top: -14px;                /* floats above arc */
  left: 50%;
  transform: translateX(-50%) rotate(-22deg);
  font-size: 13px;
  color: #4f83ff;
  background: #fff;
  padding: 1px 3px;
  z-index: 2;
}
/* =========================
   STICKY BREADCRUMBS
========================= */

/* =========================
   BREADCRUMBS HEADER (POLISHED)
========================= */

/* =========================
   BREADCRUMBS – POLISHED HEADER
========================= */

/* =========================
   PREMIUM BREADCRUMBS WRAPPER
   (EDGE-TO-EDGE, MATERIAL)
========================= */

.sgi-breadcrumbs-wrapper {
  position: sticky;
  top: 0;
  z-index: 20;

  /* EDGE-TO-EDGE inside left panel */
  margin-left: -60px;
  margin-right: -60px;
  margin-top: -50px;
  margin-bottom: 32px;

  padding: 24px 60px 26px;

  /* Premium surface */
  background:
    linear-gradient(
      to bottom,
      #ffffff 0%,
      #fff9f2 100%
    );

  /* Material separation */
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);

  /* Soft elevation */
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 24px rgba(15, 23, 42, 0.06);
}

/* ===== Eligibility Page ===== */

.sgi-eligibility {
    max-width: 680px;
    margin: 0 auto;
    font-size: 18px;
}

.sgi-eligibility-title {
    font-size: 26px;
    margin-bottom: 20px;
}

.sgi-eligibility-subtitle {
    font-size: 18px;
    margin-bottom: 15px;
}

/* Blue boxes */
.sgi-eligibility-box {
    background: #1e80c8;
    color: #fff;
    padding: 20px;
    margin-bottom: 20px;
}

.sgi-eligibility-box p {
    margin-bottom: 10px;
}

.sgi-eligibility-box ol {
    padding-left: 20px;
    margin-bottom: 10px;
}

.sgi-eligibility-box li {
    margin-bottom: 6px;
}

/* Warning text */
.sgi-warning {
    margin-top: 15px;
    font-weight: bold;
}

/* Checklist */
.sgi-checklist {
    list-style: none;
    padding-left: 0;
}

.sgi-checklist li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
}

.sgi-checklist li::before {
    content: '+';
    position: absolute;
    left: 0;
    color: #ffd200;
    font-weight: bold;
}

/* Links */
.sgi-links {
    list-style: none;
    padding-left: 0;
}

.sgi-links li a {
    color: #fff;
    text-decoration: underline;
}

/* Actions */
.sgi-eligibility-actions {
    text-align: center;
    margin-top: 30px;
}
/* Hide Gravity Forms submit button (upgrade-safe) */
.gform_wrapper .gform_footer {
    display: none !important;
}
/* Breadcrumb links */
.sgi-step-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.sgi-step.completed:hover .circle {
  background: #9ca3af;
}

.sgi-step.completed:hover .label {
  color: #374151;
}
/* Hide ONLY GF upload UI for THIS field */
.gfield.sgi_file_upload .ginput_container_fileupload {
    display: none;
}

/* Contain custom UI inside the field */
.gfield.sgi_file_upload .sgi-file-ui-wrap {
    margin-top: 8px;
}

/* Dropzone */
.gfield.sgi_file_upload .sgi-dropzone {
    border: 2px dashed #d0d7de;
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

/* Button */
.gfield.sgi_file_upload .sgi-select-btn {
    background: #3b5bfd;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
    cursor: pointer;
}

/* File list */
.gfield.sgi_file_upload .sgi-file-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

/* Individual file */
.gfield.sgi_file_upload .sgi-file-item {
    margin-top: 8px;
    background: #ececec;
}

/* Progress bar */
.gfield.sgi_file_upload .sgi-progress {
    height: 6px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.gfield.sgi_file_upload .sgi-progress-bar {
    height: 100%;
    width: 0%;
    background: #3b5bfd;
}
/* =========================================
 * SGI Uploaded Files (After Upload / Resume)
 * ========================================= */

.sgi-uploaded-files {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

/* Individual file row */
.sgi-uploaded-file {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 12px;
    margin-bottom: 8px;

    background: #f8f9fb;
    border: 1px solid #dfe3e8;
    border-radius: 6px;

    font-size: 14px;
    line-height: 1.4;
}

/* File icon */
.sgi-file-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* File name */
.sgi-file-name {
    flex: 1;
    font-weight: 500;
    color: #1f2937;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* File size */
.sgi-file-size {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

/* Delete button */
.sgi-file-delete {
    background: transparent;
    border: none;
    cursor: pointer;

    font-size: 16px;
    line-height: 1;
    color: #9ca3af;

    padding: 4px;
    border-radius: 4px;
}

.sgi-file-delete:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}

/* Hover effect for whole row */
.sgi-uploaded-file:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

/* Mobile friendly */
@media (max-width: 600px) {
    .sgi-uploaded-file {
        flex-wrap: wrap;
        gap: 6px;
    }

    .sgi-file-size {
        order: 3;
        width: 100%;
        margin-left: 28px;
    }
}
/* =========================================
 * SGI Prefilled Uploaded Files (FINAL)
 * ========================================= */

.sgi-prefilled-files {
    margin-top: 12px;
    padding: 14px 16px;

    background-color: #f4f8ff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;

    font-size: 14px;
}

/* Title */
.sgi-prefilled-files > strong {
    display: block;
    margin-bottom: 8px;

    font-weight: 600;
    color: #1e3a8a;
}

/* List reset */
.sgi-prefilled-files ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Each file row */
.sgi-prefilled-files li {
    padding: 6px 0;
}

/* File link */
.sgi-prefilled-files a {
    color: #1d4ed8;
    font-weight: 500;
    text-decoration: none;

    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sgi-prefilled-files a:hover {
    text-decoration: underline;
}

/* Mobile friendliness */
@media (max-width: 600px) {
    .sgi-prefilled-files {
        padding: 12px;
        font-size: 13px;
    }
}
/* =====================================================
 * SGI File Upload – Scoped Styling (SAFE)
 * ===================================================== */

.sgi-file-ui .sgi-file-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.sgi-file-ui .sgi-file-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    background: #ececec;

    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;

    font-size: 14px;
    color: #111827;
}

/* File name */
.sgi-file-ui .sgi-file-item a {
    color: #111827;
    text-decoration: none;
    font-weight: 500;
}

.sgi-file-ui .sgi-file-item a:hover {
    text-decoration: underline;
}

/* Optional size text */
.sgi-file-ui .sgi-file-size {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

/* Delete button */
.sgi-file-ui .sgi-delete-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;

    color: #9ca3af;
    font-size: 16px;
    line-height: 1;
    border-radius: 4px;
}

.sgi-file-ui .sgi-delete-btn:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}

/* =====================================================
 * Progress Bar (only inside file UI)
 * ===================================================== */

.sgi-file-ui .sgi-progress {
    grid-column: 1 / -1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
}

.sgi-file-ui .sgi-progress-bar {
    height: 100%;
    width: 0%;
    background: #2563eb;
    transition: width 0.3s ease;
}
.sgi-file-ui .ginput_preview {
    margin-top: 8px;
}
/* Navigation buttons wrapper */
.sgi-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
}

/* Base button style */
.sgi-nav-buttons .sgi-btn-primary {
    min-width: 140px;
    height: 44px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* Previous button (secondary) */
.sgi-prev-btn {
    background: #ffffff;
    color: #555;
    border: 1px solid #d0d0d0;
}

/* PREVIOUS arrow */
.sgi-prev-btn::before {
    content: "←";
    margin-right: 10px;
    font-size: 16px;
    font-weight: 700;
    transition: transform 0.2s ease;
}
.sgi-prev-btn:hover {
    background: #f5f5f5;
}

/* Next button (primary, prominent) */
.sgi-next-btn {
    background: #ff7a00;
    color: #ffffff;
    border: 1px solid #ff7a00;
    box-shadow: 0 4px 10px rgba(255, 122, 0, 0.3);
}

/* NEXT arrow */
.sgi-next-btn::after {
    content: "→";
    margin-left: 10px;
    font-size: 16px;
    font-weight: 700;
    transition: transform 0.2s ease;
}
.sgi-next-btn:hover {
    background: #e56e00;
    box-shadow: 0 6px 14px rgba(255, 122, 0, 0.4);
}

/* Mobile stacking (optional but clean) */
@media (max-width: 640px) {
    .sgi-nav-buttons {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .sgi-nav-buttons .sgi-btn-primary {
        width: 100%;
    }
}
/* Subtle motion on hover (feels premium) */
.sgi-next-btn:hover::after {
    transform: translateX(4px);
}

.sgi-prev-btn:hover::before {
    transform: translateX(-4px);
}
.sgi-success-box {
    background: #e8f5ee;
    border: 1px solid #9fd5b3;
    border-radius: 6px;
    padding: 16px 18px;
    margin-top: 16px;
    color: #1f5f3b;
}

.sgi-success-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
}

.sgi-success-text {
    font-size: 14px;
    line-height: 1.5;
}

.sgi-countdown {
    font-weight: 600;
}
.sgi-force-hidden { display: none !important; }
.gfield {
    scroll-margin-top: 200px;
}
#sgi-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100vw;
    height: 100vh;

    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(2px);

    display: none;

    /* perfect center alignment */
    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 99999;
}

.sgi-loader {
    text-align: center;
}

.sgi-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #ddd;
    border-top-color: #2b6cb0;
    border-radius: 50%;
    animation: sgiSpin 0.8s linear infinite;
    margin: auto;
}

.sgi-loader-text {
    margin-top: 12px;
    font-size: 24px;
    color: #333;
    font-family: system-ui;
}

@keyframes sgiSpin {
    to {
        transform: rotate(360deg);
    }
}
#sgi-loading-overlay.sgi-success .sgi-spinner {
    display: none;
}

#sgi-loading-overlay.sgi-success .sgi-loader-text {
    color: #2e7d32;
}

#sgi-loading-overlay.sgi-success .sgi-loader-text::before {
    content: "";
    color: #2e7d32;
    font-size: 18px;
    font-weight: bold;
}

#sgi-loading-overlay.sgi-success .sgi-loader {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 18px 28px;
}
