/* Fix & Flip ROI Calculator - Frontend Styles */

.ffrc-wrapper {
  --ffrc-primary: #0d9488;
  --ffrc-btn: #0f766e;
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 96px;
  padding-bottom: 128px;
  padding-left: 16px;
  padding-right: 16px;
  font-family:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
  color: var(--arv-text);
  box-sizing: border-box;
}

/* Header */
.ffrc-title-section {
  text-align: center;
  margin-bottom: 28px;
}
.ffrc-main-heading {
  text-align: center;
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3rem;
  letter-spacing: -0.025em;
}
@media (min-width: 768px) {
  .ffrc-main-heading {
    font-size: 3rem;
    line-height: 1;
  }
}
.ffrc-sub-heading {
  color: #64748b;
  font-size: 15px;
  margin: 0;
}

/* Input Card */
.ffrc-input-card {
  border-radius: 1rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  padding: 2.5rem;
}

.ffrc-primary-inputs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .ffrc-primary-inputs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.ffrc-input-group label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 14px;
  color: #475569;
  margin-bottom: 0.5rem;
}

.ffrc-dollar-input {
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--ffrc-primary);
  padding-bottom: 6px;
}
.ffrc-dollar-input span {
  font-size: 22px;
  color: var(--ffrc-primary);
  font-weight: 500 !important;
}
.ffrc-dollar-input input {
  padding: 0 !important;
  font-size: 22px !important;
  font-weight: 500 !important;
  color: var(--ffrc-primary) !important;
  min-height: 43px !important;
  border: none !important;
  outline: none !important;
}
.ffrc-dollar-input input::-webkit-inner-spin-button,
.ffrc-dollar-input input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* Sliders Grid */
.ffrc-sliders-grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 3.5rem;
  row-gap: 1.75rem;
}
@media (min-width: 768px) {
  .ffrc-sliders-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ffrc-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border-radius: 50%;
  background: #fff;
  color: #90a1b9;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: solid 1px #90a1b9;
}
.ffrc-help::before {
  content: attr(title);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  max-width: 320px;
  padding: 0.5rem 0.75rem;
  background-color: #0f172a;
  color: #fff;
  line-height: 1rem;
  font-size: 0.75rem;
  border-radius: 0.375rem;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  pointer-events: none;
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.ffrc-help::after {
  content: "";
  position: absolute;
  bottom: calc(130% - 6px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #021639 transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ffrc-help:hover::before,
.ffrc-help:hover::after {
  opacity: 1;
  visibility: visible;
}
@media (max-width: 580px) {
  .ffrc-sliders-grid {
    grid-template-columns: 1fr;
  }
}

.ffrc-slider-header {
  justify-content: space-between;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}
.ffrc-slider-header label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 15px;
  color: #334155;
  font-weight: 500;
}
.ffrc-slider-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--ffrc-primary);
  min-width: 40px;
  text-align: right;
}
.ffrc-input-card .ffrc-range {
  width: 100%;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
  border: solid 1px #b2b2b2;
}
.ffrc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px !important;
  height: 16px !important;
  background: #008080 !important;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: none !important;
  transition: box-shadow 0.15s;
  border: none !important;
  margin-top: -4px !important;
}
.ffrc-range::-webkit-slider-thumb:hover {
  background: #008080 !important;
  border: none !important;
}
.ffrc-range::-moz-range-thumb {
  width: 16px !important;
  height: 16px !important;
  background: #008080 !important;
  border-radius: 50%;
  cursor: pointer;
  border: none !important;
  border: none;
  margin-top: -4px !important;
}

/* Help tooltip */
.ffrc-help {
  vertical-align: middle;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border-radius: 50%;
  background: #fff;
  color: #90a1b9;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: solid 1px #90a1b9;
}

/* Results */
.ffrc-results-section {
  margin-bottom: 28px;
}
.ffrc-results-heading {
  text-align: center;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 5rem;
  margin-bottom: 2.5rem;
  letter-spacing: -0.025em;
}
@media (min-width: 768px) {
  .ffrc-results-heading {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}
.ffrc-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.ffrc-results-grid {
  @media (min-width: 768px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ffrc-result-card {
  background: linear-gradient(
    180deg,
    rgba(0, 128, 128, 0.1) 0%,
    rgba(0, 128, 128, 0.04) 100%
  );
  border-color: rgba(0, 128, 128, 0.25);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  text-align: center;
  box-shadow:
    0 1px 3px 0 #00000017,
    0 1px 2px -1px #0000001a;
  transition: box-shadow 0.2s ease;
  border-style: solid;
  border-width: 1px;
}
.ffrc-result-card:hover {
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
}
.ffrc-result-label {
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
}
.ffrc-result-sublabel {
  font-size: 12px;
  color: #64748b;
  margin-top: 0.25rem;
}
.ffrc-result-value {
  margin-top: 0.75rem;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #008080;
}

/* Breakdown */
.ffrc-breakdown-card {
  margin-top: 2.5rem;
}
.range_display {
  display: flex;
  align-items: center;
  gap: 20px;
}
.range_display span {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  min-width: 90px;
  text-align: right;
}
.ffrc-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 3rem;
  background-color: #ffffff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  padding: 2rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
@media (min-width: 768px) {
  .ffrc-breakdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .ffrc-breakdown-grid {
    grid-template-columns: 1fr;
  }
}

.ffrc-breakdown-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  font-size: 15px;
}
.ffrc-breakdown-item span:first-child {
  color: #475569;
}
.ffrc-breakdown-item span:last-child {
  color: #0f172a;
  font-weight: 600;
}

/* PDF Section */
.ffrc-pdf-section {
  margin-top: 4rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 28rem;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(
    180deg,
    rgba(0, 128, 128, 0.1) 0%,
    rgba(0, 128, 128, 0.04) 100%
  );
  border-color: rgba(0, 128, 128, 0.25);
  box-shadow:
    0 1px 3px 0 #00000017,
    0 1px 2px -1px #0000001a;
  transition: box-shadow 0.2s ease;
  border-style: solid;
  border-width: 1px;
}
.ffrc-pdf-section h3 {
  font-size: 17px;
  color: #0f172a;
  font-weight: 600;
}
.ffrc-pdf-section p {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-top: 0.25rem;
  margin-bottom: 0;
}
.ffrc-pdf-form {
  display: flex;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
  flex-direction: column;
}
.ffrc-pdf-form input[type="email"] {
  flex: 1;
  padding: 12px 0;
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  border: none;
  border-bottom: 2px solid rgba(0, 128, 128, 0.4);
  background-color: transparent;
  font-size: 15px;
  outline: none;
  box-shadow: none !important;
}
label.pdf_email {
  display: block;
  text-align: left;
  font-size: 12px;
  color: #64748b;
  margin-top: 1.25rem;
}
#ffrc_download_btn {
  border: none;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.1s;
  white-space: nowrap;
  width: 100%;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  transition: opacity 0.2s ease;
  margin-top: 24px;
}
#ffrc_download_btn:hover {
  opacity: 0.9;
}
#ffrc_download_btn:active {
  transform: translateY(0);
}
#ffrc_download_btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.ffrc-message {
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}
.ffrc-message.success {
  background: #dcfce7;
  color: #16a34a;
}
.ffrc-message.error {
  background: #fee2e2;
  color: #dc2626;
}
@media (max-width: 767px) {
  .ffrc-wrapper {
    padding-top: 46px;
    padding-bottom: 68px;
  }
  .ffrc-main-heading {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  .ffrc-input-card {
    padding: 24px 16px;
  }
  .ffrc-primary-inputs {
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  .ffrc-dollar-input input,
  .ffrc-dollar-input span {
    font-size: 18px !important;
  }
  .ffrc-sliders-grid {
    row-gap: 1rem;
  }
  .ffrc-results-heading {
    margin-top: 3rem;
  }
  .ffrc-breakdown-grid {
    grid-template-columns: 1fr;
    padding: 24px 16px;
  }
}
