/* Ontario LTT Calculator styles - Ratehub-inspired */
:root{
  --onltt-primary:#0fb37e;
  --onltt-accent:#0a8e66;
  --onltt-text:#222222;
  --onltt-border:#e5e7eb;
}
.onltt-wrap{
  max-width:900px;
  margin: 0 auto;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--onltt-text);
}
.onltt-card{
  background:#fff;
  border:1px solid var(--onltt-border);
  border-radius:12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  overflow: hidden;
}
.onltt-header{
  background: var(--onltt-primary);
  color:#fff;
  padding:22px 24px;
  font-size:22px;
  font-weight:700;
}
.onltt-body{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding:24px;
}
.onltt-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.onltt-label{
  font-weight:600;
}
.onltt-input, .onltt-select{
  border:1px solid var(--onltt-border);
  border-radius:10px;
  padding:12px 14px;
  font-size:16px;
  outline:none;
}
.onltt-checkbox{
  display:flex;
  align-items:center;
  gap:10px;
}
.onltt-btn{
  width:100%;
  background: var(--onltt-accent);
  color:#fff;
  border:none;
  border-radius:10px;
  font-weight:700;
  padding:14px 16px;
  cursor:pointer;
}
.onltt-btn:hover{ filter:brightness(.95);}
.onltt-summary{
  border-top:1px solid var(--onltt-border);
  padding:20px 24px;
  background:#fafafa;
}
.onltt-rows{ display:flex; flex-direction:column; gap:10px; }
.onltt-row{ display:flex; justify-content:space-between; }
.onltt-row strong{ font-weight:700; }
.onltt-note{ font-size:12px; color:#6b7280; margin-top:8px; }
@media (max-width: 800px){
  .onltt-body{ grid-template-columns:1fr; }
}


/* ===== Mobile Portrait Enhancements (v1.0.1) ===== */
.onltt-wrap{ padding: 14px; }
.onltt-header{ font-size: 20px; line-height: 1.2; padding: 16px; }
.onltt-body{ padding: 16px; gap: 16px; }
.onltt-input,.onltt-select{ height: 48px; font-size: 16px; } /* avoid iOS zoom */
.onltt-btn{ height: 52px; font-size: 16px; }
.onltt-row{ gap:10px; }
.onltt-row span{ flex: 1; }
.onltt-row strong{ white-space: nowrap; }

/* Very small screens */
@media (max-width: 480px){
  .onltt-header{ font-size: 18px; padding: 14px; }
  .onltt-body{ padding: 14px; gap: 12px; }
  .onltt-summary{ padding: 14px; }
  .onltt-rows{ gap: 8px; }
  .onltt-row{ font-size: 15px; }
  .onltt-row:last-child{ font-size: 18px; }
}

/* Improve spacing for checkbox line wrapping */
.onltt-checkbox .onltt-label{ line-height: 1.3; }

/* Reduce drop shadow on mobile for performance */
@media (max-width: 480px){
  .onltt-card{ box-shadow: 0 1px 6px rgba(0,0,0,.06); border-radius: 10px; }
}

/* Make the summary "sticky" option if placed near bottom (safe-area for iOS) */
@supports (padding: max(0px)){
  .onltt-summary{ padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}


/* ===== v1.0.2 Mobile Portrait + Theme Override Fixes ===== */
.onltt-wrap, .onltt-wrap * { box-sizing: border-box; }
.onltt-input, .onltt-select { width: 100%; background:#fff; border-color: var(--onltt-border) !important; }
.onltt-select { -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.onltt-checkbox input[type=checkbox]{
  width:20px; height:20px; min-width:20px; min-height:20px;
  border:1px solid var(--onltt-border);
}
.onltt-btn{
  display:inline-flex; align-items:center; justify-content:center;
  background: var(--onltt-accent) !important; color:#fff !important;
  border: none !important; box-shadow: none !important;
}
/* Force single column earlier to avoid tight two-up fields in device preview */
@media (max-width: 1024px){
  .onltt-body{ grid-template-columns:1fr !important; }
}
/* Tighter header rounding to avoid "pill" look when embedded in narrow column */
@media (max-width: 480px){
  .onltt-card{ border-radius: 12px; }
}
/* Ensure labels don't collide/wrap awkwardly */
.onltt-label{ font-size:16px; line-height:1.25; }
.onltt-checkbox{ align-items:flex-start; }
.onltt-checkbox .onltt-label{ display:flex; gap:12px; }


/* ===== v1.0.3 Force stack Location + Property type ===== */
.onltt-body .onltt-field{ grid-column: span 2 !important; }
