/* Shared styles for the map job popup rendered by defex-job-popup.js.
   Replaces the legacy .defex-popup-* (defex-mapbox-route.css) and
   .jbm-popup-* (inline in JobPlanner.razor) class families. */

.defex-job-popup {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    font-family: "Montserrat", "Segoe UI", sans-serif;
    color: #0f172a;
    font-size: 0.85rem;
}

.mapboxgl-popup-content:has(.defex-job-popup) {
    width: auto;
    max-width: 300px;
    padding: 0;
}

.mapboxgl-popup-content:has(.defex-job-popup) > div {
    padding: 0;
}

.defex-job-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.defex-job-popup-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.defex-job-popup-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.defex-job-popup-chip {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 9999px;
    background: #e2e8f0;
    color: #0f172a;
    line-height: 1.4;
}

.defex-job-popup-chip-overdue {
    background: #fee2e2;
    color: #b91c1c;
}

.defex-job-popup-subtitle {
    font-weight: 600;
    color: #1e293b;
}

.defex-job-popup-description {
    font-size: 13px;
    color: #334155;
    line-height: 1.35;
}

.defex-job-popup-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    color: #475569;
}

.defex-job-popup-row > span:first-child {
    font-weight: 600;
    color: #1e293b;
}

.defex-job-popup-row > span:last-child {
    text-align: right;
    color: #334155;
}

.defex-job-popup-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.defex-job-popup-button {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--mud-palette-lines-default, #e2e8f0);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2563eb;
}

.defex-job-popup-button:hover {
    background: #f5f5f5;
}

/* Used by the property popup on Map.razor where each listed job links to its
   page. Inline-style replacement for the old .job-link anchor. */
.defex-job-popup-link {
    align-self: flex-start;
    font-size: 12.5px;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
    text-decoration: none;
    margin-top: 2px;
}

.defex-job-popup-link:hover {
    text-decoration: underline;
}
