/* realestate widgets on the dashboard: rent arrears, unmatched payments, lease actions */
.re-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: .3rem;
    background: color-mix(in srgb, var(--color-highlight) 13%, transparent);
    color: var(--color-highlight);
    font-size: 1.25rem;
}
.re-icon.re-danger {
    background: color-mix(in srgb, #d93025 14%, transparent);
    color: color-mix(in srgb, #d93025 80%, var(--color-text-strong));
}
.re-icon.re-warning {
    background: color-mix(in srgb, #e8a100 20%, transparent);
    color: color-mix(in srgb, #b07800 75%, var(--color-text-strong));
}
.re-date {
    flex: 0 0 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3px 0 4px 0;
    border-radius: .3rem;
    background: color-mix(in srgb, var(--color-highlight) 13%, transparent);
    line-height: 1.1;
}
.re-date .day {
    font-size: 1.1rem;
    font-weight: var(--font-weight-strong);
}
.re-date .month {
    font-size: .62rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    opacity: .75;
}
.re-text {
    flex: 1 1 0;
    min-width: 0;
}
.re-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: var(--font-weight-strong);
    line-height: 1.3;
}
.re-item:hover .re-title {
    color: var(--color-highlight);
}
.re-sub {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .8rem;
    color: var(--color-text-muted);
}
.re-amount {
    flex: none;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.re-amount.re-negative {
    color: color-mix(in srgb, #d93025 80%, var(--color-text-strong));
    font-weight: var(--font-weight-strong);
}
.re-status {
    flex: none;
    max-width: 9.5rem;
    text-align: right;
}
.re-status .badge {
    margin-bottom: 2px;
}
.re-status.re-sub {
    white-space: normal;
}
.re-arrow {
    flex: none;
    color: var(--color-text-faint-3);
    transition: transform .15s ease, color .15s ease;
}
.re-item:hover .re-arrow {
    color: var(--color-highlight);
    transform: translateX(3px);
}

/* a count and what it is worth */
.re-stat {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}
.re-stat-number {
    font-size: 1.6rem;
    font-weight: var(--font-weight-strong);
    line-height: 1;
}
.re-stat-label {
    color: var(--color-text-muted);
}
.re-stat-sum {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.re-summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 8px 0 8px;
    border-top: 1px solid var(--color-borderdecent);
    font-size: .82rem;
    color: var(--color-text-muted);
}
.re-summary strong {
    color: var(--color-textprimary);
    font-weight: var(--font-weight-strong);
}
.re-footer {
    margin-top: 10px;
    text-align: right;
}

/* a titled group inside a widget */
.re-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 2px 0;
    font-size: .7rem;
    font-weight: var(--font-weight-strong);
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.re-section:not(:first-child) {
    margin-top: 14px;
}
.re-section-count {
    padding: 0 7px;
    border-radius: 99px;
    background: var(--color-surface-light-2);
    letter-spacing: normal;
}

/* map of the estates */
.rm-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}
.rm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-left: auto;
    font-size: .8rem;
    color: var(--color-text-muted);
}
.rm-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    border-radius: 50%;
}
.rm-dot-full { background: var(--success, #42ba96); }
.rm-dot-vacant { background: var(--danger, #df4759); }
.rm-dot-none { background: var(--color-text-muted); }
.rm-map {
    overflow: hidden;
    border-radius: .3rem;
    box-shadow: var(--shadow-sm);
}
#rea-overview-map {
    width: 100%;
    height: calc(100vh - 290px);
    min-height: 420px;
    z-index: 0;
}
.rm-pop-title {
    font-weight: var(--font-weight-strong);
}
.rm-pop-sub {
    margin: 2px 0 6px 0;
    font-size: .8rem;
    color: var(--color-text-muted);
}
.rm-pop-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.rm-pill {
    padding: 0 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-text-muted) 14%, transparent);
    font-size: .75rem;
    line-height: 1.6;
}
.rm-pill-ok {
    background: color-mix(in srgb, var(--success, #42ba96) 18%, transparent);
    color: color-mix(in srgb, var(--success, #42ba96) 70%, #000);
}
.rm-pill-bad {
    background: color-mix(in srgb, var(--danger, #df4759) 14%, transparent);
    color: var(--danger, #df4759);
}
.rm-pop-arrears {
    margin-top: 6px;
    font-size: .8rem;
    color: var(--danger, #df4759);
}
.leaflet-popup-content {
    margin: 12px 14px;
}

