/**
 * Operational listing dashboard table (My Properties + agency portal).
 */

.diyarlist-op-filter-form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
}

.diyarlist-op-filter-form__grid {
    display: grid;
    gap: 0.65rem 1rem;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    margin-bottom: 0.75rem;
}

.diyarlist-op-filter-form label span {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.diyarlist-op-filter-form select {
    max-width: 100%;
    width: 100%;
}

.table.dl-op-listings-table,
.diyarlist-portal-table.dl-op-listings-table {
    font-size: 0.875rem;
}

.dl-op-listing-row td {
    vertical-align: top;
}

.dl-op-property-with-thumb {
    display: flex;
    gap: 0.65rem;
}

.dl-op-thumb {
    border-radius: 4px;
    flex-shrink: 0;
    height: auto;
    max-width: 56px;
}

.dl-op-property__title {
    font-weight: 600;
    line-height: 1.3;
}

.dl-op-property__meta {
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8rem;
    gap: 0.35rem 0.65rem;
    margin-top: 0.2rem;
}

.dl-op-property__location {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.dl-op-muted {
    color: #64748b;
    font-size: 0.8rem;
}

.dl-op-party,
.dl-op-timeline {
    font-size: 0.8125rem;
    line-height: 1.4;
}

.dl-op-compliance-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    max-width: 240px;
}

.dl-op-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.8125rem;
    gap: 0.35rem;
}

.dl-op-actions--listings .dl-availability-dashboard {
    display: contents;
}

.dl-portal-listings-panel .dl-op-actions--listings .dl-availability-dashboard {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.dl-portal-listings-panel .dl-op-actions--listings .dl-availability-dashboard__badge,
.dl-portal-listings-panel .dl-op-actions--listings .dl-availability-dashboard__line,
.dl-portal-listings-panel .dl-op-actions--listings .dl-availability-dashboard__warn,
.dl-portal-listings-panel .dl-op-actions--listings .dl-availability-dashboard__hint,
.dl-portal-listings-panel .dl-op-actions--listings .dl-availability-tz-debug {
    display: none;
}

.dl-portal-listings-panel .dl-op-col-links .dl-vc-btn {
    font-size: 0.8125rem;
    min-height: 2rem;
    padding: 0.35rem 0.75rem;
}

.dl-op-next-action.dlv-badge {
    font-weight: 600;
}

/* Listing status pills — Next action + Confirmation columns */
.dl-op-status-badge,
.dl-portal-listings-panel .dl-op-col-confirmation .dlv-badge {
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.35;
    padding: 0.2rem 0.55rem;
    white-space: nowrap;
}

.dl-op-status-badge--ready,
.dl-portal-listings-panel .dl-op-col-confirmation .dlv-badge--ok {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

.dl-op-status-badge--due-soon,
.dl-portal-listings-panel .dl-op-col-confirmation .dlv-badge--warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.dl-op-status-badge--required {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.dl-op-status-badge--overdue,
.dl-portal-listings-panel .dl-op-col-confirmation .dlv-badge--err {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.dl-op-status-badge--paused {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}

.dl-op-status-badge--offline {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}

.dl-op-status-badge--neutral,
.dl-portal-listings-panel .dl-op-col-confirmation .dlv-badge--muted {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

@media (max-width: 991px) {
    .table.dl-op-listings-table thead {
        display: none;
    }

    .dl-op-listing-row {
        display: block;
        border-bottom: 1px solid #e2e8f0;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .dl-op-listing-row td {
        display: block;
        padding: 0.35rem 0;
    }

    .dl-op-listing-row td::before {
        color: #64748b;
        content: attr(data-label);
        display: block;
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        margin-bottom: 0.25rem;
        text-transform: uppercase;
    }

    .dl-op-col-select::before {
        display: none !important;
    }

    .dl-portal-dashboard-agency .dl-op-listing-row .dl-op-actions a,
    .dl-portal-dashboard-agent .dl-op-listing-row .dl-op-actions a,
    .dl-portal-dashboard-agency .dl-op-listing-row .dl-op-actions button,
    .dl-portal-dashboard-agent .dl-op-listing-row .dl-op-actions button {
        display: inline-block;
    }
}

/* ── Portal listings declutter (owner request) ────────────────────────────
   Slim rows: agent-only party cell, "Listed X days" only timeline, single
   identifier, and a "More details" expander that reveals the rest. Compliance
   column shows only issues (OK badges are hidden — the full status is in the
   verification/documents tab). */
.dl-op-col-compliance .dlv-badge--ok { display: none; }

.dl-op-more { margin-top: 0.35rem; }
.dl-op-more > summary {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--dl-orange, #ff7900);
    list-style: none;
    user-select: none;
}
.dl-op-more > summary::-webkit-details-marker { display: none; }
.dl-op-more > summary::before {
    content: "▸";
    font-size: 0.7em;
    transition: transform 0.15s ease;
}
.dl-op-more[open] > summary::before { transform: rotate(90deg); }
.dl-op-more__body {
    margin-top: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.8rem;
}
