/* ===== RATE CALCULATOR PAGE STYLES ===== */

/* --- MailerLite form base styles --- */
#mlb2-41116120.ml-form-embedContainer {
  box-sizing: border-box;
  display: table;
  margin: 0 auto;
  position: static;
  width: 100% !important;
}
#mlb2-41116120.ml-form-embedContainer .ml-form-embedWrapper.embedForm { max-width: 400px; width: 100%; }
#mlb2-41116120 .ml-form-embedBody { padding: 20px 20px 0 20px; }
#mlb2-41116120 .ml-form-embedBody form { margin: 0; width: 100%; }
#mlb2-41116120 .ml-form-formContent { margin: 0 0 20px 0; width: 100%; }
#mlb2-41116120 .ml-form-fieldRow { margin: 0 0 10px 0; width: 100%; }
#mlb2-41116120 .ml-form-fieldRow.ml-last-item { margin: 0; }
#mlb2-41116120 .ml-form-fieldRow input {
  background-color: #ffffff !important;
  color: #333333 !important;
  border-color: #cccccc;
  border-radius: 4px !important;
  border-style: solid !important;
  border-width: 1px !important;
  font-size: 14px !important;
  height: auto;
  line-height: 21px !important;
  margin: 0;
  padding: 10px 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
}
#mlb2-41116120 .ml-form-embedSubmit { margin: 0 0 20px 0; float: left; width: 100%; }
#mlb2-41116120 .ml-form-embedSubmit button {
  background-color: #000000 !important;
  border: none !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  color: #ffffff !important;
  cursor: pointer;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 21px !important;
  height: auto;
  padding: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
#mlb2-41116120 .ml-form-embedSubmit button.loading { display: none; }
.ml-form-embedSubmitLoad {
  display: inline-block;
  width: 20px;
  height: 20px;
}
.ml-form-embedSubmitLoad:after {
  content: " ";
  display: block;
  width: 11px;
  height: 11px;
  margin: 1px;
  border-radius: 50%;
  border: 4px solid #fff;
  border-color: #ffffff #ffffff #ffffff transparent;
  animation: ml-form-embedSubmitLoad 1.2s linear infinite;
}
@keyframes ml-form-embedSubmitLoad {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
#mlb2-41116120 .ml-form-embedPermissions { text-align: left; float: left; width: 100%; }
#mlb2-41116120 .ml-form-embedPermissionsContent { margin: 0 0 15px 0; text-align: left; }
#mlb2-41116120 .ml-form-embedPermissionsContent h4 {
  font-size: 12px; font-weight: 700; line-height: 18px; margin: 0 0 10px 0;
}
#mlb2-41116120 .ml-form-embedPermissionsContent p {
  font-size: 12px; line-height: 18px; margin: 0 0 10px 0;
}
#mlb2-41116120 .ml-form-embedPermissionsOptionsCheckbox { margin: 0 0 10px 0; }
#mlb2-41116120 .ml-form-embedPermissionsOptionsCheckbox label {
  font-weight: normal; margin: 0; padding: 0; position: relative;
  display: block; min-height: 24px; padding-left: 24px; cursor: pointer;
}
#mlb2-41116120 .ml-form-embedPermissionsOptionsCheckbox .label-description {
  font-size: 12px; line-height: 18px; font-weight: 700;
}
#mlb2-41116120 .ml-form-embedPermissionsOptionsCheckbox .description {
  font-size: 12px; font-style: italic; font-weight: 400; line-height: 18px; margin: 5px 0 0 0;
}
#mlb2-41116120 .ml-form-embedPermissionsOptionsCheckbox input[type="checkbox"] {
  position: absolute; z-index: -1; opacity: 0; margin-top: 5px; margin-left: -1.5rem;
}
#mlb2-41116120 .ml-form-embedPermissionsOptionsCheckbox .label-description::before {
  position: absolute; top: 4px; left: -1.5rem; display: block;
  width: 16px; height: 16px; pointer-events: none; content: "";
  background-color: #ffffff; border: #adb5bd solid 1px; border-radius: 4px;
}
#mlb2-41116120 .ml-form-embedPermissionsOptionsCheckbox .label-description::after {
  position: absolute; top: 0px; left: -1.5rem; display: block;
  width: 1rem; height: 1rem; content: ""; background: no-repeat 50%/50% 50%;
}
#mlb2-41116120 .ml-form-embedPermissionsOptionsCheckbox input[type=checkbox]:checked~.label-description::before {
  border-color: #000000 !important; background-color: #000000 !important;
}
#mlb2-41116120 .ml-form-embedPermissionsOptionsCheckbox input[type=checkbox]:checked~.label-description::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}
#mlb2-41116120 .ml-form-embedMailerLite-GDPR { padding-bottom: 20px; }
#mlb2-41116120 .ml-form-embedMailerLite-GDPR p { font-size: 10px; line-height: 14px; margin: 0; }
#mlb2-41116120 .ml-form-embedMailerLite-GDPR p a { color: var(--accent-light); text-decoration: underline; }
#mlb2-41116120 .ml-form-successBody { padding: 20px; }
#mlb2-41116120 .ml-form-successContent h4 { font-size: 1.4rem; margin: 0 0 10px 0; }
#mlb2-41116120 .ml-form-successContent p { font-size: 14px; line-height: 20px; }
.ml-form-recaptcha { margin-bottom: 20px; }
.ml-form-recaptcha.ml-error iframe { border: solid 1px #ff0000; }
.ml-error input, .ml-error textarea, .ml-error select { border-color: red !important; }
.ml-error .label-description, .ml-error .label-description p, .ml-error label:first-child { color: #ff0000 !important; }
@media screen and (max-width: 480px) {
  .ml-form-recaptcha { width: 220px !important; }
  .g-recaptcha { transform: scale(0.78); -webkit-transform: scale(0.78); transform-origin: 0 0; -webkit-transform-origin: 0 0; }
}

/* --- Calculator Layout --- */
.calc-hero {
  padding: 120px 0 60px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--cream) 100%);
}
.calc-hero .container { max-width: 1200px; }
.calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}
.calc-intro { margin-bottom: 2rem; }
.calc-intro h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1rem;
}
.calc-intro .subhead {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}
.calc-intro .trust-line {
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.8;
}

/* --- Input Cards --- */
.calc-inputs { display: flex; flex-direction: column; gap: 1rem; }
.input-card {
  background: white;
  border: 1px solid var(--stone);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}
.input-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}
.input-card-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}
.input-card-tooltip {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--stone);
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-family: var(--sans);
  line-height: 1;
}
.input-card-tooltip:hover { border-color: var(--accent); color: var(--accent); }
.tooltip-text {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--ink);
  color: white;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 10;
  pointer-events: none;
}
.tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 8px;
  border: 6px solid transparent;
  border-top-color: var(--ink);
}
.input-card-tooltip:hover .tooltip-text,
.input-card-tooltip:focus .tooltip-text { display: block; }
.input-card-helper {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.input-field {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--cream);
  border-radius: 8px;
  border: 1.5px solid var(--stone);
  overflow: hidden;
  transition: border-color 0.2s;
}
.input-field:focus-within { border-color: var(--accent); }
.input-prefix, .input-suffix {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  padding: 10px 12px;
  background: var(--cream);
  flex-shrink: 0;
  user-select: none;
}
.input-field input {
  flex: 1;
  border: none;
  background: white;
  padding: 10px 14px;
  font-size: 1rem;
  font-family: var(--mono);
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.input-field input::-webkit-inner-spin-button,
.input-field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.input-field input[type=number] { -moz-appearance: textfield; }

/* Currency selector */
.currency-select {
  display: flex;
  gap: 0.5rem;
}
.currency-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--stone);
  border-radius: 8px;
  background: white;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.currency-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.currency-btn:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

/* --- Result Card --- */
.result-wrapper {
  position: sticky;
  top: 84px;
}
.result-card {
  background: white;
  border: 1px solid var(--stone);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
}
.result-card-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.result-main {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  color: var(--green);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.result-main .result-currency {
  font-size: 0.55em;
  color: var(--muted);
  margin-left: 4px;
}
.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.result-stat {
  background: var(--cream);
  border-radius: 8px;
  padding: 12px;
}
.result-stat-value {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}
.result-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
.result-summary {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--stone);
}

/* Undercharging callout */
.undercharge-callout {
  display: none;
  background: #fdedec;
  border: 1px solid var(--coral);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--coral);
  line-height: 1.5;
}
.undercharge-callout.visible { display: block; }
.undercharge-callout strong { color: inherit; }

.result-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--accent);
  color: white;
  padding: 14px 24px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.25s;
}
.result-cta:hover { background: var(--accent-light); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(26,82,118,0.25); }

/* Validation error */
.input-error {
  display: none;
  font-size: 0.82rem;
  color: var(--coral);
  margin-top: 0.5rem;
}
.input-error.visible { display: block; }

/* --- Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 2.5rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--cream);
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--stone); color: var(--ink); }
.modal-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.modal-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.modal-form-wrapper { margin-bottom: 1rem; }

/* MailerLite hidden fields — hide whole rows (no gap); works without JS */
.modal-form-wrapper #mlb2-41116120 .ml-form-fieldRow:has(.ml-field-rate_calc_hourly),
.modal-form-wrapper #mlb2-41116120 .ml-form-fieldRow:has(.ml-field-rate_calc_income_goal),
.modal-form-wrapper #mlb2-41116120 .ml-form-fieldRow:has(.ml-field-rate_calc_expenses),
.modal-form-wrapper #mlb2-41116120 .ml-form-fieldRow:has(.ml-field-rate_calc_tax_rate),
.modal-form-wrapper #mlb2-41116120 .ml-form-fieldRow:has(.ml-field-rate_calc_profit_margin),
.modal-form-wrapper #mlb2-41116120 .ml-form-fieldRow:has(.ml-field-rate_calc_billable_hours),
.modal-form-wrapper #mlb2-41116120 .ml-form-fieldRow:has(.ml-field-rate_calc_currency) {
  display: none !important;
}

/* MailerLite form overrides inside modal */
.modal-form-wrapper .ml-form-embedWrapper {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.modal-form-wrapper .ml-form-embedBody { padding: 0 !important; }
.modal-form-wrapper .ml-field-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--stone);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--sans);
  color: var(--ink);
  background: white;
  outline: none;
  transition: border-color 0.2s;
}
.modal-form-wrapper .ml-field-group input:focus { border-color: var(--accent); }
.modal-form-wrapper .ml-field-group { margin-bottom: 1rem; }
.modal-form-wrapper #mlb2-41116120 .ml-form-embedPermissionsOptionsCheckbox label {
  padding-left: 0 !important;
  min-height: 0 !important;
}
.modal-form-wrapper .ml-field-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.modal-form-wrapper button[type="submit"] {
  width: 100%;
  background: var(--accent);
  color: white;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.2s;
}
.modal-form-wrapper button[type="submit"]:hover {
  background: var(--accent-light);
}
.modal-reassurance {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.modal-reassurance a { color: var(--accent-light); }

/* --- Success Banner --- */
.success-banner {
  display: none;
  background: #eafaf1;
  border: 1px solid var(--green);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: #1a7a3a;
  line-height: 1.5;
  text-align: center;
}
.success-banner.visible { display: block; }

/* Regenerate banner */
.regenerate-banner {
  display: none;
  background: var(--accent-wash);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--accent);
  line-height: 1.5;
  text-align: center;
}
.regenerate-banner.visible { display: block; }

/* --- FAQ Section --- */
.faq-section { padding: 80px 0; background: white; }
.faq-section .container { max-width: 800px; }
.faq-section h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--ink);
  margin-bottom: 2rem;
}
.faq-item {
  border-bottom: 1px solid var(--stone);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.25rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--sans);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-question:hover { color: var(--accent); }
.faq-icon {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.3s;
  color: var(--muted);
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer-inner {
  padding: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

/* --- Product Cards Section --- */
.products-section { padding: 80px 0; background: var(--cream); }
.products-section .container { max-width: 1000px; }
.products-section h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--ink);
  margin-bottom: 2rem;
}
.products-grid-rc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.product-card-rc {
  background: white;
  border: 1px solid var(--stone);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.product-card-rc:hover {
  border-color: var(--accent-light);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}
.product-card-rc h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.product-card-rc .price-tag {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.product-card-rc p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}
.product-card-rc .product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: gap 0.2s;
}
.product-card-rc .product-link:hover { gap: 10px; }

/* --- Noscript --- */
.noscript-notice {
  max-width: 600px;
  margin: 160px auto;
  text-align: center;
  padding: 2rem;
}
.noscript-notice h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.noscript-notice p {
  color: var(--muted);
  line-height: 1.7;
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .result-wrapper {
    position: static;
  }
  .result-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .products-grid-rc { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .modal-content { padding: 1.75rem; }
  .calc-hero { padding: 100px 0 40px; }
}

@media (max-width: 480px) {
  .result-stats { grid-template-columns: 1fr; }
  .currency-select { flex-wrap: wrap; }
}
