/* =============================================================================
   Property transfer tax calculator (/emlak-vergisi) — JobHub-styled.
   Transaction inputs on the left; the live totals, the seller/buyer split and
   the cost-structure bar on the right, with the itemised calculation below.

   NOTE: the hero chip / panel / block-row / explainer rules repeat across the
   five calculator stylesheets now (mezuniyyet, ipoteka, elave-is-saati,
   ezamiyye, this one). Extracting a shared calculator stylesheet is overdue.
   ============================================================================= */

/* hero formula chip */
.pt-hero-formula {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 24px; padding: 10px 20px; background: rgba(151, 119, 250, 0.10); border-radius: 999px;
}
.pt-hero-formula span { color: var(--hb-muted); font-weight: 600; font-size: 14px; }
.pt-hero-formula code { font-family: "Montserrat", monospace; color: var(--hb-brand); font-weight: 600; font-size: 15px; }

/* ── Input panel ── */
.pt-panel { padding: 30px; }
.pt-panel-title {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 20px;
  color: var(--hb-heading); margin-bottom: 24px;
}

.pt-field { margin-bottom: 22px; }
.pt-field[hidden] { display: none; }
.pt-label {
  display: block; font-weight: 600; font-size: 14px;
  color: var(--hb-heading); margin-bottom: 9px;
}
.pt-optional { font-weight: 400; font-size: 12px; color: var(--hb-muted); }
.pt-hint { font-size: 12px; line-height: 1.5; color: var(--hb-muted); margin: 6px 0 0; }

.pt-input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--hb-border); border-radius: 10px;
  background: var(--hb-surface); color: var(--hb-heading);
  font-family: "Open Sans", sans-serif; font-size: 15px; height: auto;
}
.pt-input:focus { outline: none; border-color: var(--hb-brand); box-shadow: 0 0 0 3px rgba(151, 119, 250, 0.15); }
.pt-input::placeholder { color: var(--hb-muted); }

.pt-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* property type cards */
.pt-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.pt-type-btn {
  padding: 13px 6px; border: 1px solid var(--hb-border); border-radius: 12px;
  background: var(--hb-surface); text-align: center; cursor: pointer; transition: all 0.18s ease;
}
.pt-type-btn:hover { border-color: var(--hb-brand); }
.pt-type-btn.is-active {
  border-color: var(--hb-brand); background: rgba(151, 119, 250, 0.10);
  box-shadow: 0 0 0 2px rgba(151, 119, 250, 0.20);
}
.pt-type-icon { display: block; font-size: 22px; line-height: 1; margin-bottom: 6px; }
.pt-type-name { display: block; font-size: 12px; font-weight: 600; color: var(--hb-heading); }
.pt-type-btn.is-active .pt-type-name { color: var(--hb-brand); }

/* seller status */
.pt-sellers { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pt-seller-btn {
  padding: 12px 6px; border: 1px solid var(--hb-border); border-radius: 12px;
  background: var(--hb-surface); text-align: center; cursor: pointer; transition: all 0.18s ease;
  font-size: 12px; font-weight: 600; color: var(--hb-heading);
}
.pt-seller-btn:hover { border-color: var(--hb-brand); }
.pt-seller-btn.is-active {
  border-color: var(--hb-brand); background: rgba(151, 119, 250, 0.10); color: var(--hb-brand);
  box-shadow: 0 0 0 2px rgba(151, 119, 250, 0.20);
}
.pt-seller-icon { display: block; font-size: 18px; line-height: 1; margin-bottom: 5px; }

/* ownership length */
.pt-ownership { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pt-own-btn {
  padding: 11px 8px; border: 1px solid var(--hb-border); border-radius: 12px;
  background: var(--hb-surface); text-align: center; cursor: pointer; transition: all 0.18s ease;
}
.pt-own-btn:hover { border-color: var(--hb-brand); }
.pt-own-btn.is-active {
  border-color: var(--hb-brand); background: rgba(151, 119, 250, 0.10);
  box-shadow: 0 0 0 2px rgba(151, 119, 250, 0.20);
}
.pt-own-name {
  display: block; font-family: "Montserrat", sans-serif; font-size: 15px; font-weight: 700;
  color: var(--hb-heading); margin-bottom: 2px;
}
.pt-own-btn.is-active .pt-own-name { color: var(--hb-brand); }
.pt-own-desc { display: block; font-size: 10.5px; line-height: 1.35; color: var(--hb-muted); }

.pt-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Result column ── */
.pt-result {
  position: sticky; top: 96px;
  padding: 24px; border-radius: 16px;
  background: var(--hb-card); border: 1px solid var(--hb-border);
}
.pt-result-placeholder { text-align: center; padding: 30px 10px; color: var(--hb-muted); }
.pt-result-icon { font-size: 44px; margin-bottom: 12px; }
.pt-result-placeholder p { font-size: 14px; line-height: 1.6; margin: 0; }

/* five-year exemption banner */
.pt-exempt {
  padding: 18px 16px; margin-bottom: 14px; border-radius: 14px; text-align: center;
  background: rgba(18, 183, 106, 0.10); border: 1px solid rgba(18, 183, 106, 0.32);
}
.pt-exempt[hidden] { display: none; }
.pt-exempt-icon { display: block; font-size: 30px; line-height: 1; margin-bottom: 8px; }
.pt-exempt h4 {
  font-family: "Montserrat", sans-serif; font-size: 15px; font-weight: 700;
  color: #0a8f51; margin-bottom: 5px;
}
.pt-exempt p { font-size: 12.5px; line-height: 1.55; color: var(--hb-text); margin: 0; }
:root[data-theme="dark"] .pt-exempt h4 { color: #38d98a; }

/* headline cards */
.pt-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pt-card { padding: 16px 14px; border-radius: 14px; text-align: center; }
.pt-card[hidden] { display: none; }
.pt-card-plain { background: var(--hb-surface); border: 1px solid var(--hb-border); }
.pt-card-amber { background: rgba(245, 179, 1, 0.10); border: 1px solid rgba(245, 179, 1, 0.32); }
.pt-card-sqm { grid-column: 1 / -1; background: linear-gradient(135deg, #9777fa, #6d4bd3); color: #fff; }
.pt-card-label { font-size: 11.5px; line-height: 1.4; margin: 0 0 5px; color: var(--hb-muted); }
.pt-card-sqm .pt-card-label { color: rgba(255, 255, 255, 0.85); }
.pt-card-value {
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 21px; line-height: 1.15;
  margin: 0; color: var(--hb-heading); word-break: break-word;
}
.pt-card-amber .pt-card-value { color: #b47500; }
.pt-card-sqm .pt-card-value { color: #fff; }
:root[data-theme="dark"] .pt-card-amber .pt-card-value { color: #f5c451; }
.pt-card-unit { font-size: 10.5px; margin: 4px 0 0; color: var(--hb-muted); }
.pt-card-sqm .pt-card-unit { color: rgba(255, 255, 255, 0.8); }

/* ── Seller / buyer split ── */
.pt-parties { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
.pt-block {
  border: 1px solid var(--hb-border); border-radius: 14px; overflow: hidden;
  background: var(--hb-card);
}
.pt-block-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 15px; background: var(--hb-surface); border-bottom: 1px solid var(--hb-border);
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 13.5px; color: var(--hb-heading);
}
.pt-block-seller .pt-block-head { background: rgba(239, 83, 80, 0.10); }
.pt-block-buyer .pt-block-head { background: rgba(81, 146, 255, 0.10); }

.pt-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 9px 15px; font-size: 13px; color: var(--hb-muted);
}
.pt-row + .pt-row { border-top: 1px solid var(--hb-border); }
.pt-row[hidden] { display: none; }
.pt-row small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.45; }
.pt-row-value { flex-shrink: 0; font-weight: 600; color: var(--hb-heading); white-space: nowrap; }
.pt-row.is-seller-total { background: rgba(239, 83, 80, 0.09); color: #d32f2f; font-weight: 700; }
.pt-row.is-seller-total .pt-row-value { color: #d32f2f; font-weight: 700; }
.pt-row.is-buyer-total { background: rgba(81, 146, 255, 0.09); color: #2f6fd0; font-weight: 700; }
.pt-row.is-buyer-total .pt-row-value { color: #2f6fd0; font-weight: 700; }
.pt-row.is-grand { background: rgba(151, 119, 250, 0.12); color: var(--hb-brand); font-weight: 700; }
.pt-row.is-grand .pt-row-value { color: var(--hb-brand); font-weight: 700; }
:root[data-theme="dark"] .pt-row.is-seller-total,
:root[data-theme="dark"] .pt-row.is-seller-total .pt-row-value { color: #ff8a85; }
:root[data-theme="dark"] .pt-row.is-buyer-total,
:root[data-theme="dark"] .pt-row.is-buyer-total .pt-row-value { color: #7fb0ff; }

/* ── Cost structure ── */
.pt-structure {
  margin-top: 14px; padding: 15px; border-radius: 12px;
  background: var(--hb-surface); border: 1px solid var(--hb-border);
}
.pt-structure-title { font-size: 11.5px; font-weight: 700; color: var(--hb-muted); margin-bottom: 10px; }
.pt-bar { display: flex; height: 20px; border-radius: 999px; overflow: hidden; background: var(--hb-border); }
.pt-bar-seg { height: 100%; transition: width 0.25s ease; }
.pt-bar-seg.is-tax { background: #ef5350; }
.pt-bar-seg.is-vat { background: #ff9800; }
.pt-bar-seg.is-notary { background: #f5b301; }
.pt-bar-seg.is-fees { background: #5192ff; }

.pt-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 11px; }
.pt-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--hb-muted); }
.pt-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.pt-legend-dot.is-tax { background: #ef5350; }
.pt-legend-dot.is-vat { background: #ff9800; }
.pt-legend-dot.is-notary { background: #f5b301; }
.pt-legend-dot.is-fees { background: #5192ff; }

.pt-warning {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 11px;
  background: rgba(81, 146, 255, 0.08); border: 1px solid rgba(81, 146, 255, 0.24);
  font-size: 11.5px; line-height: 1.65; color: var(--hb-text);
}
.pt-warning strong { color: var(--hb-heading); }

/* ── Detailed calculation ── */
.pt-details-card {
  max-width: 780px; margin: 0 auto; overflow: hidden;
  border: 1px solid var(--hb-border); border-radius: 16px; background: var(--hb-card);
}
.pt-section-head {
  padding: 9px 15px; background: var(--hb-surface);
  border-top: 1px solid var(--hb-border); border-bottom: 1px solid var(--hb-border);
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--hb-muted);
}
.pt-details-card .pt-row { padding: 10px 16px; font-size: 13.5px; }

/* ── Explainer ── */
.pt-explain-card {
  height: 100%; padding: 22px 24px; border-radius: 16px;
  background: var(--hb-card); border: 1px solid var(--hb-border);
}
.pt-explain-lead { font-weight: 700; font-size: 14px; color: var(--hb-heading); margin-bottom: 12px; }
/* JobHub resets `ol, ul { list-style: none }` globally. */
.pt-explain-list { margin: 0; padding-left: 20px; list-style: disc outside; }
.pt-explain-list li { font-size: 13px; line-height: 1.65; color: var(--hb-text); margin-bottom: 8px; }
.pt-explain-list li:last-child { margin-bottom: 0; }
.pt-explain-list li::marker { color: var(--hb-brand); }

/* ── Responsive ── */
@media (max-width: 1199px) {
  .pt-cards { grid-template-columns: 1fr; }
}
@media (max-width: 991px) {
  .pt-result { position: static; }
  .pt-cards { grid-template-columns: 1fr 1fr; }
  .pt-parties { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .pt-panel { padding: 24px 18px; }
  .pt-grid-2, .pt-cards, .pt-parties { grid-template-columns: 1fr; }
  .pt-types { grid-template-columns: 1fr 1fr; }
}
