/* Keeps action-menu entries usable with core versions that style all table links as icon buttons. */
td.option .dropdown-menu .dropdown-item {
    min-width: 0;
    background: transparent;
    color: #4e5e6a;
    border-radius: 0;
    display: block;
    position: static;
    vertical-align: baseline;
    text-align: left;
    margin: 0;
    padding: .25rem 1rem;
    border: 0;
    font-size: inherit;
}

.obras-tab-actions-row {
    display: flex;
    justify-content: flex-end;
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(78, 94, 106, .12);
    background: #ffffff;
}

.obras-tab-actions-row .title-button-group {
    display: flex;
    gap: .5rem;
}

.obras-tab-actions-row .obras-tab-action {
    display: inline-flex;
}

.obras-tab-actions-row .obras-tab-action.d-none {
    display: none;
}

.obras-map {
    min-height: 280px;
    border-radius: .5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(35, 51, 64, .12);
}

.obras-location-picker.obras-map {
    min-height: 320px;
}

.obras-new-location-fields {
    padding: 1rem;
    border: 1px solid #d7dee4;
    border-radius: .5rem;
    background: #f3f6f8;
}

.obras-new-location-fields .form-control {
    border-color: #ced7de;
    background-color: #ffffff;
    color: #354452;
    transition: border-color .2s cubic-bezier(.16, 1, .3, 1), background-color .2s cubic-bezier(.16, 1, .3, 1);
}

.obras-new-location-fields .form-control::placeholder {
    color: #6c7a86;
    opacity: 1;
}

.obras-new-location-fields .form-control:focus {
    border-color: #9caab5;
    background-color: #ffffff;
}

.obras-new-location-fields .has-error .form-control {
    border-color: #ec5855;
    background-color: #ffffff;
}

.obras-overview-metric {
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s cubic-bezier(.16, 1, .3, 1);
}

.obras-overview-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(35, 51, 64, .09);
}

.obras-overview-metric:active {
    transform: translateY(-1px);
}

.obras-overview-map-card .card-body,
.obras-overview-activity-card .card-body {
    padding: 1.25rem;
}

.obras-overview-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.obras-overview-section-heading h5 {
    margin: 0;
    font-weight: 600;
}

.obras-overview-section-heading p {
    font-size: .875rem;
}

.obras-overview-map {
    min-height: 400px;
    overflow: hidden;
    border: 1px solid rgba(78, 94, 106, .12);
    border-radius: .5rem;
}

body.obras-map-expanded-open {
    overflow: hidden;
}

.obras-map-expand-backdrop {
    position: fixed;
    z-index: 1040;
    inset: 0;
    background: rgba(35, 51, 64, .4);
    opacity: 0;
    transition: opacity .18s cubic-bezier(.16, 1, .3, 1);
}

.obras-map-expand-backdrop.is-visible {
    opacity: 1;
}

.obras-overview-map.obras-map-expanded {
    position: fixed !important;
    z-index: 1045;
    top: 50%;
    left: 50%;
    width: min(1120px, calc(100vw - 4rem));
    height: min(760px, calc(100dvh - 7rem));
    min-height: 0;
    transform: translate3d(-50%, -50%, 0);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .65rem;
    box-shadow: 0 24px 56px rgba(35, 51, 64, .28);
}

.obras-map-expand-control a,
.obras-map-expand-button {
    display: flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #ffffff;
    color: #4e5e6a;
    cursor: pointer;
}

.obras-map-expand-button:hover,
.obras-map-expand-button:focus-visible {
    background: #f3f6f7;
    color: #2f3d4a;
    outline: 2px solid #3f6b95;
    outline-offset: -2px;
}

.obras-map-expand-button:active {
    transform: scale(.96);
}

.obras-overview-empty {
    display: flex;
    min-height: 400px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    border: 1px dashed rgba(78, 94, 106, .28);
    border-radius: .5rem;
    color: #6c7a86;
    text-align: center;
}

.obras-overview-summary-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 0;
    border-top: 1px solid rgba(78, 94, 106, .12);
}

.obras-overview-summary-list > div:first-child {
    border-top: 0;
    padding-top: 0;
}

.obras-overview-summary-list dt {
    color: #6c7a86;
    font-size: .875rem;
    font-weight: 400;
}

.obras-overview-summary-list dd {
    margin: 0;
    color: #2f3d4a;
    font-size: 1.25rem;
    font-weight: 600;
}

.leaflet-marker-icon.obras-work-map-icon {
    width: 104px !important;
    height: 104px !important;
    background: transparent;
    border: 0;
    overflow: visible;
}

.obras-work-map-marker {
    position: relative;
    width: 104px;
    height: 104px;
}

.obras-work-map-centre {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #2f3d4a;
    box-shadow: 0 2px 6px rgba(35, 51, 64, .24);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.04em;
}

.obras-work-map-worker {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: block;
    width: 15px;
    height: 15px;
    transform: translate3d(0, 0, 0);
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: var(--worker-color, #0f766e);
    box-shadow: 0 2px 6px rgba(35, 51, 64, .24);
    cursor: help;
    outline: 0;
    will-change: transform;
    transition: opacity .16s cubic-bezier(.16, 1, .3, 1);
}

.obras-workers-collapsed .obras-work-map-worker {
    opacity: 0;
    pointer-events: none;
}

.obras-work-map-worker:hover,
.obras-work-map-worker:focus {
    z-index: 4;
}

.obras-work-map-worker-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 5;
    min-width: max-content;
    max-width: 190px;
    padding: .45rem .6rem;
    transform: translate(-50%, 4px);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: .35rem;
    background: #2f3d4a;
    box-shadow: 0 8px 18px rgba(35, 51, 64, .2);
    color: #ffffff;
    font-size: .75rem;
    line-height: 1.25;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s cubic-bezier(.16, 1, .3, 1), transform .18s cubic-bezier(.16, 1, .3, 1), visibility .18s;
    visibility: hidden;
}

.obras-work-map-worker:hover .obras-work-map-worker-tooltip,
.obras-work-map-worker:focus .obras-work-map-worker-tooltip {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
}

.obras-work-map-worker-name,
.obras-work-map-worker-position {
    display: block;
    white-space: nowrap;
}

.obras-work-map-worker-name {
    font-weight: 600;
}

.obras-work-map-worker-position {
    margin-top: .08rem;
    color: #d4dde1;
}

.obras-work-map-legend {
    min-width: 132px;
    padding: .55rem .65rem;
    border: 1px solid rgba(78, 94, 106, .18);
    border-radius: .4rem;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 6px 16px rgba(35, 51, 64, .12);
    color: #2f3d4a;
    font-size: .75rem;
    line-height: 1.3;
}

.obras-work-map-legend-title {
    margin-bottom: .35rem;
    color: #6c7a86;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.obras-work-map-legend-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .12rem 0;
}

.obras-work-map-legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(35, 51, 64, .2);
}

.obras-work-map-legend-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .obras-overview-map,
    .obras-overview-empty {
        min-height: 300px;
    }

    .obras-overview-map.obras-map-expanded {
        width: calc(100vw - 1.5rem);
        height: min(680px, calc(100dvh - 3rem));
        border-radius: .5rem;
    }
}
