@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --pg-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --pg-bg: #0f0f10;
    --pg-surface: #171717;
    --pg-surface-2: #202020;
    --pg-input-bg: #202020;
    --pg-border: rgba(255, 255, 255, 0.11);
    --pg-border-strong: rgba(255, 95, 0, 0.42);
    --pg-text: rgba(255, 255, 255, 0.88);
    --pg-text-secondary: rgba(255, 255, 255, 0.56);
    --pg-text-muted: rgba(255, 255, 255, 0.36);
    --pg-orange: #ff5f00;
    --pg-orange-hover: #ff7a1f;
    --pg-orange-soft: rgba(255, 95, 0, 0.12);
    --pg-red: #ff5c5c;
    --pg-red-soft: rgba(255, 92, 92, 0.12);
    --pg-radius-md: 12px;
    --pg-radius-lg: 18px;
    --pg-radius-xl: 24px;
    --pg-radius-pill: 999px;
    --pg-transition: 160ms ease;
}

.pg-roi-calculator,
.pg-roi-calculator *,
.pg-roi-calculator *::before,
.pg-roi-calculator *::after {
    box-sizing: border-box;
}

.pg-roi-calculator {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0;
    border: 1px solid var(--pg-border);
    border-radius: var(--pg-radius-xl);
    background: var(--pg-bg);
    color: var(--pg-text);
    font-family: var(--pg-font);
    line-height: 1.5;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.pg-roi-calculator h1,
.pg-roi-calculator h2,
.pg-roi-calculator h3,
.pg-roi-calculator h4,
.pg-roi-calculator p {
    margin: 0;
}

.pg-roi-live-form {
    padding: 34px 44px 44px;
}

.pg-roi-live-header {
    padding-bottom: 24px;
    margin-bottom: 44px;
    border-bottom: 1px solid var(--pg-border);
}

.pg-roi-live-header h2 {
    color: #ffffff;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.pg-roi-live-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.95fr);
    gap: 44px;
    align-items: start;
}

.pg-roi-live-inputs {
    min-width: 0;
}

.pg-roi-live-section {
    margin-bottom: 28px;
}

.pg-roi-live-section:last-child {
    margin-bottom: 0;
}

.pg-roi-live-section h3 {
    margin-bottom: 10px;
    color: var(--pg-orange);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pg-roi-live-fields-four {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.pg-roi-field {
    min-width: 0;
}

.pg-roi-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--pg-text-secondary);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
}

.pg-roi-required {
    color: var(--pg-red);
}

.pg-roi-field input[type="text"],
.pg-roi-field input[type="number"],
.pg-roi-field select {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--pg-border);
    border-radius: 8px;
    background: var(--pg-input-bg);
    color: #ffffff;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    transition: border-color var(--pg-transition), box-shadow var(--pg-transition), background var(--pg-transition);
}

.pg-roi-field input::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.pg-roi-field input:focus,
.pg-roi-field select:focus {
    border-color: var(--pg-orange);
    box-shadow: 0 0 0 3px var(--pg-orange-soft);
}

.pg-roi-field select {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--pg-input-bg);
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.72) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%);
    background-position:
        calc(100% - 21px) 50%,
        calc(100% - 14px) 50%;
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
    padding-right: 44px;
}

.pg-roi-field select option {
    background: #111111;
    color: #ffffff;
}

.pg-roi-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pg-roi-input-wrap input {
    padding-right: 70px;
}

.pg-roi-unit {
    position: absolute;
    right: 16px;
    top: 50%;
    color: var(--pg-text-secondary);
    font-size: 13px;
    transform: translateY(-50%);
    pointer-events: none;
}

.pg-roi-hint {
    margin-top: 6px;
    color: var(--pg-text-secondary);
    font-size: 13px;
    line-height: 1.45;
}

.pg-roi-error {
    display: block;
    margin-top: 6px;
    color: var(--pg-red);
    font-size: 12px;
}

.pg-roi-error:empty {
    display: none;
}

.pg-roi-auto-derived {
    display: grid;
    grid-template-columns: 140px 1fr 1fr;
    gap: 24px;
    align-items: center;
    margin-top: 26px;
    padding: 14px 18px;
    border: 1px solid var(--pg-border);
    border-left: 4px solid var(--pg-orange);
    border-radius: 0 var(--pg-radius-md) var(--pg-radius-md) 0;
    background: rgba(255, 255, 255, 0.025);
}

.pg-roi-auto-derived span {
    display: block;
    color: var(--pg-orange);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.pg-roi-auto-derived small {
    display: block;
    color: var(--pg-text-secondary);
    font-size: 13px;
}

.pg-roi-auto-derived strong {
    display: block;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

.pg-roi-throughput-row {
    display: grid;
    gap: 24px;
    align-items: end;
}

.pg-roi-throughput-row--single {
    grid-template-columns: minmax(220px, 360px);
}

.pg-roi-range-wrap {
    margin-top: 28px;
}

.pg-roi-calculator .pg-roi-slider-intro {
    max-width: 720px;
    margin: 26px 0 24px;
    color: var(--pg-text-secondary);
    font-size: 13px;
    line-height: 1.55;
}

.pg-roi-calculator .pg-roi-slider-intro span {
    color: var(--pg-orange);
}

.pg-roi-preview-fill {
    transition: width 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.pg-roi-range-wrap input[type="range"] {
    width: 100%;
    accent-color: var(--pg-orange);
    cursor: pointer;
}

.pg-roi-range-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: var(--pg-text-muted);
    font-size: 12px;
}

.pg-roi-live-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}

.pg-roi-live-note {
    color: var(--pg-text-secondary);
    font-size: 13px;
}

.pg-roi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px; 
    border: 1px solid transparent;
    border-radius: var(--pg-radius-pill);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--pg-transition), color var(--pg-transition), border-color var(--pg-transition), transform var(--pg-transition), opacity var(--pg-transition);
}

.pg-roi-btn-primary {
    background: var(--pg-orange);
    border-color: var(--pg-orange);
    color: #ffffff;
}

.pg-roi-btn-primary:hover {
    background: var(--pg-orange-hover);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.pg-roi-btn-primary:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.pg-roi-btn-secondary {
    background: transparent;
    border-color: var(--pg-border);
    color: var(--pg-text);
}

.pg-roi-btn-loading:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pg-roi-btn-loading::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.38);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: pgRoiSpin 0.65s linear infinite;
}

@keyframes pgRoiSpin {
    to {
        transform: rotate(360deg);
    }
}

.pg-roi-error-banner {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 92, 92, 0.34);
    border-radius: var(--pg-radius-md);
    background: var(--pg-red-soft);
    color: #ff8a8a;
    font-size: 13px;
}

.pg-roi-error-banner[hidden] {
    display: none;
}

@media (max-width: 1100px) {
    .pg-roi-live-grid {
        grid-template-columns: 1fr;
    }

    .pg-roi-live-preview {
        position: static;
    }
}

@media (max-width: 768px) {
    .pg-roi-live-form {
        padding: 24px;
    }

    .pg-roi-live-fields-four,
    .pg-roi-throughput-row,
    .pg-roi-auto-derived {
        grid-template-columns: 1fr;
    }

    .pg-roi-live-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pg-roi-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .pg-roi-live-form {
        padding: 20px;
    }

    .pg-roi-live-header h2 {
        font-size: 30px;
    }
}


/* ============================================================
   ROI EXPERT MODAL + HUBSPOT FORM
============================================================ */

body.pg-roi-modal-open {
  overflow: hidden;
}

.pg-roi-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  padding: 24px;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transform: none;
}

.pg-roi-modal[aria-hidden="true"] {
  display: none;
}

.pg-roi-modal__overlay {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.pg-roi-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(100%, 720px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  margin: 0;
  padding: 20px;
  border-radius: 8px;
  background-color: #fff;
  color: #101010;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: pgRoiModalFadeIn 0.3s ease-out;
}

.pg-roi-modal__close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #333;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  line-height: 1;
}

.pg-roi-modal__close:hover,
.pg-roi-modal__close:focus {
  color: #666;
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.pg-roi-modal__header {
  padding-right: 45px;
  margin-bottom: 20px;
}

.pg-roi-modal__header h3 {
  margin: 0 0 8px 0;
  color: #101010;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.pg-roi-modal__header p {
  margin: 0;
  color: #555;
  font-size: 15px;
  line-height: 1.45;
}

@keyframes pgRoiModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* HubSpot Form Styling */

#pg-roi-hubspot-form {
  min-height: 400px;
  width: 100%;
}

#pg-roi-hubspot-form .hbspt-form {
  font-family: inherit;
  max-width: 100%;
}

#pg-roi-hubspot-form .hs-form-field {
  margin-bottom: 10px;
}

#pg-roi-hubspot-form .hs-form-field > label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 100%;
  margin: 0 0 6px 0;
  color: #333;
}

#pg-roi-hubspot-form .hs-input,
#pg-roi-hubspot-form .hs-input[type="text"],
#pg-roi-hubspot-form .hs-input[type="email"],
#pg-roi-hubspot-form .hs-input[type="tel"],
#pg-roi-hubspot-form textarea.hs-input,
#pg-roi-hubspot-form select.hs-input {
  width: 100% !important;
  padding: 5px 10px !important;
  border: 1px solid #e1e5e9 !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box !important;
}

#pg-roi-hubspot-form select.hs-input {
  min-height: 36px;
}

#pg-roi-hubspot-form .hs-input:focus,
#pg-roi-hubspot-form textarea.hs-input:focus,
#pg-roi-hubspot-form select.hs-input:focus {
  outline: none;
  border-color: #FF5F00 !important;
  box-shadow: 0 0 0 3px rgba(255, 95, 0, 0.1);
}

#pg-roi-hubspot-form .hs-field-desc {
  font-size: 10px;
  font-style: italic;
  color: #666;
}

#pg-roi-hubspot-form .hs-form-private .hs-richtext {
  font-size: 10px;
  font-style: italic;
}

#pg-roi-hubspot-form .hs-button {
  background: linear-gradient(135deg, #FF5F00 0%, #ff8533 100%) !important;
  color: white !important;
  padding: 14px 32px !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  width: 100% !important;
  box-sizing: border-box;
}

#pg-roi-hubspot-form .hs-button:hover {
  background: linear-gradient(135deg, #e65500 0%, #ff771a 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 95, 0, 0.3);
}

#pg-roi-hubspot-form .hs-error-msgs {
  color: #dc3545;
  font-size: 14px;
  margin-top: 4px;
}

#pg-roi-hubspot-form .hs-form-booleancheckbox {
  display: flex;
  align-items: flex-start;
  gap: 12px; 
}

#pg-roi-hubspot-form .hs-form-booleancheckbox label {
    display: flex;
    font-size: 14px;
    line-height: 1.4;
    color: #666;
    margin: 0;
    cursor: pointer;
}

#pg-roi-hubspot-form .hs-form-booleancheckbox input[type="checkbox"] {
    width: auto !important;
    margin-top: 2px;
    flex-shrink: 0;
}

#pg-roi-hubspot-form .submitted-message {
  border: 0;
  color: #101010;
}

#pg-roi-hubspot-form .submitted-message p,
#pg-roi-hubspot-form .submitted-message p span {
    margin: 0;
    color: #555;
    font-size: 15px;
    line-height: 1.45;
}


/* ---- Responsive ---- */

@media (max-width: 768px) {
  .pg-roi-modal {
    padding: 20px;
    box-sizing: border-box;
  }

    .pg-roi-modal__dialog {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 40px);
    margin: 0;
    padding: 20px;
    border-radius: 8px;
    overflow-y: auto;
    }

  .pg-roi-modal__close {
    font-size: 24px;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
  }

  #pg-roi-hubspot-form .hs-button {
    padding: 16px 24px !important;
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  .pg-roi-modal__dialog {
    padding: 15px;
  }

  .pg-roi-modal__close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  #pg-roi-hubspot-form .hs-input,
  #pg-roi-hubspot-form textarea.hs-input {
    padding: 14px 16px !important;
    font-size: 16px !important;
  }

  #pg-roi-hubspot-form .hs-button {
    padding: 18px 20px !important;
    font-size: 16px !important;
  }
}