/*
 * ORGANIZACIÓN DE UBICACIONES
 *
 * Utiliza los tokens del tema activo y funciona también
 * cuando todavía se carga una hoja de estilos antigua.
 */

.location-sections {
    position: sticky;
    z-index: 5;
    top: 0;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;

    margin: -1px 0 8px;
    padding: 3px;

    background:
        var(--cc-surface-1, var(--surface-blue, #edf7fd));
    border: 1px solid
        var(--cc-border, var(--border, #c9dce8));
    border-radius: 10px;
}

.location-section-button {
    min-width: 0;
    min-height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 5px 7px;

    color:
        var(--cc-text-secondary, var(--text-soft, #547086));
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;

    font: inherit;
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;
}

.location-section-button small {
    min-width: 18px;
    padding: 1px 5px;

    color:
        var(--cc-text-muted, var(--text-muted, #7890a0));
    background:
        var(--cc-surface-2, rgba(127, 148, 163, 0.12));
    border-radius: 999px;

    font-size: 9px;
    text-align: center;
}

.location-section-button:hover {
    color: var(--cc-text, var(--text, #173247));
    background: var(--cc-surface-0, #ffffff);
}

.location-section-button.active {
    color: var(--cc-on-accent, #ffffff);
    background: var(--cc-accent, var(--accent, #268cca));
    border-color: var(--cc-accent, var(--accent, #268cca));
}

.location-section-button.active small {
    color: inherit;
    background: rgba(255, 255, 255, 0.2);
}

.location-items {
    min-height: 24px;
}

.location-empty {
    padding: 16px 8px;

    color:
        var(--cc-text-muted, var(--text-muted, #7890a0));

    font-size: 11px;
    line-height: 1.45;
    text-align: center;
}

.location-button {
    min-height: 51px;
    align-items: center !important;
}

.location-copy {
    min-width: 0;
    flex: 1 1 auto;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.location-name-row {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 5px;
}

.location-name,
.location-real-path {
    display: block;
    min-width: 0;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.location-name {
    flex: 1 1 auto;
    color: inherit;
    line-height: 1.2;
}

.location-real-path {
    color:
        var(--cc-text-muted, var(--text-muted, #7890a0)) !important;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.2;
}

.location-favorite-mark {
    flex: 0 0 auto;

    color: var(--cc-warning, #d89216);
    font-size: 10px;
}

.location-favorite-mark[hidden] {
    display: none;
}

.location-drag-handle {
    width: 25px;
    height: 32px;
    flex: 0 0 25px;

    display: grid;
    place-items: center;

    color:
        var(--cc-text-muted, var(--text-muted, #7890a0));
    border-radius: 7px;

    font-size: 12px;
    letter-spacing: -3px;

    cursor: grab;
    touch-action: none;
    user-select: none;
}

.location-drag-handle:hover {
    color: var(--cc-accent, var(--accent, #268cca));
    background:
        var(--cc-accent-soft, var(--accent-soft, #d8ecfa));
}

.location-drag-handle:active {
    cursor: grabbing;
}

.location-button.location-dragging {
    position: relative;
    z-index: 20;

    opacity: 0.78;
    border-color:
        var(--cc-accent, var(--accent, #268cca)) !important;
    box-shadow:
        0 8px 22px rgba(20, 48, 65, 0.2) !important;
}

.trash-location-button {
    margin-top: 8px;
    border-top-color:
        var(--cc-border, var(--border, #c9dce8)) !important;
}

.carajillo-location-context button {
    display: flex;
    align-items: center;
    gap: 9px;
}

.carajillo-location-context button > span:first-child {
    width: 20px;
    flex: 0 0 20px;
    text-align: center;
}

@media screen and (max-width: 760px) {
    .location-sections {
        margin-bottom: 7px;
    }

    .location-section-button {
        min-height: 35px;
        font-size: 12px;
    }

    .location-button {
        min-height: 57px;
    }

    .location-real-path {
        font-size: 9px;
    }

    .location-drag-handle {
        width: 34px;
        height: 38px;
        flex-basis: 34px;
    }
}
