/* Property module styles. Served at _content/AAAWebAppModule.Properties/css/properties.css and
   linked globally from AAAWebApp/App/App.razor. */

/* ---- Status pills (Property list Status column + property detail topbar) ---- */
.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

/* Larger, bolder pill in the topbar so it sits with the page title text. */
.tb-title .status-pill {
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 700;
}

/* The topbar status pill is a button (click to edit) - strong outline, shadow and
   deeper fill so it reads as an interactive control rather than a passive label. */
.status-pill-button {
    border: 2px solid currentColor;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    font-family: inherit;
    transition: box-shadow 0.15s ease, transform 0.05s ease;
}

.status-pill-button:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.status-pill-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.status-pill-button:disabled {
    cursor: default;
    box-shadow: none;
    opacity: 0.65;
}

/* Deeper backgrounds for the button variants (one tone down from the read-only pill). */
.status-pill-button.status-pill-violet { background: #ede9fe; }
.status-pill-button.status-pill-blue   { background: #dbeafe; }
.status-pill-button.status-pill-teal   { background: #cffafe; }
.status-pill-button.status-pill-amber  { background: #fef3c7; }
.status-pill-button.status-pill-green  { background: #dcfce7; }
.status-pill-button.status-pill-grey   { background: #e5e7eb; }

.status-pill-violet {
    background: #f5f3ff;
    color: #6d28d9;
}

.status-pill-blue {
    background: #eff6ff;
    color: #2563eb;
}

.status-pill-teal {
    background: #ecfeff;
    color: #0e7490;
}

.status-pill-amber {
    background: #fffbeb;
    color: #b45309;
}

.status-pill-green {
    background: #f0fdf4;
    color: #15803d;
}

.status-pill-grey {
    background: #f3f4f6;
    color: #4b5563;
}

.status-pill-red {
    background: #fff5f5;
    color: #b91c1c;
}

/* ---- Segmented toggle (seg-toggle) ----
   Shared across the Properties list filter bar (All/Sales/Lettings/HMO with counts),
   the property detail listing-type editor, and the new-property marketing-mode selector.
   The list variant uses .seg-count; the editor/selector variants use .seg-dot radio dots. */
.seg-toggle {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: #f3f4f6;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.seg-item {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all .12s;
}

/* Dot variant: lay the radio dot and label out in a centred row. */
.seg-item:has(.seg-dot) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.seg-item:hover {
    color: var(--txt);
}

.seg-item:disabled {
    cursor: default;
}

.seg-item.active {
    background: var(--surface);
    color: var(--txt);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.seg-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--muted);
    box-sizing: border-box;
}

.seg-item.active .seg-dot {
    border-color: var(--txt);
    background: var(--txt);
    box-shadow: inset 0 0 0 2px var(--surface);
}

.seg-count {
    color: var(--muted);
    font-weight: 500;
}

.seg-item.active .seg-count {
    color: var(--txt);
}

/* ---- Filter button (flt-toggle) ----
   The Filter button beside a list's search box, on the Properties list and on Listing. */
.flt-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: var(--txt);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all .12s;
}

.flt-toggle:hover {
    background: #f3f4f6;
}

.flt-toggle.active {
    background: #f3f4f6;
    font-weight: 600;
}

/* ---- Property detail cards and drill-in rows ---- */
.property-detail-card {
    width: 100%;
}

.property-detail-card-body {
    display: grid;
    gap: 12px;
    width: 100%;
    color: var(--txt);
    text-align: left;
}

.property-detail-card-body-compact {
    gap: 10px;
    min-height: 132px;
}

.property-detail-card-header,
.property-detail-card-row,
.property-detail-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.property-detail-card-header {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--txt);
    padding: 14px 4px;
    text-align: left;
}

.property-detail-card-header-action {
    transition: background-color .12s;
}

.property-detail-card-header-action:hover,
.property-detail-link-row:hover {
    background: var(--grid-row-hover);
}

.property-detail-card-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.property-detail-card-title-action-height {
    display: flex;
    align-items: center;
    min-height: 36px;
}

.property-detail-card-header-action > .rz-icon,
.property-detail-link-chevron.rz-icon {
    color: var(--muted);
    font-size: 20px;
}

.property-detail-card-row {
    font-size: 14px;
    line-height: 1.35;
    padding: 0 4px;
}

.property-detail-card-row strong {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.property-detail-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.property-detail-card-muted {
    color: var(--muted);
    font-size: 12px;
}

.property-detail-card-error {
    color: var(--red);
    font-size: 12px;
}

.property-detail-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    transition: background-color .12s, color .12s;
}

.property-detail-icon-btn:hover:not(:disabled),
.property-detail-icon-btn.active {
    background: var(--border);
    color: var(--acc);
}

.property-detail-icon-btn:disabled {
    cursor: default;
    opacity: .45;
}

.property-detail-icon-btn .rz-icon {
    font-size: 20px;
}

.property-detail-link-row {
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color .12s;
}

.property-detail-link-row:last-child {
    border-bottom: none;
}

.property-detail-link-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}

/* A row whose destination does not exist yet: no chevron, no hover, no pointer, so it does not
   offer to take the user somewhere it cannot. The dot and label still report its state. */
.property-detail-link-row.is-unavailable {
    cursor: default;
}

.property-detail-link-row.is-unavailable:hover {
    background: transparent;
}

.property-detail-link-row.is-unavailable .property-detail-link-label {
    color: var(--muted);
}

.property-detail-link-dot.is-complete {
    background: var(--green);
}

.property-detail-link-dot.is-deficient {
    background: var(--red);
}

.property-detail-link-dot.is-partial {
    background: var(--amber);
}

.property-detail-link-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--txt);
}

/* ---- Property chips and badges ---- */
.property-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.property-chip-row-end {
    justify-content: flex-end;
}

.property-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 10px;
    white-space: nowrap;
}

.property-chip-xs {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
}

.property-chip-sm {
    font-size: 12px;
    padding: 4px 10px;
}

.property-chip-md {
    font-size: 13px;
    padding: 6px 14px;
}

.property-chip-lg {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
}

.property-chip-strong {
    font-weight: 800;
}

.property-chip-accent {
    border-color: color-mix(in srgb, var(--acc) 30%, var(--border));
    background: color-mix(in srgb, var(--acc) 10%, #fff);
    color: var(--acc);
}

.property-chip-navy {
    border-color: color-mix(in srgb, var(--sb) 25%, #fff);
    background: color-mix(in srgb, var(--sb) 8%, #fff);
    color: var(--sb);
}

.property-chip-navy-solid {
    border-color: var(--sb);
    background: var(--sb);
    color: #fff;
}

.property-chip-muted {
    background: var(--bg);
    color: var(--muted);
}

.property-chip-muted-surface {
    background: var(--surface);
    color: var(--muted);
}

.property-chip-neutral {
    background: var(--bg);
    color: var(--txt);
}

.property-chip-green {
    border-color: color-mix(in srgb, var(--green) 35%, var(--border));
    background: color-mix(in srgb, var(--green) 12%, #fff);
    color: var(--green);
}

.property-chip-red {
    border-color: color-mix(in srgb, var(--red) 32%, var(--border));
    background: color-mix(in srgb, var(--red) 12%, #fff);
    color: var(--red);
}

.property-chip-amber {
    border-color: color-mix(in srgb, var(--amber) 38%, var(--border));
    background: color-mix(in srgb, var(--amber) 14%, #fff);
    color: var(--amber);
}

.property-chip-teal {
    border-color: color-mix(in srgb, var(--teal) 32%, var(--border));
    background: color-mix(in srgb, var(--teal) 14%, #fff);
    color: var(--teal);
}

.property-chip-outline-current {
    border-color: currentColor;
    background: transparent;
}

.property-chip-selectable {
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    padding: 6px 12px;
}

.property-chip-selectable.property-chip-accent {
    border-color: color-mix(in srgb, var(--acc) 45%, var(--border));
    background: color-mix(in srgb, var(--acc) 10%, #fff);
    color: var(--acc);
}

.property-chip-status {
    min-height: 26px;
    font-weight: 600;
    line-height: 1.15;
    padding: 4px 11px;
    text-align: center;
}

.property-chip-badge {
    min-width: 58px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
}

.property-chip-icon .rz-icon,
.property-chip-icon .rzi {
    font-size: 16px;
    line-height: 1;
}

.property-chip-spark {
    color: #fbbf24;
}

.property-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.property-chip-remove:hover {
    background: color-mix(in srgb, currentColor 16%, #fff);
}

/* ---- Property drawer content primitives ---- */
.property-drawer-grid-2,
.property-drawer-grid-3,
.property-drawer-grid-4 {
    display: grid;
    gap: 0 16px;
}

.property-drawer-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.property-drawer-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.property-drawer-grid-4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.property-drawer-section-divider {
    border-top: 1px solid var(--border);
    margin-top: 26px;
    padding-top: 24px;
}

.property-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--txt);
    cursor: pointer;
    margin: 0;
}

.property-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--acc);
    cursor: pointer;
    flex: 0 0 auto;
}

.property-drawer-register-list {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--aaa-radius);
    overflow: hidden;
}

.property-drawer-register-detail {
    min-height: 0;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--aaa-radius);
}

.property-drawer-register-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.property-drawer-empty {
    padding: 24px 16px;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

.property-drawer-field-caption {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.property-drawer-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--aaa-radius);
}

.property-drawer-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

.property-drawer-table th {
    background: color-mix(in srgb, var(--acc) 8%, #fff);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    padding: 12px 16px;
    text-align: left;
    text-transform: uppercase;
}

.property-drawer-table td {
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    vertical-align: middle;
}

.property-drawer-room-name {
    font-size: 14px;
    font-weight: 800;
}

.property-drawer-room-code {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.property-drawer-money {
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

/* ---- Financial drawer icon actions ---- */
.fin-add-btn,
.fin-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: var(--acc);
    font-size: 13px;
    font-weight: 800;
    border-radius: 999px;
    padding: 0;
    cursor: pointer;
    transition: background-color .12s, color .12s;
}

.fin-add-btn .rz-icon,
.fin-add-btn .rzi,
.fin-icon-btn .rz-icon,
.fin-icon-btn .rzi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.fin-add-btn .rz-icon,
.fin-add-btn .rzi {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.fin-add-btn {
    padding: 0 8px;
}

.fin-add-btn:hover {
    background: var(--border);
}

.fin-add-standalone {
    margin: 8px 0 14px;
}

.fin-icon-btn {
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--muted);
    transition: background-color .12s, color .12s;
}

.fin-icon-btn:hover {
    background: var(--border);
    color: var(--txt);
}

/* ---- File and photo upload modals (Quick Upload, the photo tagging step) ----
   A dashed drop zone, then one row per picked file with what it needs before Save. */
.file-upload-head {
    display: flex;
    align-items: center;
}

.file-upload-title {
    color: var(--txt);
    font-size: 18px;
    font-weight: 700;
}

.file-upload-drop {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 86px;
    padding: 16px 20px;
    border: 1px dashed color-mix(in srgb, var(--acc) 22%, var(--border));
    border-radius: var(--aaa-input-radius);
    background: color-mix(in srgb, var(--acc) 2%, #fff);
    cursor: pointer;
    overflow: hidden;
}

.file-upload-drop:hover,
.file-upload-drop:focus-within {
    border-color: color-mix(in srgb, var(--acc) 45%, var(--border));
    background: color-mix(in srgb, var(--acc) 4%, #fff);
}

.file-upload-drop.is-dragging {
    border-color: var(--acc);
    background: color-mix(in srgb, var(--acc) 8%, #fff);
}

/* The file input covers the whole zone, so a click or a drop anywhere on it picks files. */
.file-upload-drop .file-upload-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--acc) 8%, #fff);
    color: var(--acc);
}

.file-upload-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.file-upload-copy strong {
    color: var(--sb);
    font-size: 14px;
    font-weight: 700;
}

.file-upload-copy small,
.file-upload-hint {
    color: var(--muted);
    font-size: 12px;
}

.file-upload-list {
    display: grid;
    gap: 10px;
    max-height: 50vh;
    overflow-y: auto;
}

.file-upload-row {
    padding: 10px 14px 12px;
    border: 1px solid var(--border);
    border-radius: var(--aaa-radius);
    background: var(--surface);
}

.file-upload-row-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.file-upload-row-icon {
    display: inline-flex;
    color: var(--acc);
}

.file-upload-row-name {
    overflow: hidden;
    color: var(--txt);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-upload-row-percent {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.file-upload-progress {
    height: 6px;
}

.file-upload-row-type {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.file-upload-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
