/* V61 · viewport-safe dialogs, lease/rental countdowns and map states. */

/* V62 · live field values update in place; no card/grid reflow. */
.field-card-v3 .field-live-updated,.summary-row .field-live-updated,.page-heading .field-live-updated{animation:fdFieldLiveValue .62s ease-out}
@keyframes fdFieldLiveValue{0%{color:var(--accent);text-shadow:0 0 14px color-mix(in srgb,var(--accent) 42%,transparent)}100%{color:inherit;text-shadow:none}}
.action-modal-card{
  max-height:calc(100dvh - 28px);
  overflow:auto;
  overscroll-behavior:contain;
}

.cr-field-has-lease{
  border-color:#d9b53f!important;
  box-shadow:0 16px 42px rgba(151,111,13,.13)!important;
}
.cr-vehicle-has-lease{
  border-color:#d9b53f!important;
  box-shadow:0 16px 42px rgba(151,111,13,.13)!important;
}
.cr-field-lease-marker{
  display:flex;
  min-height:54px;
  margin:10px 0;
  padding:9px 11px;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid #e2bd42;
  border-radius:12px;
  background:linear-gradient(135deg,#fff8cf,#f5df78);
  color:#473706;
}
.cr-field-lease-marker>span{
  display:grid;
  min-width:0;
  grid-template-columns:30px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:9px;
}
.cr-field-lease-marker>span>i{
  display:grid;
  width:30px;
  height:30px;
  grid-row:1/3;
  place-items:center;
  align-self:center;
  border-radius:9px;
  color:#fff;
  font-style:normal;
  font-size:14px;
  font-weight:900;
  background:#6a5512;
}
.cr-field-lease-marker small{
  font-size:7px;
  font-weight:900;
  letter-spacing:.09em;
  opacity:.7;
}
.cr-field-lease-marker strong{
  overflow:hidden;
  margin-top:2px;
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.cr-field-lease-marker>em{
  display:grid;
  flex:0 0 auto;
  text-align:right;
  font-style:normal;
}
.cr-field-lease-marker>em b{
  margin-top:3px;
  font-size:9px;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.cr-vehicle-lease-marker{
  margin:8px 0 11px;
}

/* Leased-in and leased-out fields stay visible in the dashboard map even
   while the base-game ownership is temporarily assigned to another farm. */
.lm-field-shape.leased-in{
  stroke:#ffd24d!important;
  stroke-width:2.7!important;
  fill:rgba(255,210,77,.22)!important;
  filter:drop-shadow(0 0 3px rgba(113,78,0,.45));
}
.lm-field-shape.leased-out{
  stroke:#ff9f43!important;
  stroke-width:2.7!important;
  stroke-dasharray:8 5;
  fill:rgba(255,159,67,.16)!important;
  filter:drop-shadow(0 0 3px rgba(116,52,0,.4));
}
.lm-field-shape.leased-in:hover,.lm-field-shape.leased-out:hover{
  stroke:#fff0a3!important;
  fill:rgba(255,203,70,.31)!important;
}
.lm-legend i.leased-in{background:#ffd24d!important;box-shadow:0 0 0 2px rgba(255,210,77,.2)}
.lm-legend i.leased-out{background:#ff9f43!important;box-shadow:0 0 0 2px rgba(255,159,67,.2)}

@media(min-width:761px){
  .action-modal-card:has(.cr-listing-editor),
  .action-modal-card:has(.cr-direct-sale),
  .action-modal-card:has(.ebuy-create-preview){
    width:min(880px,calc(100vw - 28px));
    max-height:calc(100dvh - 28px);
    padding:15px 18px;
    overflow:auto;
  }
  .cr-listing-editor .modal-heading,
  .cr-direct-sale .modal-heading{margin-bottom:7px}
  .cr-listing-editor .modal-copy{margin:0 0 7px;padding:0;line-height:1.4}
  .cr-listing-editor .form-grid{gap:6px 10px}
  .cr-listing-editor .form-grid label{font-size:8px}
  .cr-listing-editor .form-grid input,
  .cr-listing-editor .form-grid select{min-height:35px;margin-top:4px}
  .cr-listing-editor .form-grid textarea{min-height:40px;max-height:40px;margin-top:4px}
  .cr-asset-select>select{height:34px;margin-bottom:5px}
  .cr-asset-preview{grid-template-columns:145px minmax(0,1fr);min-height:68px}
  .cr-asset-preview .cr-asset-choice-media{height:68px}
  .cr-asset-preview .cr-asset-choice-media img{max-height:64px}
  .cr-asset-preview .cr-field-picture svg{height:48px}
  .cr-asset-preview .cr-asset-choice-copy{padding:7px 11px}
  .cr-listing-editor .cr-listing-renewal{min-height:36px;padding:3px 0}
  .cr-listing-editor .cr-booking-notice{min-height:36px;padding:5px 9px}
  .cr-listing-editor .cr-form-message{min-height:9px;margin:2px 0}
  .cr-listing-editor .modal-actions,
  .cr-direct-sale-copy .modal-actions,
  .ebuy-create-preview .modal-actions{
    position:sticky;
    z-index:5;
    bottom:-15px;
    margin-top:5px;
    padding:9px 0 2px;
    background:linear-gradient(180deg,rgba(255,255,255,0),var(--card,#fff) 28%);
  }
  .cr-direct-sale-layout{grid-template-columns:minmax(215px,.76fr) minmax(320px,1.24fr);gap:16px}
  .cr-direct-sale-media{min-height:205px}
  .cr-direct-sale-media img{height:180px;padding:14px}
  .cr-direct-sale-copy{padding:0}
  .cr-direct-sale-copy h3{margin:4px 0 5px;font-size:19px}
  .cr-direct-sale-copy>p{margin-bottom:5px;line-height:1.45}
  .cr-direct-sale-copy label{margin-top:5px}
  .cr-direct-sale-copy select,.cr-direct-sale-copy input{min-height:35px;margin-top:4px}
  .cr-direct-sale-warning{margin-top:6px;padding:7px 9px}
  .cr-direct-sale-copy .cr-form-message{min-height:12px;margin:4px 0 0}
  .ebuy-create-preview{gap:12px!important}
  .ebuy-create-preview .ebuy-create-media{min-height:180px!important}
}

@media(max-width:760px){
  .cr-field-lease-marker{align-items:flex-start;flex-direction:column}
  .cr-field-lease-marker>em{text-align:left;padding-left:39px}
}
.finance-income-panel{margin-top:16px;border-color:color-mix(in srgb,var(--line) 72%,#3b9656 28%)}.finance-income-panel .finance-income-value,.finance-ledger-income>div,.finance-ledger-income-total>div{color:#258646}.finance-income-panel .panel-head{background:linear-gradient(110deg,color-mix(in srgb,var(--card) 94%,#5ab86e 6%),var(--card));border-radius:inherit}
